1. MissionSequence#
- class MissionSequence(name: str, propagator: Propagator)#
Bases:
object
Represents a sequence of mission segments, including propagation legs and impulsive burns.
Manages the trajectory propagation structure, ensuring logical consistency between consecutive mission segments. Defines the order of events, maintains state vectors, handles epoch continuity, and enables dynamic modeling through an associated propagator.
- Parameters:
name (
str
) – The name of the mission sequence.propagator (
Propagator
) – The propagator responsible for simulating the spacecraft dynamics.
Notes
The first leg must define the complete initial state.
A leg cannot follow another leg without an intervening impulsive burn.
Estimated impulsive burns must be followed by a “dv_man” parameter in the next leg.
The mission sequence structure ensures strict consistency in epochs and state transitions.
Examples
# initial setup import scarabaeus as scb # Define propagator prop = scb.Propagator(...) # Initialize mission sequence mission = scb.MissionSequence(name="EMA123", propagator=prop) # Define initial leg state_vec = scb.StateArray(...) # Initial state vector mission.addLeg(name="Outbound Leg", period=ArrayWUnits(86400, "s"), state_vector=state_vec, dt=ArrayWUnits(60, "s")) # Define and add impulsive burn dV = scb.ImpulsiveBurn(...) mission.addBurn(name="Midcourse Correction", dV=dV) # Define and add another leg next_leg = scb.StateArray(...) # State vector for second leg mission.addLeg(name="Final Approach", period=ArrayWUnits(43200, "s"), state_vector=next_leg, dt=ArrayWUnits(60, "s"))
Attributes
List of time step lengths used for integration in each segment.
List of EpochArray objects defining the timestamps associated with each mission phase.
Indices marking the last step of each segment within the overall timeline.
List of state models, representing either propagation states or impulsive maneuvers.
The name of the mission sequence.
List of names corresponding to each sequence segment.
Number of integration steps per leg, or None for impulsive burns.
List of time durations for each leg in the sequence, or None for impulsive burns.
The propagator associated with the mission sequence.
List of the number of states in each leg, or None for impulsive burns.
List of segment types, such as
"Leg"
(propagation phase) or"Impulsive Burn"
.Methods
addBurn
(name, dV)Adds an impulsive burn to the mission sequence.
addLeg
(name, period, state_vector[, dt, epochs])Adds a propagation leg to the mission sequence.
Checks the consistency of the mission sequence.
validate_impulsive_burn
(name, dV)Validates the parameters of an impulsive burn before adding it.
validate_leg
(name, period, dt, state_vector)Validates the parameters of a leg before adding it to the mission sequence.
- addBurn(name: str, dV: ImpulsiveBurn) None #
Adds an impulsive burn to the mission sequence.
Inserts an impulsive burn event, modifying the spacecraft’s velocity instantaneously. The burn is added between two propagation legs, and a corresponding velocity update (
dv_man
) is introduced in the next leg.- Parameters:
name (
str
) – The name of the impulsive burn.dV (
ImpulsiveBurn
) – The impulsive burn model defining the velocity change.
- Return type:
- addLeg(name, period: ArrayWUnits, state_vector, dt: ArrayWUnits = None, epochs=None) None #
Adds a propagation leg to the mission sequence.
Defines a new segment (leg) in the mission sequence, where the spacecraft propagates under the specified dynamical model. The user must specify either a time step (dt) or a predefined list of epochs (epochs). The number of integration steps is computed accordingly.
- Parameters:
name (
str
) – The name of the leg.period (
ArrayWUnits
) – The total duration of the leg in seconds.state_vector (
StateArray
) – The initial state of the spacecraft for the leg.dt (
ArrayWUnits
, optional) – The time step used to discretize the propagation period. Required ifepochs
is not provided. Defaults toNone
.epochs (
EpochArray
, optional) – Predefined epochs for the propagation instead of computing them usingperiod
anddt
. If provided,dt
must beNone
. Defaults toNone
.
- Return type:
- check_sequence_consistency() None #
Checks the consistency of the mission sequence.
Ensures that the mission sequence follows logical constraints, such as epoch continuity between legs, proper state vector propagation, and a valid ordering of estimated parameters.
- Return type:
- validate_impulsive_burn(name: str, dV: ImpulsiveBurn) None #
Validates the parameters of an impulsive burn before adding it.
Ensures that the burn name is unique, follows a valid mission sequence structure, and conforms to expected data types.
- Parameters:
name (
str
) – The name of the impulsive burn.dV (
ImpulsiveBurn
) – The impulsive burn model.
- Return type:
- validate_leg(name: str, period: ArrayWUnits, dt: ArrayWUnits, state_vector: StateArray, epochs_vec: EpochArray = None) None #
Validates the parameters of a leg before adding it to the mission sequence.
Ensures that the provided leg parameters meet structural and logical requirements. It checks for correct data types, consistent state vector definitions, and the presence of necessary inputs.
- Parameters:
name (
str
) – The name of the leg.period (
ArrayWUnits
) – The duration of the leg in seconds.dt (
ArrayWUnits
) – The time step for discretization in seconds.state_vector (
StateArray
) – The state vector representing the spacecraft’s state during the leg.epochs_vec (
EpochArray
, optional) – Predefined epochs. Defaults toNone
.
- Return type:
- property dts: list[ArrayWUnits] | None#
List of time step lengths used for integration in each segment.
- property epochs_vec: list[EpochArray]#
List of EpochArray objects defining the timestamps associated with each mission phase.
- property last_idx: list[int]#
Indices marking the last step of each segment within the overall timeline.
- property models: list[StateArray] | list[ImpulsiveBurn]#
List of state models, representing either propagation states or impulsive maneuvers.
- property num_steps: list[int] | None#
Number of integration steps per leg, or None for impulsive burns.
- property periods: list[ArrayWUnits] | list[None]#
List of time durations for each leg in the sequence, or None for impulsive burns.
- property propagator: Propagator#
The propagator associated with the mission sequence.