Lunar Frames¶
Transformations between Lunar-Centered Inertial (LCI), Lunar-Fixed Principal Axis (LFPA), Lunar-Fixed Mean-Earth/polar-axis (LFME), and Earth-Centered Inertial (ECI).
Note
For conceptual explanations and examples, see Lunar Reference Frames in the Learn section.
LCI ↔ LFPA¶
rotation_lci_to_lfpa builtin ¶
Computes the rotation matrix from Lunar-Centered Inertial (LCI) to Lunar-Fixed Principal Axis (LFPA), using the DE440 lunar principal-axis binary PCK (moon_pa_de440).
Auto-loads the moon_pa_de440 PCK (downloading it to ~/.cache/brahe/naif if needed).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation matrix. A sequence evaluates one matrix per epoch. | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming LCI -> LFPA, shape |
rotation_lfpa_to_lci builtin ¶
Computes the rotation matrix from Lunar-Fixed Principal Axis (LFPA) to Lunar-Centered Inertial (LCI). Inverse of rotation_lci_to_lfpa.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation matrix. A sequence evaluates one matrix per epoch. | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming LFPA -> LCI, shape |
position_lci_to_lfpa builtin ¶
position_lci_to_lfpa(epc: Union[Epoch, Sequence[Epoch]], x_lci: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-inertial (LCI) position into the equivalent Cartesian Lunar-Fixed Principal Axis (LFPA) position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lci | ndarray or list | Cartesian LCI position (m), shape | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LFPA position (m), shape |
position_lfpa_to_lci builtin ¶
position_lfpa_to_lci(epc: Union[Epoch, Sequence[Epoch]], x_lfpa: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-Fixed Principal Axis (LFPA) position into the equivalent Cartesian Lunar-inertial (LCI) position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lfpa | ndarray or list | Cartesian LFPA position (m), shape | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LCI position (m), shape |
state_lci_to_lfpa builtin ¶
state_lci_to_lfpa(epc: Union[Epoch, Sequence[Epoch]], x_lci: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-inertial (LCI) state (position and velocity) into the equivalent Cartesian Lunar-Fixed Principal Axis (LFPA) state.
The velocity transformation accounts for the transport term induced by the Moon's rotation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lci | ndarray or list | Cartesian LCI state | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LFPA state |
state_lfpa_to_lci builtin ¶
state_lfpa_to_lci(epc: Union[Epoch, Sequence[Epoch]], x_lfpa: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-Fixed Principal Axis (LFPA) state (position and velocity) into the equivalent Cartesian Lunar-inertial (LCI) state. Inverse of state_lci_to_lfpa.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lfpa | ndarray or list | Cartesian LFPA state | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LCI state |
LCI ↔ LFME¶
rotation_lci_to_lfme builtin ¶
Computes the rotation matrix from Lunar-Centered Inertial (LCI) to Lunar-Fixed Mean Earth/polar-axis (LFME).
Auto-loads the moon_pa_de440 PCK (downloading it to ~/.cache/brahe/naif if needed).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation matrix. A sequence evaluates one matrix per epoch. | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming LCI -> LFME, shape |
rotation_lfme_to_lci builtin ¶
Computes the rotation matrix from Lunar-Fixed Mean Earth/polar-axis (LFME) to Lunar-Centered Inertial (LCI). Inverse of rotation_lci_to_lfme.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation matrix. A sequence evaluates one matrix per epoch. | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming LFME -> LCI, shape |
position_lci_to_lfme builtin ¶
position_lci_to_lfme(epc: Union[Epoch, Sequence[Epoch]], x_lci: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-inertial (LCI) position into the equivalent Cartesian Lunar-Fixed Mean Earth/polar-axis (LFME) position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lci | ndarray or list | Cartesian LCI position (m), shape | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LFME position (m), shape |
position_lfme_to_lci builtin ¶
position_lfme_to_lci(epc: Union[Epoch, Sequence[Epoch]], x_lfme: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-Fixed Mean Earth/polar-axis (LFME) position into the equivalent Cartesian Lunar-inertial (LCI) position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lfme | ndarray or list | Cartesian LFME position (m), shape | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LCI position (m), shape |
state_lci_to_lfme builtin ¶
state_lci_to_lfme(epc: Union[Epoch, Sequence[Epoch]], x_lci: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-inertial (LCI) state (position and velocity) into the equivalent Cartesian Lunar-Fixed Mean Earth/polar-axis (LFME) state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lci | ndarray or list | Cartesian LCI state | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LFME state |
state_lfme_to_lci builtin ¶
state_lfme_to_lci(epc: Union[Epoch, Sequence[Epoch]], x_lfme: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-Fixed Mean Earth/polar-axis (LFME) state (position and velocity) into the equivalent Cartesian Lunar-inertial (LCI) state. Inverse of state_lci_to_lfme.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lfme | ndarray or list | Cartesian LFME state | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LCI state |
LFPA ↔ LFME (Constant Rotation)¶
rotation_lfpa_to_lfme builtin ¶
rotation_lfpa_to_lfme() -> ndarray
Computes the constant rotation matrix from Lunar-Fixed Principal Axis (LFPA) to Lunar-Fixed Mean Earth/polar-axis (LFME). Inverse of rotation_lfme_to_lfpa.
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming LFPA -> LFME |
ECI ↔ LCI¶
position_eci_to_lci builtin ¶
position_eci_to_lci(epc: Union[Epoch, Sequence[Epoch]], x_eci: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Earth-inertial (ECI) position into the equivalent Cartesian Lunar-inertial (LCI) position.
The LCI origin is the Moon's body center (NAIF ID 301). Auto-initializes the default de440s ephemeris if no SPK kernel is loaded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_eci | ndarray or list | Cartesian ECI position (m), shape | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LCI position (m), shape |
position_lci_to_eci builtin ¶
position_lci_to_eci(epc: Union[Epoch, Sequence[Epoch]], x_lci: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-inertial (LCI) position into the equivalent Cartesian Earth-inertial (ECI) position.
Auto-initializes the default de440s ephemeris if no SPK kernel is loaded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lci | ndarray or list | Cartesian LCI position (m), shape | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian ECI position (m), shape |
state_eci_to_lci builtin ¶
state_eci_to_lci(epc: Union[Epoch, Sequence[Epoch]], x_eci: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Earth-inertial (ECI) state (position and velocity) into the equivalent Cartesian Lunar-inertial (LCI) state.
The LCI origin is the Moon's body center (NAIF ID 301). Auto-initializes the default de440s ephemeris if no SPK kernel is loaded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_eci | ndarray or list | Cartesian ECI state | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian LCI state |
state_lci_to_eci builtin ¶
state_lci_to_eci(epc: Union[Epoch, Sequence[Epoch]], x_lci: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms a Cartesian Lunar-inertial (LCI) state (position and velocity) into the equivalent Cartesian Earth-inertial (ECI) state.
Auto-initializes the default de440s ephemeris if no SPK kernel is loaded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch or Sequence[Epoch] | Epoch instant for computation of the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs). | required |
x_lci | ndarray or list | Cartesian LCI state | required |
axis | int | The axis of | -1 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Cartesian ECI state |
See Also¶
- Lunar Reference Frames (Learn) - Conceptual explanation and examples
- Mars Frames - Mars-centered frame transformations
- Reference Frame Router - Generic conversion between any two frames
- Reference Frames Module - Complete API reference for frames module