Skip to content

SEZ Frame

rotation_ecef_to_sez builtin

rotation_ecef_to_sez(x_ecef: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Computes the rotation matrix transforming a vector in the Earth-Centered Earth-Fixed (ECEF) frame to the South, East, Zenith (SEZ) topocentric horizon frame of a site.

The SEZ frame follows the SANA definition: the local horizon is the fundamental plane, S points due south from the site, E points east, and Z points along the site's WGS84 geodetic vertical. The site is the position part of x_ecef. The E axis, and the frame's rate, are undefined at the poles, where longitude itself is undefined; this is not special-cased.

Parameters:

Name Type Description Default
x_ecef ndarray or list

6D state vector of the site in the ECEF 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)); only the position is used

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 ECEF to SEZ 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

r_site = bh.position_geodetic_to_ecef(np.array([30.0, 45.0, 500.0]), bh.AngleFormat.DEGREES)
x_site = np.array([r_site[0], r_site[1], r_site[2], 0.0, 0.0, 0.0])

R = bh.rotation_ecef_to_sez(x_site)
print(f"ECEF to SEZ rotation matrix:\n{R}")

rotation_sez_to_ecef builtin

rotation_sez_to_ecef(x_ecef: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Computes the rotation matrix transforming a vector in the South, East, Zenith (SEZ) topocentric horizon frame of a site to the Earth-Centered Earth-Fixed (ECEF) frame.

This is the transpose (inverse) of the ECEF-to-SEZ rotation matrix.

Parameters:

Name Type Description Default
x_ecef ndarray or list

6D state vector of the site in the ECEF 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)); only the position is used

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 SEZ to ECEF 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

r_site = bh.position_geodetic_to_ecef(np.array([30.0, 45.0, 500.0]), bh.AngleFormat.DEGREES)
x_site = np.array([r_site[0], r_site[1], r_site[2], 0.0, 0.0, 0.0])

R = bh.rotation_sez_to_ecef(x_site)
print(f"SEZ to ECEF rotation matrix:\n{R}")

omega_sez builtin

omega_sez(x_ecef: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Computes the angular velocity of a site's SEZ frame with respect to the ECEF frame, expressed in SEZ axes.

The SEZ axes depend only on the site's longitude and geodetic latitude, so the frame turns relative to ECEF only when the site moves: about the polar axis at the longitude rate and about the east axis at the latitude rate. A stationary site has zero rate. The rate relative to an inertial frame is this vector plus Earth's rotation rate rotated into SEZ, which the frame graph composes.

Parameters:

Name Type Description Default
x_ecef ndarray or list

6D state vector of the site in the ECEF 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 SEZ frame relative to ECEF, expressed in SEZ 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

r_site = bh.position_geodetic_to_ecef(np.array([30.0, 45.0, 500.0]), bh.AngleFormat.DEGREES)
x_site = np.array([r_site[0], r_site[1], r_site[2], 0.0, 0.0, 0.0])
omega = bh.omega_sez(x_site)

state_ecef_to_sez builtin

state_ecef_to_sez(x_site: Union[ndarray, Sequence], x_target: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms the absolute Earth-Centered Earth-Fixed (ECEF) states of a site and a target into the relative state of the target with respect to the site in the site's rotating SEZ frame.

Parameters:

Name Type Description Default
x_site ndarray or list

6D state vector of the site in the ECEF 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_target ndarray or list

6D state vector of the target in the ECEF 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 target with respect to the site in the SEZ frame [rho_S, rho_E, rho_Z, rho_dot_S, rho_dot_E, rho_dot_Z] (m, m/s), shape (6,), or the layout of the batched argument for batched input.

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

r_site = bh.position_geodetic_to_ecef(np.array([30.0, 45.0, 500.0]), bh.AngleFormat.DEGREES)
x_site = np.array([r_site[0], r_site[1], r_site[2], 0.0, 0.0, 0.0])
x_target = x_site + np.array([200e3, 300e3, 400e3, 0.0, 0.0, 0.0])

x_rel_sez = bh.state_ecef_to_sez(x_site, x_target)
print(f"Relative state in SEZ: {x_rel_sez}")

state_sez_to_ecef builtin

state_sez_to_ecef(x_site: Union[ndarray, Sequence], x_rel_sez: Union[ndarray, Sequence], axis: int = -1) -> ndarray

Transforms the relative state of a target with respect to a site from the site's rotating SEZ frame to the absolute state of the target in the Earth-Centered Earth-Fixed (ECEF) frame.

Parameters:

Name Type Description Default
x_site ndarray or list

6D state vector of the site in the ECEF 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_sez ndarray or list

6D relative state of the target with respect to the site in the SEZ frame [rho_S, rho_E, rho_Z, rho_dot_S, rho_dot_E, rho_dot_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 target in the ECEF frame [x, y, z, vx, vy, vz] (m, m/s), shape (6,), or the layout of the batched argument for batched input.

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

r_site = bh.position_geodetic_to_ecef(np.array([30.0, 45.0, 500.0]), bh.AngleFormat.DEGREES)
x_site = np.array([r_site[0], r_site[1], r_site[2], 0.0, 0.0, 0.0])
x_rel_sez = np.array([1000.0, 500.0, -300.0, 0.0, 0.0, 0.0])

x_target = bh.state_sez_to_ecef(x_site, x_rel_sez)
print(f"Target state in ECEF: {x_target}")

See Also