Skip to content

Keplerian Propagator

Analytical two-body orbit propagator using Keplerian orbital elements. The Keplerian propagator provides fast, analytical orbit propagation for unperturbed two-body motion. It uses closed-form solutions to Kepler's equations for orbital element propagation.

Orbital Elements

The propagator accepts orbital elements in the following order: 1. a - Semi-major axis (meters) 2. e - Eccentricity (dimensionless) 3. i - Inclination (degrees radians) 4. Ω - Right ascension of ascending node (degrees radians) 5. ω - Argument of periapsis (degrees radians) 6. M or ν - Mean anomaly or true anomaly (degrees radians)

Use OrbitRepresentation to specify element type: - MEAN_ELEMENTS - Mean orbital elements with mean anomaly - OSCULATING_ELEMENTS - Osculating elements with true anomaly

Class Reference

KeplerianPropagator

KeplerianPropagator(epoch: Epoch, state: ndarray, frame: OrbitFrame, representation: OrbitRepresentation, angle_format: AngleFormat, step_size: float)

Keplerian orbit propagator using two-body dynamics.

The Keplerian propagator implements ideal two-body orbital mechanics without perturbations. It's fast and accurate for short time spans but doesn't account for real-world effects like drag, J2, solar radiation pressure, etc.

Parameters:

Name Type Description Default
epoch Epoch

Initial epoch.

required
state ndarray

6-element state vector.

required
frame OrbitFrame

Reference frame (ECI or ECEF).

required
representation OrbitRepresentation

State representation (Cartesian or Keplerian).

required
angle_format AngleFormat

Angle format for Keplerian elements.

required
step_size float

Step size in seconds for propagation.

required

Attributes:

Name Type Description
current_epoch Epoch

Current propagation time

initial_epoch Epoch

Initial epoch from propagator creation

step_size float

Current step size in seconds

trajectory OrbitTrajectory

Accumulated trajectory states

Example
import brahe as bh
import numpy as np

# Initial epoch and orbital elements
epc0 = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([7000000.0, 0.001, 0.9, 0.0, 0.0, 0.0])  # a, e, i, RAAN, omega, M

# Create propagator from Keplerian elements
prop = bh.KeplerianPropagator.from_keplerian(
    epc0, oe, bh.AngleFormat.RADIANS, step_size=60.0
)

# Propagate forward one orbit
period = bh.orbital_period(oe[0])
epc_future = epc0 + period
state = prop.state(epc_future)
print(f"State after one orbit: {state}")

# Create from Cartesian state
x_cart = np.array([7000000.0, 0.0, 0.0, 0.0, 7546.0, 0.0])
prop2 = bh.KeplerianPropagator(
    epc0, x_cart, bh.OrbitFrame.ECI,
    bh.OrbitRepresentation.CARTESIAN,
    bh.AngleFormat.RADIANS, 60.0
)

Initialize instance.

current_epoch property

current_epoch: Epoch

Get current epoch.

Returns:

Name Type Description
Epoch Epoch

Current propagator epoch.

initial_epoch property

initial_epoch: Epoch

Get initial epoch.

Returns:

Name Type Description
Epoch Epoch

Initial propagator epoch.

step_size property

step_size: float

Get step size in seconds.

Returns:

Name Type Description
float float

Step size in seconds.

trajectory property

trajectory: SOrbitTrajectory

Get accumulated trajectory.

Returns:

Name Type Description
OrbitalTrajectory SOrbitTrajectory

The accumulated trajectory.

Example
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
prop.propagate_steps(10)
traj = prop.trajectory
print(f"Trajectory contains {traj.len()} states")

current_state method descriptor

current_state() -> ndarray

Get current state vector.

Returns:

Type Description
ndarray

numpy.ndarray: Current state vector.

from_ecef builtin

from_ecef(epoch: Epoch, state: ndarray, step_size: float) -> KeplerianPropagator

Create a new Keplerian propagator from Cartesian state in ECEF frame.

Parameters:

Name Type Description Default
epoch Epoch

Initial epoch.

required
state ndarray

6-element Cartesian state [x, y, z, vx, vy, vz] in ECEF frame.

required
step_size float

Step size in seconds for propagation.

required

Returns:

Name Type Description
KeplerianPropagator KeplerianPropagator

New propagator instance.

from_eci builtin

from_eci(epoch: Epoch, state: ndarray, step_size: float) -> KeplerianPropagator

Create a new Keplerian propagator from Cartesian state in ECI frame.

Parameters:

Name Type Description Default
epoch Epoch

Initial epoch.

required
state ndarray

6-element Cartesian state [x, y, z, vx, vy, vz] in ECI frame.

required
step_size float

Step size in seconds for propagation.

required

Returns:

Name Type Description
KeplerianPropagator KeplerianPropagator

New propagator instance.

from_keplerian builtin

from_keplerian(epoch: Epoch, elements: ndarray, angle_format: AngleFormat, step_size: float) -> KeplerianPropagator

Create a new Keplerian propagator from Keplerian orbital elements.

Parameters:

Name Type Description Default
epoch Epoch

Initial epoch.

required
elements ndarray

6-element Keplerian elements [a, e, i, raan, argp, mean_anomaly].

required
angle_format AngleFormat

