Skip to content

SGP Propagator

The SGP4/SDP4 propagator for satellite orbit propagation using Two-Line Element (TLE) data. The SGP (Simplified General Perturbations) propagator implements the SGP4/SDP4 models for propagating satellites using TLE orbital data. This is the standard model used for tracking objects in Earth orbit and is maintained by NORAD/Space Force.

Key Features: - Industry-standard orbit propagation - Atmospheric drag modeling - Automatic selection between SGP4 (near-Earth) and SDP4 (deep-space) models - Compatible with standard TLE format

Module: brahe.orbits

Example Usage

import brahe as bh

# ISS TLE data (example)
line1 = "1 25544U 98067A   24001.50000000  .00016717  00000-0  30000-3 0  9005"
line2 = "2 25544  51.6400 150.0000 0003000 100.0000 260.0000 15.50000000300000"

# Create propagator from TLE
prop = bh.SGPPropagator.from_tle(line1, line2)

# Get current epoch
epoch = prop.epoch()

# Propagate to a specific time
future_epoch = epoch + 3600.0  # 1 hour later
state = prop.propagate(future_epoch)  # Returns [x, y, z, vx, vy, vz] in TEME frame

# Propagate to multiple times
import numpy as np
times = np.linspace(0, 86400, 100)  # 1 day in 100 steps
epochs = [epoch + dt for dt in times]
states = prop.propagate_multiple(epochs)  # Returns array of states

Class Reference

SGPPropagator

SGPPropagator()

SGP4/SDP4 satellite propagator using TLE data.

The SGP (Simplified General Perturbations) propagator implements the SGP4/SDP4 models for propagating satellites using Two-Line Element (TLE) orbital data. This is the standard model used for tracking objects in Earth orbit.

Note

This class is created via class methods, not direct instantiation. Use SGPPropagator.from_tle() or SGPPropagator.from_elements().

Attributes:

Name Type Description
current_epoch Epoch

Current propagation time

initial_epoch Epoch

TLE epoch

step_size float

Current step size in seconds

norad_id int

NORAD catalog ID

satellite_name str or None

Satellite name if available

trajectory OrbitTrajectory

Accumulated trajectory states

Example
import brahe as bh

# ISS TLE data (example)
line1 = "1 25544U 98067A   24001.50000000  .00016717  00000-0  30000-3 0  9005"
line2 = "2 25544  51.6400 150.0000 0003000 100.0000 260.0000 15.50000000300000"

# Create propagator
prop = bh.SGPPropagator.from_tle(line1, line2, step_size=60.0)

