View Source SpaceDust.State.ECEFState (Space Dust v0.3.0)
State vector in Earth-Centered Earth-Fixed (ECEF) reference frame.
ECEF is a rotating reference frame fixed to the Earth with:
- Origin at Earth's center of mass
- X-axis pointing toward the intersection of the prime meridian and equator
- Z-axis pointing toward the North Pole
- Y-axis completing the right-handed system (90° East longitude)
Position and velocity are in kilometers and kilometers/second respectively. Note: Velocity in ECEF includes the Earth's rotation.
Summary
Functions
Create an ECEF state from Nx tensors.
Create a new ECEF state from position and velocity tuples.
Convert ECEF position to geodetic coordinates (latitude, longitude, altitude). Uses WGS84 ellipsoid parameters.
Convert position and velocity to Nx tensors for numerical operations. Returns {position_tensor, velocity_tensor} as 1D tensors of shape {3}.
Types
Functions
@spec from_tensors(DateTime.t(), Nx.Tensor.t(), Nx.Tensor.t()) :: t()
Create an ECEF state from Nx tensors.
Create a new ECEF state from position and velocity tuples.
Parameters
- epoch: UTC DateTime
- position: {x, y, z} in kilometers
- velocity: {vx, vy, vz} in km/s
Convert ECEF position to geodetic coordinates (latitude, longitude, altitude). Uses WGS84 ellipsoid parameters.
Returns {latitude_deg, longitude_deg, altitude_km}
@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}.