Skip to content

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

rotation_lci_to_lfpa(epc: Epoch) -> ndarray

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

Epoch instant for computation of the transformation matrix

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming LCI -> LFPA

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
r = bh.rotation_lci_to_lfpa(epc)

rotation_lfpa_to_lci builtin

rotation_lfpa_to_lci(epc: Epoch) -> ndarray

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

Epoch instant for computation of the transformation matrix

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming LFPA -> LCI

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
r = bh.rotation_lfpa_to_lci(epc)

position_lci_to_lfpa builtin

position_lci_to_lfpa(epc: Epoch, x_lci: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lci ndarray or list

Cartesian LCI position (m), shape (3,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LFPA position (m), shape (3,)

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lfpa = bh.position_lci_to_lfpa(epc, [bh.R_MOON + 100e3, 0.0, 0.0])

position_lfpa_to_lci builtin

position_lfpa_to_lci(epc: Epoch, x_lfpa: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lfpa ndarray or list

Cartesian LFPA position (m), shape (3,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LCI position (m), shape (3,)

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lci = bh.position_lfpa_to_lci(epc, [bh.R_MOON, 0.0, 0.0])

state_lci_to_lfpa builtin

state_lci_to_lfpa(epc: Epoch, x_lci: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lci ndarray or list

Cartesian LCI state [position (m), velocity (m/s)], shape (6,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LFPA state [position (m), velocity (m/s)], shape (6,)

Example
1
2
3
4
5
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lci = [bh.R_MOON + 100e3, 0.0, 0.0, 0.0, 1.6e3, 0.0]
x_lfpa = bh.state_lci_to_lfpa(epc, x_lci)

state_lfpa_to_lci builtin

state_lfpa_to_lci(epc: Epoch, x_lfpa: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lfpa ndarray or list

Cartesian LFPA state [position (m), velocity (m/s)], shape (6,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LCI state [position (m), velocity (m/s)], shape (6,)

Example
1
2
3
4
5
6
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lci = [bh.R_MOON + 100e3, 0.0, 0.0, 0.0, 1.6e3, 0.0]
x_lfpa = bh.state_lci_to_lfpa(epc, x_lci)
x_lci2 = bh.state_lfpa_to_lci(epc, x_lfpa)

LCI ↔ LFME

rotation_lci_to_lfme builtin

rotation_lci_to_lfme(epc: Epoch) -> ndarray

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

Epoch instant for computation of the transformation matrix

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming LCI -> LFME

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
r = bh.rotation_lci_to_lfme(epc)

rotation_lfme_to_lci builtin

rotation_lfme_to_lci(epc: Epoch) -> ndarray

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

Epoch instant for computation of the transformation matrix

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming LFME -> LCI

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
r = bh.rotation_lfme_to_lci(epc)

position_lci_to_lfme builtin

position_lci_to_lfme(epc: Epoch, x_lci: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lci ndarray or list

Cartesian LCI position (m), shape (3,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LFME position (m), shape (3,)

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lfme = bh.position_lci_to_lfme(epc, [bh.R_MOON + 100e3, 0.0, 0.0])

position_lfme_to_lci builtin

position_lfme_to_lci(epc: Epoch, x_lfme: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lfme ndarray or list

Cartesian LFME position (m), shape (3,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LCI position (m), shape (3,)

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lci = bh.position_lfme_to_lci(epc, [bh.R_MOON, 0.0, 0.0])

state_lci_to_lfme builtin

state_lci_to_lfme(epc: Epoch, x_lci: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lci ndarray or list

Cartesian LCI state [position (m), velocity (m/s)], shape (6,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LFME state [position (m), velocity (m/s)], shape (6,)

Example
1
2
3
4
5
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lci = [bh.R_MOON + 100e3, 0.0, 0.0, 0.0, 1.6e3, 0.0]
x_lfme = bh.state_lci_to_lfme(epc, x_lci)

state_lfme_to_lci builtin

state_lfme_to_lci(epc: Epoch, x_lfme: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lfme ndarray or list

Cartesian LFME state [position (m), velocity (m/s)], shape (6,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LCI state [position (m), velocity (m/s)], shape (6,)

Example
1
2
3
4
5
6
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lci = [bh.R_MOON + 100e3, 0.0, 0.0, 0.0, 1.6e3, 0.0]
x_lfme = bh.state_lci_to_lfme(epc, x_lci)
x_lci2 = bh.state_lfme_to_lci(epc, x_lfme)

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

Example
1
2
3
import brahe as bh

r = bh.rotation_lfpa_to_lfme()

rotation_lfme_to_lfpa builtin

rotation_lfme_to_lfpa() -> ndarray

Computes the constant rotation matrix from Lunar-Fixed Mean Earth/polar-axis (LFME) to Lunar-Fixed Principal Axis (LFPA).

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming LFME -> LFPA

Example
1
2
3
import brahe as bh

r = bh.rotation_lfme_to_lfpa()

ECI ↔ LCI

position_eci_to_lci builtin

position_eci_to_lci(epc: Epoch, x_eci: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_eci ndarray or list

Cartesian ECI position (m), shape (3,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LCI position (m), shape (3,)

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lci = bh.position_eci_to_lci(epc, [1e7, 2e7, 3e7])

position_lci_to_eci builtin

position_lci_to_eci(epc: Epoch, x_lci: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lci ndarray or list

Cartesian LCI position (m), shape (3,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian ECI position (m), shape (3,)

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_eci = bh.position_lci_to_eci(epc, [1e7, 2e7, 3e7])

state_eci_to_lci builtin

state_eci_to_lci(epc: Epoch, x_eci: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_eci ndarray or list

Cartesian ECI state [position (m), velocity (m/s)], shape (6,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian LCI state [position (m), velocity (m/s)], shape (6,)

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_lci = bh.state_eci_to_lci(epc, [1e7, 2e7, 3e7, 1.0, 2.0, 3.0])

state_lci_to_eci builtin

state_lci_to_eci(epc: Epoch, x_lci: Union[ndarray, List]) -> 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

Epoch instant for computation of the transformation

required
x_lci ndarray or list

Cartesian LCI state [position (m), velocity (m/s)], shape (6,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Cartesian ECI state [position (m), velocity (m/s)], shape (6,)

Example
1
2
3
4
import brahe as bh

epc = bh.Epoch.from_datetime(2024, 3, 1, 0, 0, 0.0, 0.0, bh.UTC)
x_eci = bh.state_lci_to_eci(epc, [1e7, 2e7, 3e7, 1.0, 2.0, 3.0])

See Also