# Propagate to a specific epoch
epc = bh.Epoch.from_datetime(2024, 1, 2, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
state_eci = prop.state(epc)
print(f"Position: {state_eci[:3]}")
print(f"Velocity: {state_eci[3:]}")

# Propagate multiple epochs
epochs = [epc + i*60.0 for i in range(10)]  # 10 minutes
states = prop.states(epochs)

Initialize instance.

arg_perigee property

arg_perigee: float

Get argument of periapsis at TLE epoch.

Returns:

Name Type Description
float float

Argument of periapsis in degrees.

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

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

argp = prop.arg_perigee
print(f"Argument of periapsis: {argp:.4f} deg")

current_epoch property

current_epoch: Epoch

Get current epoch.

Returns:

Name Type Description
Epoch Epoch

Current propagator epoch.

Example
1
2
3
4
5
6
7
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
propagator = bh.SGPPropagator.from_tle(line1, line2)
propagator.step()
print(f"Current epoch: {propagator.current_epoch}")

eccentricity property

eccentricity: float

Get eccentricity at TLE epoch.

Returns:

Name Type Description
float float

Eccentricity (dimensionless).

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

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

ecc = prop.eccentricity
print(f"Eccentricity: {ecc:.6f}")

ephemeris_age property

ephemeris_age: float

Get age of ephemeris data (time since TLE epoch).

Returns:

Name Type Description
float float

Time since TLE epoch in seconds.

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

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

age = prop.ephemeris_age
print(f"Ephemeris age: {age:.1f} s")

epoch property

epoch: Epoch

Get TLE epoch.

Returns:

Name Type Description
Epoch Epoch

Epoch of the TLE data.

inclination property

inclination: float

Get inclination at TLE epoch.

Returns:

Name Type Description
float float

Inclination in degrees.

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

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

inc = prop.inclination
print(f"Inclination: {inc:.4f} deg")

line1 property

line1: str

Get TLE line 1.

Returns:

Name Type Description
str str

First line of the TLE.

Example
1
2
3
4
5
6
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
propagator = bh.SGPPropagator.from_tle(line1, line2)
print(propagator.line1)

line2 property

line2: str

Get TLE line 2.

Returns:

Name Type Description
str str

Second line of the TLE.

Example
1
2
3
4
5
6
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
propagator = bh.SGPPropagator.from_tle(line1, line2)
print(propagator.line2)

mean_anomaly property

mean_anomaly: float

Get mean anomaly at TLE epoch.

Returns:

Name Type Description
float float

Mean anomaly in degrees.

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

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

ma = prop.mean_anomaly
print(f"Mean anomaly: {ma:.4f} deg")

norad_id property

norad_id: int

Get NORAD ID.

Returns:

Name Type Description
int int

NORAD catalog ID.

right_ascension property

right_ascension: float

Get right ascension of ascending node at TLE epoch.

Returns:

Name Type Description
float float

Right ascension of ascending node (RAAN) in degrees.

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

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

raan = prop.right_ascension
print(f"RAAN: {raan:.4f} deg")

satellite_name property

satellite_name: str

Get satellite name (if available).

Returns:

Type Description
str

str or None: Satellite name if provided.

Example
1
2
3
4
5
6
7
import brahe as bh

name = "ISS (ZARYA)"
line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
propagator = bh.SGPPropagator.from_3le(name, line1, line2)
print(f"Satellite: {propagator.satellite_name}")

semi_major_axis property

semi_major_axis: float

Get semi-major axis at TLE epoch.

Returns:

Name Type Description
float float

Semi-major axis in meters.

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

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

sma = prop.semi_major_axis
print(f"Semi-major axis: {sma:.3f} m")

step_size property

step_size: float

Get step size in seconds.

Returns:

Name Type Description
float float

Step size in seconds.

Example
1
2
3
4
5
6
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
propagator = bh.SGPPropagator.from_tle(line1, line2)
print(f"Step size: {propagator.step_size} seconds")

terminated property

terminated: bool

Check if propagation was terminated by an event.

Returns:

Name Type Description
bool bool

True if propagation was stopped by a terminal event.

trajectory property

trajectory: SOrbitTrajectory

Get accumulated trajectory.

Returns:

Name Type Description
OrbitalTrajectory SOrbitTrajectory

The accumulated trajectory.

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

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2)
prop.propagate_steps(100)
traj = prop.trajectory
print(f"Trajectory has {traj.len()} states")

add_event_detector method descriptor

Add an event detector to the propagator.

Supported event types: - TimeEvent: Triggers at a specific epoch - AscendingNodeEvent: Triggers at ascending node crossings - DescendingNodeEvent: Triggers at descending node crossings - AltitudeEvent: Triggers at altitude crossings - And other orbital element events (SemiMajorAxis, Eccentricity, etc.)

Note

Custom ValueEvent and BinaryEvent with Python callbacks are not supported for SGPPropagator. Use NumericalOrbitPropagator for custom event functions.

Parameters:

Name Type Description Default
event TimeEvent | AscendingNodeEvent | DescendingNodeEvent | AltitudeEvent | AOIEntryEvent | AOIExitEvent

Event detector to add

required
Example
import brahe as bh

prop = bh.SGPPropagator.from_tle(line1, line2)

# Add time event
epoch = prop.epoch
event = bh.TimeEvent(epoch + 1800.0, "30 Min Mark")
prop.add_event_detector(event)

# Add node crossing event
asc_node = bh.AscendingNodeEvent("Ascending Node")
prop.add_event_detector(asc_node)

# Propagate and check events
prop.propagate_to(epoch + 6000.0)
for e in prop.event_log():
    print(f"{e.name}: {e.window_open}")

clear_events method descriptor

clear_events() -> Any

Clear all events from the event log.

current_state method descriptor

current_state() -> ndarray

Get current state vector.

Returns:

Type Description
ndarray

numpy.ndarray: Current state vector in the propagator's output format.

event_log method descriptor

event_log() -> list[DetectedEvent]

Get all detected events from the event log.

Returns:

Type Description
list[DetectedEvent]

list[DetectedEvent]: List of all detected events.

Example
import brahe as bh

