Cartesian Coordinates¶
Functions for working with Cartesian state vectors and conversions.
State Conversions¶
state_koe_to_eci builtin ¶
state_koe_to_eci(x_oe: Union[ndarray, Sequence], angle_format: AngleFormat, axis: int = -1) -> 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 or list | Osculating orbital elements | required |
angle_format | AngleFormat | Angle format for angular elements ( | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian state |
state_eci_to_koe builtin ¶
state_eci_to_koe(x_cart: Union[ndarray, Sequence], angle_format: AngleFormat, axis: int = -1) -> 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 or list | Cartesian state | required |
angle_format | AngleFormat | Angle format for output angular elements ( | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Osculating orbital elements |
Example
Arbitrary Central Body¶
state_koe_to_inertial_for_body builtin ¶
state_koe_to_inertial_for_body(x_oe: Union[ndarray, Sequence], central_body: CentralBody, angle_format: AngleFormat, axis: int = -1) -> ndarray
Convert osculating orbital elements referenced to a body's mean equator at J2000 to the equivalent Cartesian state in that body's ICRF-aligned inertial (BCI) frame. Inverse of state_inertial_to_koe_for_body.
Unlike state_koe_to_eci (whose elements are referenced to the ICRF axes), the inclination and RAAN here are measured against the body mean equator at J2000 (the plane normal to the body's IAU pole at J2000 TDB, x-axis at the ascending node of that equator on the ICRF equator - the standard IAU orientation convention (Archinal et al., "Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements: 2015", Celest Mech Dyn Astr 130, 22 (2018), https://doi.org/10.1007/s10569-017-9805-5); this ascending node is where z_ICRF x p_hat points, since that vector is perpendicular to both poles and hence lies in both equatorial planes). The output state is in the body-centered ICRF-aligned frame, so it composes directly with the body-fixed transforms (state_bci_to_bcbf-style) and with the numerical propagators, which integrate in that frame. CentralBody.Earth is an exact passthrough of state_koe_to_eci.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_oe | ndarray or list | Osculating orbital elements | required |
central_body | CentralBody | Central body (supplies the GM and the IAU pole / body-fixed frame). | required |
angle_format | AngleFormat | Angle format for input angular elements ( | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian state |
Raises:
| Type | Description |
|---|---|
RuntimeError | If |
state_inertial_to_koe_for_body builtin ¶
state_inertial_to_koe_for_body(x_cart: Union[ndarray, Sequence], central_body: CentralBody, angle_format: AngleFormat, axis: int = -1) -> ndarray
Convert a Cartesian state in a body's ICRF-aligned inertial (BCI) frame to osculating orbital elements referenced to that body's mean equator at J2000.
Unlike state_eci_to_koe (whose elements are referenced to the ICRF axes), the inclination and RAAN here are measured against the body mean equator at J2000: the reference plane is normal to the body's IAU pole (alpha0, delta0) evaluated at J2000 TDB, with the x-axis at the ascending node of that equator on the ICRF equator - the standard IAU orientation convention (Archinal et al., "Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements: 2015", Celest Mech Dyn Astr 130, 22 (2018), https://doi.org/10.1007/s10569-017-9805-5). This ascending node is where z_ICRF x p_hat points: that vector is perpendicular to both poles, hence lies in both equatorial planes. This is the natural frame for polar / sun-synchronous / frozen orbits about the Moon, Mars, and other bodies whose spin pole is tilted relative to the ICRF pole. CentralBody.Earth is an exact passthrough of state_eci_to_koe. Inverse of state_koe_to_inertial_for_body.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_cart | ndarray or list | Cartesian state | required |
central_body | CentralBody | Central body (supplies the GM and the IAU pole / body-fixed frame). | required |
angle_format | AngleFormat | Angle format for output angular elements ( | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Osculating orbital elements |
Raises:
| Type | Description |
|---|---|
RuntimeError | If |
See Also¶
- Propagation Around Other Central Bodies -
CentralBodyand non-Earth propagation