Skip to content

Cartesian Coordinates

Functions for working with Cartesian state vectors and conversions.

State Conversions

state_osculating_to_cartesian builtin

state_osculating_to_cartesian(x_oe: ndarray, angle_format: AngleFormat) -> np.ndarray

Convert osculating orbital elements to Cartesian state.

Transforms a state vector from osculating Keplerian orbital elements to Cartesian position and velocity coordinates.

Parameters:

Name Type Description Default
x_oe ndarray

Osculating orbital elements [a, e, i, RAAN, omega, M] where a is semi-major axis (meters), e is eccentricity (dimensionless), i is inclination (radians or degrees), RAAN is right ascension of ascending node (radians or degrees), omega is argument of periapsis (radians or degrees), and M is mean anomaly (radians or degrees).

required
angle_format AngleFormat

Angle format for angular elements (RADIANS or DEGREES).

required

Returns:

Type Description
ndarray

Cartesian state [x, y, z, vx, vy, vz] where position is in meters and velocity is in meters per second.

state_cartesian_to_osculating builtin

state_cartesian_to_osculating(x_cart: ndarray, angle_format: AngleFormat) -> np.ndarray

Convert Cartesian state to osculating orbital elements.

Transforms a state vector from Cartesian position and velocity coordinates to osculating Keplerian orbital elements.

Parameters:

Name Type Description Default
x_cart ndarray

Cartesian state [x, y, z, vx, vy, vz] where position is in meters and velocity is in meters per second.

required
angle_format AngleFormat

Angle format for output angular elements (RADIANS or DEGREES).

required

Returns:

Type Description
ndarray

Osculating orbital elements [a, e, i, RAAN, omega, M] where a is semi-major axis (meters), e is eccentricity (dimensionless), i is inclination (radians or degrees), RAAN is right ascension of ascending node (radians or degrees), omega is argument of periapsis (radians or degrees), and M is mean anomaly (radians or degrees).