prop = bh.SGPPropagator.from_tle(line1, line2)
event = bh.AscendingNodeEvent("Asc Node")
prop.add_event_detector(event)

prop.propagate_to(prop.epoch + 6000.0)

for e in prop.event_log():
    print(f"{e.name} at {e.window_open}")

events_by_name method descriptor

events_by_name(name: str) -> list[DetectedEvent]

Get events filtered by name.

Parameters:

Name Type Description Default
name str

Exact event name to match.

required

Returns:

Type Description
list[DetectedEvent]

list[DetectedEvent]: Events matching the name.

events_in_range method descriptor

events_in_range(start: Epoch, end: Epoch) -> list[DetectedEvent]

Get events within a time range.

Parameters:

Name Type Description Default
start Epoch

Start of time range.

required
end Epoch

End of time range.

required

Returns:

Type Description
list[DetectedEvent]

list[DetectedEvent]: Events within the range.

from_3le builtin

from_3le(name: str, line1: str, line2: str, step_size: float = 60.0) -> SGPPropagator

Create a new SGP propagator from 3-line TLE format (with satellite name).

Parameters:

Name Type Description Default
name str

Satellite name (line 0).

required
line1 str

First line of TLE data.

required
line2 str

Second line of TLE data.

required
step_size float

Step size in seconds for propagation. Defaults to 60.0.

60.0

Returns:

Name Type Description
SGPPropagator SGPPropagator

New SGP propagator instance.

from_omm_elements builtin

from_omm_elements(epoch: str, mean_motion: float, eccentricity: float, inclination: float, raan: float, arg_of_pericenter: float, mean_anomaly: float, norad_id: int, step_size: float = 60.0, object_name: Union[str, None] = None, object_id: Union[str, None] = None, classification: Union[str, None] = None, bstar: Union[float, None] = None, mean_motion_dot: Union[float, None] = None, mean_motion_ddot: Union[float, None] = None, ephemeris_type: Union[int, None] = None, element_set_no: Union[int, None] = None, rev_at_epoch: Union[int, None] = None) -> SGPPropagator

Create a new SGP propagator from CCSDS OMM (Orbit Mean-elements Message) fields.

This method directly constructs an SGP4 propagator from OMM orbital elements, bypassing TLE parsing. It creates synthetic TLE lines for API consistency.

Parameters:

Name Type Description Default
epoch str

ISO 8601 datetime string (e.g., "2025-11-29T20:01:44.058144").

required
mean_motion float

Mean motion in revolutions per day.

required
eccentricity float

Orbital eccentricity (dimensionless).

required
inclination float

Orbital inclination in degrees.

required
raan float

Right ascension of ascending node in degrees.

required
arg_of_pericenter float

Argument of pericenter in degrees.

required
mean_anomaly float

Mean anomaly in degrees.

required
norad_id int

NORAD catalog ID.

required
step_size float

Step size in seconds for propagation. Defaults to 60.0.

60.0
object_name str or None

Satellite name (OBJECT_NAME). Defaults to None.

None
object_id str or None

International designator (OBJECT_ID). Defaults to None.

None
classification str or None

Classification character ('U', 'C', or 'S'). Defaults to 'U'.

None
bstar float or None

B* drag term. Defaults to 0.0.

None
mean_motion_dot float or None

First derivative of mean motion / 2. Defaults to 0.0.

None
mean_motion_ddot float or None

Second derivative of mean motion / 6. Defaults to 0.0.

None
ephemeris_type int or None

Ephemeris type (usually 0). Defaults to 0.

None
element_set_no int or None

Element set number. Defaults to 999.

None
rev_at_epoch int or None

Revolution number at epoch. Defaults to 0.

None

Returns:

Name Type Description
SGPPropagator SGPPropagator

New SGP propagator instance.

Example
import brahe as bh

# ISS OMM data
prop = bh.SGPPropagator.from_omm_elements(
    epoch="2025-11-29T20:01:44.058144",
    mean_motion=15.49193835,
    eccentricity=0.0003723,
    inclination=51.6312,
    raan=206.3646,
    arg_of_pericenter=184.1118,
    mean_anomaly=175.9840,
    norad_id=25544,
    object_name="ISS (ZARYA)",
    object_id="1998-067A",
    bstar=0.15237e-3,
    mean_motion_dot=0.801e-4,
    rev_at_epoch=54085,
)
state = prop.state(prop.epoch)
print(f"Position: {state[:3]}")

