Skip to content

EQW Frame

rotation_eqw_to_eci builtin

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

Computes the rotation matrix transforming a vector in the equinoctial (EQW) frame to the Earth-Centered Inertial (ECI) frame.

The EQW frame follows the SANA definition: - E: Unit vector along the ascending node, z x h normalized, where z is the inertial pole and h the orbit normal. - W: Unit vector along the orbital angular momentum (r x v). - Q: W x E, completing the right-handed set.

SANA registers EQW only as a quasi-inertial snapshot: the axes are taken from the state at the evaluation epoch and treated as fixed, so there is no rate and the Jacobians are block diagonal. On an equatorial orbit the node is undefined (node vector norm below 1e-9) and E is taken along the inertial x axis projected into the orbit plane, matching the zero right-ascension convention while keeping the matrix orthonormal.

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 EQW 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])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.DEGREES)

R = bh.rotation_eqw_to_eci(state)
print(f"EQW to ECI rotation matrix:\n{R}")

rotation_eci_to_eqw builtin

rotation_eci_to_eqw(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 equinoctial (EQW) frame.

This is the transpose (inverse) of the EQW-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 EQW 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])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.DEGREES)

R = bh.rotation_eci_to_eqw(state)
print(f"ECI to EQW rotation matrix:\n{R}")

state_eci_to_eqw builtin

state_eci_to_eqw(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 equinoctial (EQW) frame.

EQW is a quasi-inertial snapshot, so the relative velocity is a pure rotation of the ECI relative velocity with no transport term.

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 of the deputy with respect to the chief in the EQW frame [rho_E, rho_Q, rho_W, rho_dot_E, rho_dot_Q, rho_dot_W] (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.001, 97.8, 15.0, 30.0, 45.0])
oe_deputy = np.array([bh.R_EARTH + 701e3, 0.0015, 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_eqw = bh.state_eci_to_eqw(x_chief, x_deputy)
print(f"Relative state in EQW: {x_rel_eqw}")

state_eqw_to_eci builtin

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

Transforms the relative state of a deputy satellite with respect to a chief satellite from the equinoctial (EQW) frame to the absolute state of the deputy in the Earth-Centered Inertial (ECI) frame.

EQW is a quasi-inertial snapshot, so the deputy's ECI relative velocity is a pure rotation of the EQW relative velocity with no transport term.

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_eqw ndarray or list

6D relative state of the deputy with respect to the chief in the EQW frame [rho_E, rho_Q, rho_W, rho_dot_E, rho_dot_Q, rho_dot_W] (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.001, 97.8, 15.0, 30.0, 45.0])
x_chief = bh.state_koe_to_eci(oe_chief, bh.AngleFormat.DEGREES)

x_rel_eqw = np.array([1000.0, 500.0, -300.0, 0.0, 0.0, 0.0])

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

See Also