Skip to content

Equinoctial Elements

Functions for converting between Keplerian and equinoctial orbital elements. Equinoctial elements [a, h, k, p, q, l] are free of the zero-eccentricity singularity of the classical elements (where \(\Omega\) and \(\omega\) become ill-defined), which makes them convenient for averaging and numerical differencing.

The formulation is a two-chart one selected by the retrograde factor fr, which must be either +1 or -1 (other values, including 0, are invalid): fr = +1 is regular for direct orbits and remains well-defined up to (but not including) \(i = 180°\), while fr = -1 is regular for retrograde orbits near \(i = 180°\) and is singular at \(i = 0°\). Use fr = +1 unless working with near-retrograde orbits.

Note

For conceptual background, see Mean Elements in the User Guide, where equinoctial elements are used internally by numerical windowed averaging.

state_koe_to_equinoctial builtin

state_koe_to_equinoctial(koe: Union[ndarray, Sequence], angle_format: AngleFormat, fr: int = 1, axis: int = -1) -> ndarray

Convert Keplerian elements to equinoctial elements (Vallado 2-99).

Parameters:

Name Type Description Default
koe ndarray or list

Keplerian [a, e, i, Ω, ω, M] (a in meters; angles per angle_format). Also accepts a batch of element sets with the 6 components along axis (for example shape (n, 6)).

required
angle_format AngleFormat

Format of angular inputs/outputs.

required
fr int

Retrograde factor, +1 for direct orbits, -1 for near-retrograde. Defaults to 1.

1
axis int

The axis of koe along which the 6 element 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: Equinoctial [a, h, k, p, q, l] (a in meters; l per angle_format). For batched input the output takes the batch layout of koe.

Example
1
2
3
import brahe as bh, numpy as np
koe = np.array([bh.R_EARTH + 500e3, 0.01, 45.0, 30.0, 60.0, 90.0])
eqn = bh.state_koe_to_equinoctial(koe, bh.AngleFormat.DEGREES)

state_equinoctial_to_koe builtin

state_equinoctial_to_koe(eqn: Union[ndarray, Sequence], angle_format: AngleFormat, fr: int = 1, axis: int = -1) -> ndarray

Convert equinoctial elements to Keplerian elements (Vallado 2-99).

Parameters:

Name Type Description Default
eqn ndarray or list

Equinoctial [a, h, k, p, q, l] (a in meters; l per angle_format). Also accepts a batch of element sets with the 6 components along axis (for example shape (n, 6)).

required
angle_format AngleFormat

Format of angular input/outputs.

required
fr int

Retrograde factor matching the forward conversion. Defaults to 1.

1
axis int

The axis of eqn along which the 6 element 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: Keplerian [a, e, i, Ω, ω, M] (a in meters; angles per angle_format). For batched input the output takes the batch layout of eqn.

Example
1
2
3
4
import brahe as bh, numpy as np
koe = np.array([bh.R_EARTH + 500e3, 0.01, 45.0, 30.0, 60.0, 90.0])
eqn = bh.state_koe_to_equinoctial(koe, bh.AngleFormat.DEGREES)
back = bh.state_equinoctial_to_koe(eqn, bh.AngleFormat.DEGREES)

See Also