from_tle builtin

from_tle(line1: str, line2: str, step_size: float = 60.0) -> SGPPropagator

Create a new SGP propagator from TLE lines.

Parameters:

Name Type Description Default
line1 str

First line of TLE data.

required
line2 str

Second line of TLE data.

required
step_size float

Step size in seconds for propagation. Defaults to 60.0.

60.0

Returns:

Name Type Description
SGPPropagator SGPPropagator

New SGP propagator instance.

generate_uuid method descriptor

generate_uuid() -> Any

Generate a new UUID and set it in-place (mutating).

get_elements method descriptor

get_elements(angle_format: AngleFormat) -> ndarray

Get Keplerian orbital elements from TLE data.

Extracts the Keplerian elements directly from the TLE lines used to initialize this propagator.

Parameters:

Name Type Description Default
angle_format AngleFormat

Format for angular elements (DEGREES or RADIANS).

required

Returns:

Type Description
ndarray

numpy.ndarray: Keplerian elements [a, e, i, Ω, ω, M] where: - a: semi-major axis [m] - e: eccentricity [dimensionless] - i: inclination [rad or deg] - Ω: right ascension of ascending node [rad or deg] - ω: argument of periapsis [rad or deg] - M: mean anomaly [rad or deg]

Example
import brahe as bh

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

# Get elements in degrees
oe_deg = prop.get_elements(bh.AngleFormat.DEGREES)
print(f"Inclination: {oe_deg[2]:.4f} degrees")

# Get elements in radians
oe_rad = prop.get_elements(bh.AngleFormat.RADIANS)
print(f"Inclination: {oe_rad[2]:.4f} radians")

get_id method descriptor

get_id() -> int

Get the current numeric ID.

Returns:

Type Description
int

int or None: The numeric ID, or None if not set.

Example
1
2
3
4
5
6
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2).with_id(25544)
print(f"ID: {prop.get_id()}")

get_name method descriptor

get_name() -> str

Get the current name.

Returns:

Type Description
str

str or None: The name, or None if not set.

Example
1
2
3
4
5
6
7
import brahe as bh

name = "ISS (ZARYA)"
line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_3le(name, line1, line2)
print(f"Name: {prop.get_name()}")

get_uuid method descriptor

get_uuid() -> str

Get the current UUID.

Returns:

Type Description
str

str or None: The UUID as a string, or None if not set.

Example
1
2
3
4
5
6
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2).with_new_uuid()
print(f"UUID: {prop.get_uuid()}")

initial_state method descriptor

initial_state() -> ndarray

Get initial state vector.

Returns:

Type Description
ndarray

numpy.ndarray: Initial state vector in the propagator's output format.

latest_event method descriptor

latest_event() -> DetectedEvent

Get the most recent detected event.

Returns:

Type Description
DetectedEvent

DetectedEvent or None: Most recent event, or None if no events.

propagate_steps method descriptor

propagate_steps(num_steps: int) -> Any

Propagate forward by specified number of steps.

Parameters:

Name Type Description Default
num_steps int

Number of steps to take.

required
Example
1
2
3
4
5
6
7
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2, step_size=60.0)
prop.propagate_steps(10)  # Advance by 10 steps (600 seconds)
print(f"After 10 steps: {prop.current_epoch}")

propagate_to method descriptor

propagate_to(target_epoch: Epoch) -> Any

Propagate to a specific target epoch.

Parameters:

Name Type Description Default
target_epoch Epoch

The epoch to propagate to.

required
Example
1
2
3
4
5
6
7
8
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2)
target = prop.epoch + 7200.0  # 2 hours later
prop.propagate_to(target)
print(f"Propagated to: {prop.current_epoch}")

reset method descriptor

reset() -> Any

Reset propagator to initial conditions.

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

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2)
initial_epoch = prop.epoch
prop.propagate_steps(100)
prop.reset()
print(f"Reset to: {prop.current_epoch == initial_epoch}")

reset_termination method descriptor

reset_termination() -> Any

Reset the termination flag.

Call this to allow propagation to continue after a terminal event.

set_eviction_policy_max_age method descriptor

set_eviction_policy_max_age(max_age: float) -> Any

Set trajectory eviction policy based on maximum age.

Parameters:

Name Type Description Default
max_age float

Maximum age in seconds to keep states in trajectory.

