View Source SpaceDust.State.TEMEState (Space Dust v0.3.0)

State vector in True Equator Mean Equinox (TEME) reference frame.

TEME is the reference frame used by SGP4/SDP4 propagators. Position and velocity are in kilometers and kilometers/second respectively.

Summary

Functions

Create a TEME state from Nx tensors.

Create a new TEME state from position and velocity tuples.

Convert position and velocity to Nx tensors for numerical operations. Returns {position_tensor, velocity_tensor} as 1D tensors of shape {3}.

Types

t()

@type t() :: %SpaceDust.State.TEMEState{
  epoch: DateTime.t(),
  position: {float(), float(), float()},
  velocity: {float(), float(), float()}
}

Functions

from_tensors(epoch, pos_tensor, vel_tensor)

@spec from_tensors(DateTime.t(), Nx.Tensor.t(), Nx.Tensor.t()) :: t()

Create a TEME state from Nx tensors.

new(epoch, position, velocity)

@spec new(DateTime.t(), {float(), float(), float()}, {float(), float(), float()}) ::
  t()

Create a new TEME state from position and velocity tuples.

Parameters

  • epoch: UTC DateTime
  • position: {x, y, z} in kilometers
  • velocity: {vx, vy, vz} in km/s

to_tensors(teme_state)

@spec to_tensors(t()) :: {Nx.Tensor.t(), Nx.Tensor.t()}

Convert position and velocity to Nx tensors for numerical operations. Returns {position_tensor, velocity_tensor} as 1D tensors of shape {3}.