View Source SpaceDust.State.KeplerianElements (Space Dust v0.3.0)
Classical Keplerian orbital elements.
Represents an orbit using the six classical orbital elements:
- Semi-major axis (a): Size of the orbit
- Eccentricity (e): Shape of the orbit (0 = circular, 0-1 = elliptical)
- Inclination (i): Tilt relative to the equatorial plane
- RAAN (Ω): Right Ascension of the Ascending Node
- Argument of perigee (ω): Orientation of the orbit in its plane
- True anomaly (ν): Position along the orbit
All angles are in radians. Semi-major axis is in kilometers.
Summary
Functions
Calculate specific angular momentum magnitude in km^2/s.
Calculate apoapsis radius in kilometers.
Create Keplerian elements from Nx tensor.
Calculate mean motion in radians per second.
Create new Keplerian elements.
Calculate periapsis radius in kilometers.
Calculate orbital period in seconds.
Calculate specific orbital energy in km^2/s^2.
Convert Keplerian elements to Nx tensor representation. Returns tensor of shape {6}: [a, e, i, Ω, ω, ν]
Convert true anomaly to eccentric anomaly.
Convert true anomaly to mean anomaly.
Types
Functions
Calculate specific angular momentum magnitude in km^2/s.
Calculate apoapsis radius in kilometers.
@spec from_tensor( Nx.Tensor.t(), keyword() ) :: t()
Create Keplerian elements from Nx tensor.
Calculate mean motion in radians per second.
Create new Keplerian elements.
Parameters
- semi_major_axis: Semi-major axis in kilometers
- eccentricity: Orbital eccentricity (0 to < 1 for elliptical)
- inclination: Inclination in radians
- raan: Right Ascension of Ascending Node in radians
- arg_perigee: Argument of perigee in radians
- true_anomaly: True anomaly in radians
- opts: Optional parameters
- :epoch - DateTime for the elements
- :mu - Gravitational parameter (defaults to Earth)
Calculate periapsis radius in kilometers.
Calculate orbital period in seconds.
Calculate specific orbital energy in km^2/s^2.
@spec to_tensor(t()) :: Nx.Tensor.t()
Convert Keplerian elements to Nx tensor representation. Returns tensor of shape {6}: [a, e, i, Ω, ω, ν]
Convert true anomaly to eccentric anomaly.
Convert true anomaly to mean anomaly.