required
Example
1
2
3
4
5
6
7
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2)
prop.set_eviction_policy_max_age(86400.0)  # Keep 1 day of history
print("Trajectory limited to 24 hours of states")

set_eviction_policy_max_size method descriptor

set_eviction_policy_max_size(max_size: int) -> Any

Set trajectory eviction policy based on maximum size.

Parameters:

Name Type Description Default
max_size int

Maximum number of states to keep in trajectory.

required
Example
1
2
3
4
5
6
7
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2)
prop.set_eviction_policy_max_size(1000)
print("Trajectory limited to 1000 states")

set_id method descriptor

set_id(id: Union[int, None]) -> Any

Set the numeric ID in-place (mutating).

Parameters:

Name Type Description Default
id int or None

Numeric ID to assign, or None to clear.

required

set_identity method descriptor

set_identity(name: Union[str, None], uuid_str: Union[str, None], id: Union[int, None]) -> Any

Set all identity fields in-place (mutating).

Parameters:

Name Type Description Default
name str or None

Optional name to assign.

required
uuid_str str or None

Optional UUID string to assign.

required
id int or None

Optional numeric ID to assign.

required

set_name method descriptor

set_name(name: Union[str, None]) -> Any

Set the name in-place (mutating).

Parameters:

Name Type Description Default
name str or None

Name to assign, or None to clear.

required

set_output_format method descriptor

set_output_format(frame: OrbitFrame, representation: OrbitRepresentation, angle_format: Union[AngleFormat, None]) -> Any

Set output format (frame, representation, and angle format).

Parameters:

Name Type Description Default
frame OrbitFrame

Output frame (ECI or ECEF).

required
representation OrbitRepresentation

Output representation (Cartesian or Keplerian).

required
angle_format AngleFormat or None

Angle format for Keplerian (None for Cartesian).

required

set_step_size method descriptor

set_step_size(new_step_size: float) -> Any

Set step size in seconds (explicit method).

Parameters:

Name Type Description Default
new_step_size float

New step size in seconds.

required
Example
1
2
3
4
5
6
7
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
propagator = bh.SGPPropagator.from_tle(line1, line2)
propagator.set_step_size(120.0)  # Can use explicit method
# or propagator.step_size = 120.0  # Can use property

state method descriptor

state(epoch: Epoch) -> ndarray

Compute state at a specific epoch.

Parameters:

Name Type Description Default
epoch Epoch

Target epoch for state computation.

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector in the propagator's current output format.

state_ecef method descriptor

state_ecef(epoch: Epoch) -> ndarray

Compute state at a specific epoch in ECEF coordinates.

Parameters:

Name Type Description Default
epoch Epoch

Target epoch for state computation.

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector [x, y, z, vx, vy, vz] in ECEF frame.

state_eci method descriptor

state_eci(epoch: Epoch) -> ndarray

Compute state at a specific epoch in ECI coordinates.

Parameters:

Name Type Description Default
epoch Epoch

Target epoch for state computation.

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector [x, y, z, vx, vy, vz] in ECI frame.

state_eme2000 method descriptor

state_eme2000(epoch: Epoch) -> ndarray

Compute state at a specific epoch in EME2000 coordinates.

Parameters:

Name Type Description Default
epoch Epoch

Target epoch for state computation.

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector [x, y, z, vx, vy, vz] in EME2000 frame (meters, m/s).

state_gcrf method descriptor

state_gcrf(epoch: Epoch) -> ndarray

Compute state at a specific epoch in GCRF coordinates.

Parameters:

Name Type Description Default
epoch Epoch

Target epoch for state computation.

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector [x, y, z, vx, vy, vz] in GCRF frame (meters, m/s).

state_itrf method descriptor

state_itrf(epoch: Epoch) -> ndarray

Compute state at a specific epoch in ITRF coordinates.

Parameters:

Name Type Description Default
epoch Epoch

Target epoch for state computation.

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector [x, y, z, vx, vy, vz] in ITRF frame (meters, m/s).

state_koe_mean method descriptor

state_koe_mean(epoch: Epoch, angle_format: AngleFormat) -> ndarray

Compute state as mean Keplerian elements at the given epoch.

Mean elements are orbit-averaged elements that remove short-period and long-period J2 perturbations using first-order Brouwer-Lyddane theory.

Parameters:

Name Type Description Default
epoch Epoch

Epoch for state computation.

required
angle_format AngleFormat

