Skip to content

GCRF ↔ MOD ↔ TOD Transformations

Equinox-based transformations between the Geocentric Celestial Reference Frame (GCRF), the Earth mean equator and equinox of date (MOD), the true equator and equinox of date (TOD), and the International Terrestrial Reference Frame (ITRF).

Note

For conceptual explanations and examples, see GCRF ↔ MOD ↔ TOD Transformations in the Learn section.

Building Blocks

bias_precession builtin

bias_precession(epc: Epoch, model: PrecessionNutationModel) -> ndarray

Computes the bias-precession matrix transforming the GCRF to the mean equator and equinox of date (MOD) on the given precession-nutation model: frame bias followed by precession from J2000.0 to date. Equivalent to rotation_gcrf_to_mod when model is the selected model.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for computation of the transformation matrix.

required
model PrecessionNutationModel

Precession-nutation model to evaluate.

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming GCRF -> MOD, shape (3, 3).

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
B = bh.bias_precession(epc, bh.PrecessionNutationModel.IAU2006A)

nutation builtin

nutation(epc: Epoch, model: PrecessionNutationModel) -> ndarray

Computes the nutation matrix transforming the mean equator and equinox of date (MOD) to the true equator and equinox of date (TOD) on the given precession-nutation model, with IERS celestial pole offset corrections. Equivalent to rotation_mod_to_tod when model is the selected model.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for computation of the transformation matrix.

required
model PrecessionNutationModel

Precession-nutation model to evaluate.

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming MOD -> TOD, shape (3, 3).

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
N = bh.nutation(epc, bh.PrecessionNutationModel.IAU2006A)

gast_rotation builtin

gast_rotation(epc: Epoch, model: PrecessionNutationModel) -> ndarray

Computes the Earth rotation matrix R3(GAST) transforming the true equator and equinox of date (TOD) to the Terrestrial Intermediate Reference System (TIRS), using Greenwich apparent sidereal time evaluated on the given precession-nutation model.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for computation of the transformation matrix.

required
model PrecessionNutationModel

Precession-nutation model to evaluate.

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming TOD -> TIRS, shape (3, 3).

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.gast_rotation(epc, bh.PrecessionNutationModel.IAU2006A)

GCRF ↔ MOD

rotation_gcrf_to_mod builtin

rotation_gcrf_to_mod(epc: Union[Epoch, Sequence[Epoch]]) -> ndarray

Computes the rotation matrix transforming the GCRF to the mean equator and equinox of date (MOD) using the bias-precession of the selected precession-nutation model (IAU 2006/2000A by default).

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 GCRF -> MOD, shape (3, 3) for a single epoch or (n, 3, 3) for a sequence of n epochs.

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.rotation_gcrf_to_mod(epc)

rotation_mod_to_gcrf builtin

rotation_mod_to_gcrf(epc: Union[Epoch, Sequence[Epoch]]) -> ndarray

Computes the rotation matrix transforming the mean equator and equinox of date (MOD) to the GCRF: the transpose of rotation_gcrf_to_mod.

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 MOD -> GCRF, shape (3, 3) for a single epoch or (n, 3, 3) for a sequence of n epochs.

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.rotation_mod_to_gcrf(epc)

position_gcrf_to_mod builtin

