Skip to content

Mean Elements

Functions for converting between mean and osculating Keplerian orbital elements using first-order Brouwer-Lyddane theory.

state_koe_osc_to_mean builtin

state_koe_osc_to_mean(osc: ndarray, angle_format: AngleFormat) -> ndarray

Convert osculating Keplerian elements to mean Keplerian elements.

Applies the first-order Brouwer-Lyddane transformation to convert osculating (instantaneous) orbital elements to mean (orbit-averaged) elements. The transformation accounts for short-period and long-period J2 perturbations.

Parameters:

Name Type Description Default
osc ndarray

Osculating Keplerian elements as a 6-element array: [a, e, i, Ω, ω, M] where: - a: Semi-major axis (meters) - e: Eccentricity (dimensionless) - i: Inclination (radians or degrees, per angle_format) - Ω: Right ascension of ascending node (radians or degrees, per angle_format) - ω: Argument of perigee (radians or degrees, per angle_format) - M: Mean anomaly (radians or degrees, per angle_format)

required
angle_format AngleFormat

Format of angular elements (Radians or Degrees)

required

Returns:

Type Description
ndarray

numpy.ndarray: Mean Keplerian elements in the same format as input.

Note

The forward and inverse transformations are not perfectly inverse due to first-order truncation of the infinite series. Small errors of order J2² are expected.

Example
import brahe as bh
import numpy as np

# Define osculating elements for a LEO satellite (angles in degrees)
osc = np.array([
    bh.R_EARTH + 500e3,  # a = 6878 km
    0.001,               # e = 0.001 (near-circular)
    45.0,                # i = 45 degrees
    0.0,                 # Ω = 0
    0.0,                 # ω = 0
    0.0,                 # M = 0
])

mean = bh.state_koe_osc_to_mean(osc, bh.AngleFormat.DEGREES)

state_koe_mean_to_osc builtin

state_koe_mean_to_osc(mean: ndarray, angle_format: AngleFormat) -> ndarray

Convert mean Keplerian elements to osculating Keplerian elements.

Applies the first-order Brouwer-Lyddane transformation to convert mean (orbit-averaged) orbital elements to osculating (instantaneous) elements. The transformation accounts for short-period and long-period J2 perturbations.

Parameters:

Name Type Description Default
mean ndarray

Mean Keplerian elements as a 6-element array: [a, e, i, Ω, ω, M] where: - a: Semi-major axis (meters) - e: Eccentricity (dimensionless) - i: Inclination (radians or degrees, per angle_format) - Ω: Right ascension of ascending node (radians or degrees, per angle_format) - ω: Argument of perigee (radians or degrees, per angle_format) - M: Mean anomaly (radians or degrees, per angle_format)

required
angle_format AngleFormat

Format of angular elements (Radians or Degrees)

required

Returns:

Type Description
ndarray

numpy.ndarray: Osculating Keplerian elements in the same format as input.

Note

The forward and inverse transformations are not perfectly inverse due to first-order truncation of the infinite series. Small errors of order J2² are expected.

Example
import brahe as bh
import numpy as np

# Define mean elements for a LEO satellite (angles in degrees)
mean = np.array([
    bh.R_EARTH + 500e3,  # a = 6878 km
    0.001,               # e = 0.001 (near-circular)
    45.0,                # i = 45 degrees
    0.0,                 # Ω = 0
    0.0,                 # ω = 0
    0.0,                 # M = 0
])

osc = bh.state_koe_mean_to_osc(mean, bh.AngleFormat.DEGREES)