If AngleFormat.DEGREES, angular elements are returned in degrees, otherwise in radians.

required

Returns:

Type Description
ndarray

numpy.ndarray: Mean Keplerian elements [a, e, i, raan, argp, mean_anomaly].

Example
import brahe as bh

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

# Get mean elements at initial epoch
epoch = prop.epoch
mean_deg = prop.state_koe_mean(epoch, bh.AngleFormat.DEGREES)
osc_deg = prop.state_koe_osc(epoch, bh.AngleFormat.DEGREES)
print(f"Mean semi-major axis: {mean_deg[0]/1000:.3f} km")
print(f"Osc semi-major axis: {osc_deg[0]/1000:.3f} km")

state_koe_osc method descriptor

state_koe_osc(epoch: Epoch, angle_format: AngleFormat) -> ndarray

Compute state as osculating elements at a specific epoch.

Parameters:

Name Type Description Default
epoch Epoch

Target epoch for state computation.

required
angle_format AngleFormat

If AngleFormat.DEGREES, angular elements are returned in degrees, otherwise in radians.

required

Returns:

Type Description
ndarray

numpy.ndarray: Osculating elements [a, e, i, raan, argp, mean_anomaly].

Example
import brahe as bh

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

# Get osculating elements at initial epoch
epoch = prop.epoch
elements_deg = prop.state_koe_osc(epoch, bh.AngleFormat.DEGREES)
print(f"Semi-major axis: {elements_deg[0]/1000:.3f} km")
print(f"Inclination: {elements_deg[2]:.4f} degrees")

# Get elements in radians
elements_rad = prop.state_koe_osc(epoch, bh.AngleFormat.RADIANS)
print(f"Inclination: {elements_rad[2]:.4f} radians")

state_pef method descriptor

state_pef(epoch: Epoch) -> ndarray

Compute state at a specific epoch in PEF coordinates.

Parameters:

Name Type Description Default
epoch Epoch

Target epoch for state computation.

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector [x, y, z, vx, vy, vz] in PEF frame.

states method descriptor

states(epochs: list[Epoch]) -> List

Compute states at multiple epochs.

Parameters:

Name Type Description Default
epochs list[Epoch]

List of epochs for state computation.

required

Returns:

Type Description
List

list[numpy.ndarray]: List of state vectors in the propagator's current output format.

states_eci method descriptor

states_eci(epochs: list[Epoch]) -> List

Compute states at multiple epochs in ECI coordinates.

Parameters:

Name Type Description Default
epochs list[Epoch]

List of epochs for state computation.

required

Returns:

Type Description
List

list[numpy.ndarray]: List of ECI state vectors.

states_gcrf method descriptor

states_gcrf(epochs: list[Epoch]) -> List

Compute states at multiple epochs in GCRF coordinates.

Parameters:

Name Type Description Default
epochs list[Epoch]

List of epochs for state computation.

required

Returns:

Type Description
List

list[numpy.ndarray]: List of GCRF state vectors.

states_itrf method descriptor

states_itrf(epochs: list[Epoch]) -> List

Compute states at multiple epochs in ITRF coordinates.

Parameters:

Name Type Description Default
epochs list[Epoch]

List of epochs for state computation.

required

Returns:

Type Description
List

list[numpy.ndarray]: List of ITRF state vectors.

states_koe_mean method descriptor

states_koe_mean(epochs: list[Epoch], angle_format: AngleFormat) -> List

Compute states as mean Keplerian elements at multiple epochs.

Mean elements are orbit-averaged elements that remove short-period and long-period J2 perturbations using first-order Brouwer-Lyddane theory.

Parameters:

Name Type Description Default
epochs list[Epoch]

List of epochs for state computation.

required
angle_format AngleFormat

If AngleFormat.DEGREES, angular elements are returned in degrees, otherwise in radians.

required

Returns:

Type Description
List

list[numpy.ndarray]: List of mean Keplerian element vectors [a, e, i, raan, argp, mean_anomaly].

Example
import brahe as bh

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

# Get mean elements at multiple epochs
epoch0 = prop.epoch
epochs = [epoch0 + i*3600.0 for i in range(10)]  # Every hour for 10 hours
mean_list = prop.states_koe_mean(epochs, bh.AngleFormat.DEGREES)

for i, elements in enumerate(mean_list):
    print(f"Hour {i}: mean a={elements[0]/1000:.3f} km")

