PQW Frame¶
rotation_pqw_to_eci builtin ¶
Computes the rotation matrix transforming a vector in the perifocal (PQW) frame to the Earth-Centered Inertial (ECI) frame. Equal to rotation_pqw_to_inertial_for_body with GM_EARTH.
The PQW frame follows the SANA definition: - P: Unit vector toward periapsis, along the eccentricity vector. - W: Unit vector along the orbital angular momentum (r x v). - Q: W x P, completing the right-handed set.
SANA registers PQW only as an 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.
Degenerate orbits use the zero-angle conventions: when the eccentricity vector norm is below 1e-9 (circular orbit) P is taken along the ascending node, and when the node vector norm is also below 1e-9 (equatorial orbit) P is taken along the inertial x axis projected into the orbit plane.
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 | 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 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming from PQW to ECI frame, shape (3, 3), or the batch dimensions followed by (3, 3) for batched input. |
rotation_pqw_to_inertial_for_body builtin ¶
rotation_pqw_to_inertial_for_body(x_inertial: Union[ndarray, Sequence], gm: float, axis: int = -1) -> ndarray
Computes the rotation matrix transforming a vector in the perifocal (PQW) frame to an inertial frame centered on a body with gravitational parameter gm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_inertial | ndarray or list | 6D state vector in the inertial frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or a batch of vectors with the 6 components along | required |
gm | float | Gravitational parameter of the central body (m^3/s^2) | 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 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming from PQW to the inertial frame, shape (3, 3), or the batch dimensions followed by (3, 3) for batched input. |
rotation_eci_to_pqw builtin ¶
Computes the rotation matrix transforming a vector in the Earth-Centered Inertial (ECI) frame to the perifocal (PQW) frame.
This is the transpose (inverse) of the PQW-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 | 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 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming from ECI to PQW frame, shape (3, 3), or the batch dimensions followed by (3, 3) for batched input. |
rotation_inertial_to_pqw_for_body builtin ¶
rotation_inertial_to_pqw_for_body(x_inertial: Union[ndarray, Sequence], gm: float, axis: int = -1) -> ndarray
Computes the rotation matrix transforming a vector in an inertial frame centered on a body with gravitational parameter gm to the perifocal (PQW) frame.
This is the transpose (inverse) of the PQW-to-inertial rotation matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_inertial | ndarray or list | 6D state vector in the inertial frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or a batch of vectors with the 6 components along | required |
gm | float | Gravitational parameter of the central body (m^3/s^2) | 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 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3x3 rotation matrix transforming from the inertial frame to PQW, shape (3, 3), or the batch dimensions followed by (3, 3) for batched input. |
state_eci_to_pqw builtin ¶
state_eci_to_pqw(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 perifocal (PQW) frame.
PQW is an 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 | 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 | 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 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 6D relative state of the deputy with respect to the chief in the PQW frame [rho_P, rho_Q, rho_W, rho_dot_P, rho_dot_Q, rho_dot_W] (m, m/s), shape (6,), or the layout of the batched argument for batched input. |
Example
state_inertial_to_pqw_for_body builtin ¶
state_inertial_to_pqw_for_body(x_chief: Union[ndarray, Sequence], x_deputy: Union[ndarray, Sequence], gm: float, axis: int = -1) -> ndarray
Transforms the absolute states of a chief and deputy satellite from an inertial frame centered on a body with gravitational parameter gm to the relative state of the deputy with respect to the chief in the perifocal (PQW) frame.
PQW is an inertial snapshot, so the relative velocity is a pure rotation of the inertial 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 inertial frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or a batch of vectors with the 6 components along | required |
x_deputy | ndarray or list | 6D state vector of the deputy satellite in the inertial frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or a batch of vectors with the 6 components along | required |
gm | float | Gravitational parameter of the central body (m^3/s^2) | 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 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 6D relative state of the deputy with respect to the chief in the PQW frame [rho_P, rho_Q, rho_W, rho_dot_P, rho_dot_Q, rho_dot_W] (m, m/s), shape (6,), or the layout of the batched argument for batched input. |
Example
state_pqw_to_eci builtin ¶
state_pqw_to_eci(x_chief: Union[ndarray, Sequence], x_rel_pqw: Union[ndarray, Sequence], axis: int = -1) -> ndarray
Transforms the relative state of a deputy satellite with respect to a chief satellite from the perifocal (PQW) frame to the absolute state of the deputy in the Earth-Centered Inertial (ECI) frame.
PQW is an inertial snapshot, so the deputy's ECI relative velocity is a pure rotation of the PQW 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 | required |
x_rel_pqw | ndarray or list | 6D relative state of the deputy with respect to the chief in the PQW frame [rho_P, rho_Q, rho_W, rho_dot_P, rho_dot_Q, rho_dot_W] (m, m/s), shape (6,), or a batch of vectors with the 6 components along | 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 |
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
state_pqw_to_inertial_for_body builtin ¶
state_pqw_to_inertial_for_body(x_chief: Union[ndarray, Sequence], x_rel_pqw: Union[ndarray, Sequence], gm: float, axis: int = -1) -> ndarray
Transforms the relative state of a deputy satellite with respect to a chief satellite from the perifocal (PQW) frame to the absolute state of the deputy in an inertial frame centered on a body with gravitational parameter gm.
PQW is an inertial snapshot, so the deputy's inertial relative velocity is a pure rotation of the PQW 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 inertial frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or a batch of vectors with the 6 components along | required |
x_rel_pqw | ndarray or list | 6D relative state of the deputy with respect to the chief in the PQW frame [rho_P, rho_Q, rho_W, rho_dot_P, rho_dot_Q, rho_dot_W] (m, m/s), shape (6,), or a batch of vectors with the 6 components along | required |
gm | float | Gravitational parameter of the central body (m^3/s^2) | 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 |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 6D state vector of the deputy satellite in the inertial frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or the layout of the batched argument for batched input. |