View Source SpaceDust.Time.TAI (Space Dust v0.3.0)

International Atomic Time (TAI - Temps Atomique International).

TAI is a continuous time scale based on atomic clocks. Unlike UTC, TAI does not include leap seconds, making it ideal for precise scientific calculations.

TAI = UTC + leap_seconds

Internally stores time as fractional seconds since a TAI reference epoch (equivalent to Unix epoch in TAI scale).

Summary

Functions

Add seconds to TAI time.

Difference between two TAI times in seconds.

Create TAI from Julian Date (in TAI scale).

Create from Nx tensor.

Create a TAI time from TAI seconds (since TAI epoch corresponding to Unix epoch).

Convert TAI to Julian Date. Note: This is the Julian Date in the TAI time scale.

Get the TAI seconds value.

Convert to Nx tensor.

Types

t()

@type t() :: %SpaceDust.Time.TAI{tai_seconds: float()}

Functions

add(tai, seconds)

@spec add(t(), number()) :: t()

Add seconds to TAI time.

diff(tai1, tai2)

@spec diff(t(), t()) :: float()

Difference between two TAI times in seconds.

from_jd(jd)

@spec from_jd(float()) :: t()

Create TAI from Julian Date (in TAI scale).

from_tensor(tensor)

@spec from_tensor(Nx.Tensor.t()) :: t()

Create from Nx tensor.

new(tai_seconds)

@spec new(float()) :: t()

Create a TAI time from TAI seconds (since TAI epoch corresponding to Unix epoch).

to_jd(tai)

@spec to_jd(t()) :: float()

Convert TAI to Julian Date. Note: This is the Julian Date in the TAI time scale.

to_seconds(tai)

@spec to_seconds(t()) :: float()

Get the TAI seconds value.

to_tensor(tai)

@spec to_tensor(t()) :: Nx.Tensor.t()

Convert to Nx tensor.