Angle format (Degrees or Radians).

required
step_size float

Step size in seconds for propagation.

required

Returns:

Name Type Description
KeplerianPropagator KeplerianPropagator

New propagator instance.

generate_uuid method descriptor

generate_uuid() -> Any

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

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
7
8
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator.from_eci(epc, state, 60.0).with_id(12345)
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
8
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator.from_eci(epc, state, 60.0).with_name("MySat")
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
7
8
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator.from_eci(epc, state, 60.0).with_new_uuid()
print(f"UUID: {prop.get_uuid()}")

initial_state method descriptor

initial_state() -> ndarray

Get initial state.

Returns:

Type Description
ndarray

numpy.ndarray: Initial state vector.

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
8
9
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
prop.propagate_steps(10)  # Take 10 steps (600 seconds total)
print(f"Advanced to: {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
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
target = epc + 3600.0  # Propagate to 1 hour ahead
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
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
prop.propagate_steps(10)
prop.reset()  # Return to initial epoch and state
print(f"Reset to: {prop.current_epoch}")

set_eviction_policy_max_age method descriptor

set_eviction_policy_max_age(max_age: float) -> Any

Set eviction policy to keep states within maximum age.

Parameters:

Name Type Description Default
max_age float

Maximum age in seconds.

required
Example
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
prop.set_eviction_policy_max_age(3600.0)  # Keep only states within 1 hour
prop.propagate_to(epc + 7200.0)  # Propagate 2 hours
print(f"Trajectory length: {prop.trajectory.len()}")

set_eviction_policy_max_size method descriptor

set_eviction_policy_max_size(max_size: int) -> Any

Set eviction policy to keep maximum number of states.

Parameters:

Name Type Description Default
max_size int

Maximum number of states to retain.

required
Example
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
prop.set_eviction_policy_max_size(100)  # Keep only 100 most recent states
prop.propagate_steps(200)
print(f"Trajectory length: {prop.trajectory.len()}")

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_initial_conditions method descriptor

set_initial_conditions(epoch: Epoch, state: ndarray, frame: OrbitFrame, representation: OrbitRepresentation, angle_format: AngleFormat) -> Any

Set initial conditions.

Parameters:

Name Type Description Default
epoch Epoch

Initial epoch.

required
state ndarray

Initial state vector.

required
frame OrbitFrame

Reference frame.

required
representation OrbitRepresentation

State representation.

required
angle_format AngleFormat

Angle format.

required
Example
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)

# Change initial conditions to a different orbit
new_oe = np.array([bh.R_EARTH + 800e3, 0.02, 1.2, 0.5, 0.3, 0.0])
new_state = bh.state_koe_to_eci(new_oe, bh.AngleFormat.RADIANS)
new_epc = bh.Epoch.from_datetime(2024, 1, 2, 0, 0, 0.0, 0.0, bh.TimeSystem.UTC)
prop.set_initial_conditions(new_epc, new_state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, bh.AngleFormat.RADIANS)
print(f"New initial epoch: {prop.initial_epoch}")

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_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
8
9
import brahe as bh
import numpy as np

epoch = bh.Epoch.from_datetime(2024, 1, 1, 0, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 97.8, 15.0, 30.0, 45.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.DEGREES)
propagator = bh.KeplerianPropagator.from_eci(epoch, state, 60.0)
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 native 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 a specific 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

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: Mean Keplerian elements [a, e, i, raan, argp, mean_anomaly].

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

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 native format.

states_ecef method descriptor

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

Compute states at multiple epochs in ECEF 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 ECEF state vectors.

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

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.

step method descriptor

step() -> Any

Step forward by the default step size.

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

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
prop.step()  # Advance by default step_size (60 seconds)
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
8
9
import brahe as bh
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
prop.step_by(120.0)  # Advance by 120 seconds
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
import numpy as np

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, 0.9, 1.0, 0.5, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)
prop = bh.KeplerianPropagator(epc, state, bh.OrbitFrame.ECI, bh.OrbitRepresentation.CARTESIAN, None, 60.0)
target = epc + 300.0  # Target 5 minutes ahead
prop.step_past(target)
print(f"Advanced to: {prop.current_epoch}")

with_id method descriptor

with_id(id: int) -> KeplerianPropagator

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
KeplerianPropagator KeplerianPropagator

Self with ID set.

with_identity method descriptor

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

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
KeplerianPropagator KeplerianPropagator

Self with identity set.

with_name method descriptor

with_name(name: str) -> KeplerianPropagator

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
KeplerianPropagator KeplerianPropagator

Self with name set.

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

epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([7000e3, 0.001, 0.9, 0.0, 0.0, 0.0])
prop = bh.KeplerianPropagator.from_keplerian(
    epc, oe, bh.AngleFormat.RADIANS, 60.0
).with_name("My Orbit")
print(f"Name: {prop.name}")

with_new_uuid method descriptor

with_new_uuid() -> KeplerianPropagator

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

Returns:

Name Type Description
KeplerianPropagator KeplerianPropagator

Self with new UUID set.

with_uuid method descriptor

with_uuid(uuid_str: str) -> KeplerianPropagator

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
KeplerianPropagator KeplerianPropagator

Self with UUID set.


See Also