states_koe_osc method descriptor

states_koe_osc(epochs: list[Epoch], angle_format: AngleFormat) -> List

Compute states as osculating elements at multiple epochs.

Parameters:

Name Type Description Default
epochs list[Epoch]

List of epochs for state computation.

required
angle_format AngleFormat

If AngleFormat.DEGREES, angular elements are returned in degrees, otherwise in radians.

required

Returns:

Type Description
List

list[numpy.ndarray]: List of osculating element vectors [a, e, i, raan, argp, mean_anomaly].

Example
import brahe as bh

line1 = "1 25544U 98067A   08264.51782528 -.00002182  00000-0 -11606-4 0  2927"
line2 = "2 25544  51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537"
prop = bh.SGPPropagator.from_tle(line1, line2)

# Get elements at multiple epochs
epoch0 = prop.epoch
epochs = [epoch0 + i*3600.0 for i in range(10)]  # Every hour for 10 hours
elements_list = prop.states_koe_osc(epochs, bh.AngleFormat.DEGREES)

for i, elements in enumerate(elements_list):
    print(f"Hour {i}: a={elements[0]/1000:.3f} km, e={elements[1]:.6f}")

step method descriptor

step() -> Any

Step forward by the default step size.

Example
1
2
3
4
5
6
7
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2)
prop.step()  # Advance by default step_size
print(f"Advanced to: {prop.current_epoch}")

step_by method descriptor

step_by(step_size: float) -> Any

Step forward by a specified time duration.

Parameters:

Name Type Description Default
step_size float

Time step in seconds.

required
Example
1
2
3
4
5
6
7
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2)
prop.step_by(120.0)  # Advance by 2 minutes
print(f"Advanced to: {prop.current_epoch}")

step_past method descriptor

step_past(target_epoch: Epoch) -> Any

Step past a specified target epoch.

Parameters:

Name Type Description Default
target_epoch Epoch

The epoch to step past.

required
Example
1
2
3
4
5
6
7
8
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2)
target = prop.epoch + 3600.0  # 1 hour later
prop.step_past(target)
print(f"Stepped past target")

with_id method descriptor

with_id(id: int) -> SGPPropagator

Set the numeric ID and return self (consuming constructor pattern).

Parameters:

Name Type Description Default
id int

Numeric ID to assign to this propagator.

required

Returns:

Name Type Description
SGPPropagator SGPPropagator

Self with ID set.

with_identity method descriptor

with_identity(name: Union[str, None], uuid_str: Union[str, None], id: Union[int, None]) -> SGPPropagator

Set all identity fields at once and return self (consuming constructor pattern).

Parameters:

Name Type Description Default
name str or None

Optional name to assign.

required
uuid_str str or None

Optional UUID string to assign.

required
id int or None

Optional numeric ID to assign.

required

Returns:

Name Type Description
SGPPropagator SGPPropagator

Self with identity set.

Example
1
2
3
4
5
6
7
8
import brahe as bh
import uuid

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
my_uuid = str(uuid.uuid4())
prop = bh.SGPPropagator.from_tle(line1, line2).with_identity("ISS", my_uuid, 25544)
print(f"Name: {prop.name}, ID: {prop.id}, UUID: {prop.uuid}")

with_name method descriptor

with_name(name: str) -> SGPPropagator

Set the name and return self (consuming constructor pattern).

Parameters:

Name Type Description Default
name str

Name to assign to this propagator.

required

Returns:

Name Type Description
SGPPropagator SGPPropagator

Self with name set.

Example
1
2
3
4
5
6
import brahe as bh

line1 = "1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9990"
line2 = "2 25544  51.6461 339.8014 0002571  24.9690  60.4407 15.48919393267689"
prop = bh.SGPPropagator.from_tle(line1, line2).with_name("My Satellite")
print(f"Name: {prop.name}")

with_new_uuid method descriptor

with_new_uuid() -> SGPPropagator

Generate a new UUID, set it, and return self (consuming constructor pattern).

Returns:

Name Type Description
SGPPropagator SGPPropagator

Self with new UUID set.

with_uuid method descriptor

with_uuid(uuid_str: str) -> SGPPropagator

Set the UUID and return self (consuming constructor pattern).

Parameters:

Name Type Description Default
uuid_str str

UUID string to assign to this propagator.

required

Returns:

Name Type Description
SGPPropagator SGPPropagator

Self with UUID set.


See Also