Skip to content

SGP Propagator

The SGP4/SDP4 propagator for satellite orbit propagation using Two-Line Element (TLE) data.

SGPPropagator

SGPPropagator()

Python wrapper for SGPPropagator (replaces TLE) 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.

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.

__doc__ class-attribute

__doc__ = 'Python wrapper for SGPPropagator (replaces TLE)\nSGP4/SDP4 satellite propagator using TLE data.\n\nThe SGP (Simplified General Perturbations) propagator implements the SGP4/SDP4 models\nfor propagating satellites using Two-Line Element (TLE) orbital data. This is the standard\nmodel used for tracking objects in Earth orbit.\n\nExample:\n    ```python\n    import brahe as bh\n\n    # ISS TLE data (example)\n    line1 = "1 25544U 98067A   24001.50000000  .00016717  00000-0  30000-3 0  9005"\n    line2 = "2 25544  51.6400 150.0000 0003000 100.0000 260.0000 15.50000000300000"\n\n    # Create propagator\n    prop = bh.SGPPropagator.from_tle(line1, line2, step_size=60.0)\n\n    # Propagate to a specific epoch\n    epc = bh.Epoch.from_datetime(2024, 1, 2, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)\n    state_eci = prop.state(epc)\n    print(f"Position: {state_eci[:3]}")\n    print(f"Velocity: {state_eci[3:]}")\n\n    # Propagate multiple epochs\n    epochs = [epc + i*60.0 for i in range(10)]  # 10 minutes\n    states = prop.states(epochs)\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

current_epoch property

current_epoch: Epoch

Get current epoch.

Returns:

Name Type Description
Epoch Epoch

Current propagator epoch.

Example
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}")

epoch property

epoch: Epoch

Get TLE epoch.

Returns:

Name Type Description
Epoch Epoch

Epoch of the TLE data.

id property

id: int

Get the current numeric ID.

Returns:

Type Description
int

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

name property

name: str

Get the current name.

Returns:

Type Description
str

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

norad_id property

norad_id: int

Get NORAD ID.

Returns:

Name Type Description
int int

NORAD catalog ID.

satellite_name property

satellite_name: str

Get satellite name (if available).

Returns:

Type Description
str

str or None: Satellite name if provided.

Example
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}")

step_size property

step_size: float

Get step size in seconds.

Returns:

Name Type Description
float float

Step size in seconds.

Example
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")

trajectory property

trajectory: OrbitTrajectory

Get accumulated trajectory.

Returns:

Name Type Description
OrbitalTrajectory OrbitTrajectory

The accumulated trajectory.

Example
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")

uuid property

uuid: str

Get the current UUID.

Returns:

Type Description
str

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

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

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.

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_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")

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.

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
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
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
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}")

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
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
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: int or 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: str or None, uuid_str: str or None, id: int or 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: str or 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: AngleFormat or 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

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_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.

step method descriptor

step() -> Any

Step forward by the default step size.

Example
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
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
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: str or None, uuid_str: str or None, id: int or 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
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
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.

Overview

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

See Also