position_gcrf_to_mod(epc: Union[Epoch, Sequence[Epoch]], x: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a position vector from the GCRF to the mean equator and equinox of date (MOD). The position is rotated by rotation_gcrf_to_mod.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x ndarray or list

Position vector in GCRF frame (m), shape (3,), or a batch of vectors with the 3 components along axis (for example shape (n, 3)).

required
axis int

The axis of x along which the 3 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 3) the components lie along the last axis, so the default -1 applies; a (3, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in MOD frame (m), shape (3,) for a single input, or the batch layout of x (shape (n, 3) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
r_gcrf = np.array([7000000.0, 0.0, 0.0])
r_mod = bh.position_gcrf_to_mod(epc, r_gcrf)

position_mod_to_gcrf builtin

position_mod_to_gcrf(epc: Union[Epoch, Sequence[Epoch]], x: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a position vector from the mean equator and equinox of date (MOD) to the GCRF. The position is rotated by rotation_mod_to_gcrf.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x ndarray or list

Position vector in MOD frame (m), shape (3,), or a batch of vectors with the 3 components along axis (for example shape (n, 3)).

required
axis int

The axis of x along which the 3 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 3) the components lie along the last axis, so the default -1 applies; a (3, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in GCRF frame (m), shape (3,) for a single input, or the batch layout of x (shape (n, 3) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
r_mod = np.array([7000000.0, 0.0, 0.0])
r_gcrf = bh.position_mod_to_gcrf(epc, r_mod)

state_gcrf_to_mod builtin

state_gcrf_to_mod(epc: Union[Epoch, Sequence[Epoch]], x_gcrf: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a state vector (position and velocity) from the GCRF to the mean equator and equinox of date (MOD). Both halves are rotated by rotation_gcrf_to_mod; the frames are non-rotating relative to each other, below 1e-11 rad/s, under 1e-4 m/s in low Earth orbit.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x_gcrf ndarray or list

State vector in GCRF frame [position (m), velocity (m/s)], shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
axis int

The axis of x_gcrf along which the 6 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 6) the components lie along the last axis, so the default -1 applies; a (6, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: State vector in MOD frame [position (m), velocity (m/s)], shape (6,) for a single input, or the batch layout of x_gcrf (shape (n, 6) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_gcrf = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])
state_mod = bh.state_gcrf_to_mod(epc, state_gcrf)

state_mod_to_gcrf builtin

state_mod_to_gcrf(epc: Union[Epoch, Sequence[Epoch]], x_mod: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a state vector (position and velocity) from the mean equator and equinox of date (MOD) to the GCRF. Both halves are rotated by rotation_mod_to_gcrf; the frames are non-rotating relative to each other, below 1e-11 rad/s, under 1e-4 m/s in low Earth orbit.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x_mod ndarray or list

State vector in MOD frame [position (m), velocity (m/s)], shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
axis int

The axis of x_mod along which the 6 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 6) the components lie along the last axis, so the default -1 applies; a (6, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: State vector in GCRF frame [position (m), velocity (m/s)], shape (6,) for a single input, or the batch layout of x_mod (shape (n, 6) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_mod = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])
state_gcrf = bh.state_mod_to_gcrf(epc, state_mod)

MOD ↔ TOD

rotation_mod_to_tod builtin

rotation_mod_to_tod(epc: Union[Epoch, Sequence[Epoch]]) -> ndarray

Computes the rotation matrix transforming the mean equator and equinox of date (MOD) to the true equator and equinox of date (TOD) using the nutation series of the selected precession-nutation model (IAU 2006/2000A by default), with IERS celestial pole offset corrections.

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 MOD -> TOD, shape (3, 3) for a single epoch or (n, 3, 3) for a sequence of n epochs.

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.rotation_mod_to_tod(epc)

rotation_tod_to_mod builtin

rotation_tod_to_mod(epc: Union[Epoch, Sequence[Epoch]]) -> ndarray

Computes the rotation matrix transforming the true equator and equinox of date (TOD) to the mean equator and equinox of date (MOD): the transpose of rotation_mod_to_tod.

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 TOD -> MOD, shape (3, 3) for a single epoch or (n, 3, 3) for a sequence of n epochs.

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.rotation_tod_to_mod(epc)

position_mod_to_tod builtin

position_mod_to_tod(epc: Union[Epoch, Sequence[Epoch]], x: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a position vector from the mean equator and equinox of date (MOD) to the Earth true equator and equinox of date (TOD). The position is rotated by rotation_mod_to_tod.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x ndarray or list

Position vector in MOD frame (m), shape (3,), or a batch of vectors with the 3 components along axis (for example shape (n, 3)).

required
axis int

The axis of x along which the 3 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 3) the components lie along the last axis, so the default -1 applies; a (3, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in TOD frame (m), shape (3,) for a single input, or the batch layout of x (shape (n, 3) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
r_mod = np.array([7000000.0, 0.0, 0.0])
r_tod = bh.position_mod_to_tod(epc, r_mod)

position_tod_to_mod builtin

position_tod_to_mod(epc: Union[Epoch, Sequence[Epoch]], x: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a position vector from the Earth true equator and equinox of date (TOD) to the mean equator and equinox of date (MOD). The position is rotated by rotation_tod_to_mod.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x ndarray or list

Position vector in TOD frame (m), shape (3,), or a batch of vectors with the 3 components along axis (for example shape (n, 3)).

required
axis int

The axis of x along which the 3 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 3) the components lie along the last axis, so the default -1 applies; a (3, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in MOD frame (m), shape (3,) for a single input, or the batch layout of x (shape (n, 3) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
r_tod = np.array([7000000.0, 0.0, 0.0])
r_mod = bh.position_tod_to_mod(epc, r_tod)

state_mod_to_tod builtin

state_mod_to_tod(epc: Union[Epoch, Sequence[Epoch]], x_mod: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a state vector (position and velocity) from the mean equator and equinox of date (MOD) to the Earth true equator and equinox of date (TOD). Both halves are rotated by rotation_mod_to_tod; the frames are non-rotating relative to each other, below 1e-11 rad/s, under 1e-4 m/s in low Earth orbit.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x_mod ndarray or list

State vector in MOD frame [position (m), velocity (m/s)], shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
axis int

The axis of x_mod along which the 6 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 6) the components lie along the last axis, so the default -1 applies; a (6, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: State vector in TOD frame [position (m), velocity (m/s)], shape (6,) for a single input, or the batch layout of x_mod (shape (n, 6) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_mod = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])
state_tod = bh.state_mod_to_tod(epc, state_mod)

state_tod_to_mod builtin

state_tod_to_mod(epc: Union[Epoch, Sequence[Epoch]], x_tod: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a state vector (position and velocity) from the Earth true equator and equinox of date (TOD) to the mean equator and equinox of date (MOD). Both halves are rotated by rotation_tod_to_mod; the frames are non-rotating relative to each other, below 1e-11 rad/s, under 1e-4 m/s in low Earth orbit.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x_tod ndarray or list

State vector in TOD frame [position (m), velocity (m/s)], shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
axis int

The axis of x_tod along which the 6 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 6) the components lie along the last axis, so the default -1 applies; a (6, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: State vector in MOD frame [position (m), velocity (m/s)], shape (6,) for a single input, or the batch layout of x_tod (shape (n, 6) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_tod = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])
state_mod = bh.state_tod_to_mod(epc, state_tod)

GCRF ↔ TOD

rotation_gcrf_to_tod builtin

rotation_gcrf_to_tod(epc: Union[Epoch, Sequence[Epoch]]) -> ndarray

Computes the rotation matrix transforming the GCRF to the Earth true equator and equinox of date (TOD): bias-precession followed by nutation with IERS celestial pole offset corrections, on the selected precession-nutation model (IAU 2006/2000A by default).

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 GCRF -> TOD, shape (3, 3) for a single epoch or (n, 3, 3) for a sequence of n epochs.

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.rotation_gcrf_to_tod(epc)

rotation_tod_to_gcrf builtin

rotation_tod_to_gcrf(epc: Union[Epoch, Sequence[Epoch]]) -> ndarray

Computes the rotation matrix transforming the Earth true equator and equinox of date (TOD) to the GCRF: the transpose of rotation_gcrf_to_tod.

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 TOD -> GCRF, shape (3, 3) for a single epoch or (n, 3, 3) for a sequence of n epochs.

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.rotation_tod_to_gcrf(epc)

position_gcrf_to_tod builtin

position_gcrf_to_tod(epc: Union[Epoch, Sequence[Epoch]], x: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a position vector from the GCRF to the Earth true equator and equinox of date (TOD). The position is rotated by rotation_gcrf_to_tod.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x ndarray or list

Position vector in GCRF frame (m), shape (3,), or a batch of vectors with the 3 components along axis (for example shape (n, 3)).

required
axis int

The axis of x along which the 3 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 3) the components lie along the last axis, so the default -1 applies; a (3, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in TOD frame (m), shape (3,) for a single input, or the batch layout of x (shape (n, 3) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
r_gcrf = np.array([7000000.0, 0.0, 0.0])
r_tod = bh.position_gcrf_to_tod(epc, r_gcrf)

position_tod_to_gcrf builtin

position_tod_to_gcrf(epc: Union[Epoch, Sequence[Epoch]], x: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a position vector from the Earth true equator and equinox of date (TOD) to the GCRF. The position is rotated by rotation_tod_to_gcrf.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x ndarray or list

Position vector in TOD frame (m), shape (3,), or a batch of vectors with the 3 components along axis (for example shape (n, 3)).

required
axis int

The axis of x along which the 3 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 3) the components lie along the last axis, so the default -1 applies; a (3, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in GCRF frame (m), shape (3,) for a single input, or the batch layout of x (shape (n, 3) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
r_tod = np.array([7000000.0, 0.0, 0.0])
r_gcrf = bh.position_tod_to_gcrf(epc, r_tod)

state_gcrf_to_tod builtin

state_gcrf_to_tod(epc: Union[Epoch, Sequence[Epoch]], x_gcrf: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a state vector (position and velocity) from the GCRF to the Earth true equator and equinox of date (TOD). Both halves are rotated by rotation_gcrf_to_tod; the frames are non-rotating relative to each other, below 1e-11 rad/s, under 1e-4 m/s in low Earth orbit.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x_gcrf ndarray or list

State vector in GCRF frame [position (m), velocity (m/s)], shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
axis int

The axis of x_gcrf along which the 6 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 6) the components lie along the last axis, so the default -1 applies; a (6, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: State vector in TOD frame [position (m), velocity (m/s)], shape (6,) for a single input, or the batch layout of x_gcrf (shape (n, 6) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_gcrf = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])
state_tod = bh.state_gcrf_to_tod(epc, state_gcrf)

state_tod_to_gcrf builtin

state_tod_to_gcrf(epc: Union[Epoch, Sequence[Epoch]], x_tod: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a state vector (position and velocity) from the Earth true equator and equinox of date (TOD) to the GCRF. Both halves are rotated by rotation_tod_to_gcrf; the frames are non-rotating relative to each other, below 1e-11 rad/s, under 1e-4 m/s in low Earth orbit.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x_tod ndarray or list

State vector in TOD frame [position (m), velocity (m/s)], shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
axis int

The axis of x_tod along which the 6 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 6) the components lie along the last axis, so the default -1 applies; a (6, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: State vector in GCRF frame [position (m), velocity (m/s)], shape (6,) for a single input, or the batch layout of x_tod (shape (n, 6) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_tod = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])
state_gcrf = bh.state_tod_to_gcrf(epc, state_tod)

TOD ↔ ITRF

rotation_tod_to_itrf builtin

rotation_tod_to_itrf(epc: Union[Epoch, Sequence[Epoch]]) -> ndarray

Computes the rotation matrix transforming the Earth true equator and equinox of date (TOD) to the ITRF: polar motion applied after the Greenwich apparent sidereal rotation, W R3(GAST).

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 TOD -> ITRF, shape (3, 3) for a single epoch or (n, 3, 3) for a sequence of n epochs.

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.rotation_tod_to_itrf(epc)

rotation_itrf_to_tod builtin

rotation_itrf_to_tod(epc: Union[Epoch, Sequence[Epoch]]) -> ndarray

Computes the rotation matrix transforming the ITRF to the Earth true equator and equinox of date (TOD): the transpose of rotation_tod_to_itrf.

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 ITRF -> TOD, shape (3, 3) for a single epoch or (n, 3, 3) for a sequence of n epochs.

Example
1
2
3
4
5
import brahe as bh

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
R = bh.rotation_itrf_to_tod(epc)

position_tod_to_itrf builtin

position_tod_to_itrf(epc: Union[Epoch, Sequence[Epoch]], x: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a position vector from the Earth true equator and equinox of date (TOD) to the ITRF. Applies the Earth-rotation and polar-motion rotation W R3(GAST).

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x ndarray or list

Position vector in TOD frame (m), shape (3,), or a batch of vectors with the 3 components along axis (for example shape (n, 3)).

required
axis int

The axis of x along which the 3 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 3) the components lie along the last axis, so the default -1 applies; a (3, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in ITRF frame (m), shape (3,) for a single input, or the batch layout of x (shape (n, 3) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
r_tod = np.array([7000000.0, 0.0, 0.0])
r_itrf = bh.position_tod_to_itrf(epc, r_tod)

position_itrf_to_tod builtin

position_itrf_to_tod(epc: Union[Epoch, Sequence[Epoch]], x: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a position vector from the ITRF to the Earth true equator and equinox of date (TOD). Applies the transpose of the Earth-rotation and polar-motion rotation W R3(GAST).

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x ndarray or list

Position vector in ITRF frame (m), shape (3,), or a batch of vectors with the 3 components along axis (for example shape (n, 3)).

required
axis int

The axis of x along which the 3 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 3) the components lie along the last axis, so the default -1 applies; a (3, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in TOD frame (m), shape (3,) for a single input, or the batch layout of x (shape (n, 3) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
r_itrf = np.array([4000000.0, 3000000.0, 4000000.0])
r_tod = bh.position_itrf_to_tod(epc, r_itrf)

state_tod_to_itrf builtin

state_tod_to_itrf(epc: Union[Epoch, Sequence[Epoch]], x_tod: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a state vector (position and velocity) from the Earth true equator and equinox of date (TOD) to the ITRF. Accounts for the transport term from Earth's rotation, so the ITRF velocity is not simply a rotated TOD velocity.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x_tod ndarray or list

State vector in TOD frame [position (m), velocity (m/s)], shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
axis int

The axis of x_tod along which the 6 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 6) the components lie along the last axis, so the default -1 applies; a (6, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: State vector in ITRF frame [position (m), velocity (m/s)], shape (6,) for a single input, or the batch layout of x_tod (shape (n, 6) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_tod = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])
state_itrf = bh.state_tod_to_itrf(epc, state_tod)

state_itrf_to_tod builtin

state_itrf_to_tod(epc: Union[Epoch, Sequence[Epoch]], x_itrf: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms a state vector (position and velocity) from the ITRF to the Earth true equator and equinox of date (TOD). Accounts for the transport term from Earth's rotation, so the TOD velocity is not simply a rotated ITRF velocity.

Parameters:

Name Type Description Default
epc Epoch or Sequence[Epoch]

Epoch instant for the transformation. A sequence evaluates one epoch per vector (or broadcasts a single vector across all epochs).

required
x_itrf ndarray or list

State vector in ITRF frame [position (m), velocity (m/s)], shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
axis int

The axis of x_itrf along which the 6 components of a single vector lie; the remaining axes enumerate the batch. For a batch of shape (n, 6) the components lie along the last axis, so the default -1 applies; a (6, n) column layout uses axis=0.

-1

Returns:

Type Description
ndarray

numpy.ndarray: State vector in TOD frame [position (m), velocity (m/s)], shape (6,) for a single input, or the batch layout of x_itrf (shape (n, 6) for a single vector with a sequence of n epochs).

Example
1
2
3
4
5
6
7
import brahe as bh
import numpy as np

bh.initialize_eop()
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_itrf = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])
state_tod = bh.state_itrf_to_tod(epc, state_itrf)

See Also