Skip to content

LVLH Frame

rotation_lvlh_to_eci builtin

rotation_lvlh_to_eci(x_eci: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Computes the rotation matrix transforming a vector in the Local-Vertical Local-Horizontal (LVLH) frame to the Earth-Centered Inertial (ECI) frame.

The ECI frame can be any inertial frame centered on the orbited body, such as GCRF or EME2000.

The LVLH frame follows the CCSDS and SANA definition: - Z: Unit vector collinear with and opposite to the position vector (nadir). - Y: Unit vector collinear with and opposite to the orbital angular momentum r x v. - X: Y x Z, completing the right-handed set (the RTN along-track axis, along the velocity for a circular orbit).

This is a signed permutation of the RTN axes: X = T, Y = -N, Z = -R. Vallado and STK use the name LVLH for the RTN axes themselves; brahe follows the CCSDS convention.

Parameters:

Name Type Description Default
x_eci ndarray or list

6D state vector in the ECI frame [x, y, z, vx, vy, vz] (m, 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 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: 3x3 rotation matrix transforming from LVLH to ECI frame, shape (3, 3), or the batch dimensions followed by (3, 3) for batched input.

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

oe = np.array([bh.R_EARTH + 700e3, 0.01, 97.8, 15.0, 30.0, 45.0])
x_eci = bh.state_koe_to_eci(oe, bh.AngleFormat.DEGREES)

R = bh.rotation_lvlh_to_eci(x_eci)
print(f"LVLH to ECI rotation matrix:\n{R}")

rotation_eci_to_lvlh builtin

rotation_eci_to_lvlh(x_eci: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Computes the rotation matrix transforming a vector in the Earth-Centered Inertial (ECI) frame to the Local-Vertical Local-Horizontal (LVLH) frame.

This is the transpose (inverse) of the LVLH-to-ECI rotation matrix.

Parameters:

Name Type Description Default
x_eci ndarray or list

6D state vector in the ECI frame [x, y, z, vx, vy, vz] (m, 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 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: 3x3 rotation matrix transforming from ECI to LVLH frame, shape (3, 3), or the batch dimensions followed by (3, 3) for batched input.

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

oe = np.array([bh.R_EARTH + 700e3, 0.01, 97.8, 15.0, 30.0, 45.0])
x_eci = bh.state_koe_to_eci(oe, bh.AngleFormat.DEGREES)

R = bh.rotation_eci_to_lvlh(x_eci)
print(f"ECI to LVLH rotation matrix:\n{R}")

omega_lvlh builtin

omega_lvlh(x_eci: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Computes the angular velocity of the Local-Vertical Local-Horizontal (LVLH) frame with respect to the Earth-Centered Inertial (ECI) frame, expressed in LVLH axes.

The LVLH frame rotates about the orbit normal at the true-anomaly rate f_dot = |r x v| / r^2. The orbit normal is the negative LVLH Y axis, so the angular velocity is [0, -f_dot, 0].

Parameters:

Name Type Description Default
x_eci ndarray or list

6D state vector in the ECI frame [x, y, z, vx, vy, vz] (m, 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 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: Angular velocity of the LVLH frame relative to ECI, expressed in LVLH axes (rad/s), shape (3,), or the batch dimensions with 3 components along axis for batched input.

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

oe = np.array([bh.R_EARTH + 700e3, 0.01, 97.8, 15.0, 30.0, 45.0])
x_eci = bh.state_koe_to_eci(oe, bh.AngleFormat.DEGREES)
omega = bh.omega_lvlh(x_eci)

state_eci_to_lvlh builtin

state_eci_to_lvlh(x_chief: Union[ndarray, Sequence], x_deputy: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms the absolute states of a chief and deputy satellite from the Earth-Centered Inertial (ECI) frame to the relative state of the deputy with respect to the chief in the rotating Local-Vertical Local-Horizontal (LVLH) frame.

Parameters:

Name Type Description Default
x_chief ndarray or list

6D state vector of the chief satellite in the ECI frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
x_deputy ndarray or list

6D state vector of the deputy satellite in the ECI frame [x, y, z, vx, vy, vz] (m, 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 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. A single vector in one argument is broadcast across a batch in the other.

-1

Returns:

Type Description
ndarray

numpy.ndarray: 6D relative state vector of the deputy with respect to the chief in the LVLH frame [ρ_X, ρ_Y, ρ_Z, ρ̇_X, ρ̇_Y, ρ̇_Z] (m, m/s), shape (6,), or the layout of the batched argument for batched input.

Example
import brahe as bh
import numpy as np

bh.initialize_eop()

oe_chief = np.array([bh.R_EARTH + 700e3, 0.01, 97.8, 15.0, 30.0, 45.0])
oe_deputy = np.array([bh.R_EARTH + 701e3, 0.0115, 97.85, 15.05, 30.05, 45.05])

x_chief = bh.state_koe_to_eci(oe_chief, bh.AngleFormat.DEGREES)
x_deputy = bh.state_koe_to_eci(oe_deputy, bh.AngleFormat.DEGREES)

x_rel_lvlh = bh.state_eci_to_lvlh(x_chief, x_deputy)
print(f"Relative state in LVLH: {x_rel_lvlh}")

state_lvlh_to_eci builtin

state_lvlh_to_eci(x_chief: Union[ndarray, Sequence], x_rel_lvlh: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms the relative state of a deputy satellite with respect to a chief satellite from the rotating Local-Vertical Local-Horizontal (LVLH) frame to the absolute state of the deputy in the Earth-Centered Inertial (ECI) frame.

Parameters:

Name Type Description Default
x_chief ndarray or list

6D state vector of the chief satellite in the ECI frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or a batch of vectors with the 6 components along axis (for example shape (n, 6)).

required
x_rel_lvlh ndarray or list

6D relative state vector of the deputy with respect to the chief in the LVLH frame [ρ_X, ρ_Y, ρ_Z, ρ̇_X, ρ̇_Y, ρ̇_Z] (m, 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 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. A single vector in one argument is broadcast across a batch in the other.

-1

Returns:

Type Description
ndarray

numpy.ndarray: 6D state vector of the deputy satellite in the ECI frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or the layout of the batched argument for batched input.

Example
import brahe as bh
import numpy as np

bh.initialize_eop()

oe_chief = np.array([bh.R_EARTH + 700e3, 0.01, 97.8, 15.0, 30.0, 45.0])
x_chief = bh.state_koe_to_eci(oe_chief, bh.AngleFormat.DEGREES)

# Relative state: 1km X, 0.5km Y, -0.3km Z
x_rel_lvlh = np.array([1000.0, 500.0, -300.0, 0.0, 0.0, 0.0])

x_deputy = bh.state_lvlh_to_eci(x_chief, x_rel_lvlh)
print(f"Deputy state in ECI: {x_deputy}")

See Also