Backward Sequence
A Backward Sequence is a structural element you can use to organize segments and define the nature of the results passed on to the next segment or sequence in the MCS. A backward sequence, like a sequence, is comprised of segments, each of which propagates in order within the backward sequence. Each segment nested within, however, is propagated backward instead of forward.
A backward sequence can be useful in many ways, including:
- Determining where a spacecraft has been when you know where it currently is
- Determining the requirements for achieving a known, desired final state
- Planning a complex mission - in which you might use a backward sequence from the destination to a waypoint and a normal sequence from the origin to the waypoint, and then target the trajectories to line up
Scripting
You can define a script - using the Scripting Tool - to run before the sequence's segments are run for each iteration of the sequence. If you have defined parameters for the script, they display in the Parameters section.
Enabled - Select this option to make the script active, so that it runs.
Pre-Iterate - Select this option to run the sequence once before executing the script.
Show Scripting Tool... - Click this button to open the Scripting Tool and define a script.
Apply Changes - During execution, the sequence will use any values that the script sets, but won't replace the values where they are assigned in the segments. Click this button to apply the changes specified by the script to the segments within the sequence, thus replacing the originally assigned values with the script values.
General
The General tab contains three controls that you can set to define the output created by the backward sequence:
Generate Ephemeris - Select this option to have the sequence generate ephemeris and display it in the 2D and 3D Graphics windows.
Repeat Count - Enter the number of times to run the sequence. A sequence that is repeated runs immediately after the previous execution of the sequence.
State to Pass to Next Segment - Select either the initial or final state of the sequence to pass on to the next segment in the MCS.
Backward Propagation Behavior
As a result of propagating backward, some segments within a backward sequence behave differently than they would when propagating forward. The following table describes differences in the behavior of MCS segments when running in a backward sequence:
Segment | Backward Behavior Characteristics |
---|---|
Initial State | An Initial State segment in a backward sequence behaves the same as it would in a normal sequence. |
Launch | A Launch segment does not function within a backward sequence. If you include a Launch segment in a backward sequence, the MCS will stop running upon reaching the segment, and an error message displays in the Message Viewer. |
Follow | A Follow segment reverses its initial and final states when run in a backward sequence, so that the next segment in the MCS receives the initial state of this segment, determined by the joining conditions. The segment summary report is also based on the initial state rather than the final state. |
Maneuver |
|
Propagate | A Propagate segment within a backward sequence propagates with a negative step-size until satisfying stopping conditions. |
Sequence | A sequence behaves no differently within a backward sequence, but the segments contained within it run backward, in order within the sequence. |
Target Sequence | A Target sequence behaves no differently within a backward sequence, but the segments contained within it run backward, in order within the sequence. |
Update | An Update segment in a backward sequence behaves the same as it would in a normal sequence. |
Return | A Return segment in a backward sequence behaves the same as it would in a normal sequence. |
Stop | A Stop segment in a backward sequence behaves the same as it would in a normal sequence. |
Stopping Conditions
All the stopping conditions defined for segments within a backward sequence behave in the normal, forward manner - for example, ascending node is still defined as the point where the spacecraft crosses the XY plane in the forward direction when time is moving forward. Duration is considered as an absolute value, so that a three hour duration is three hours in whatever direction the segment is moving. "Before" stopping conditions are chronologically after the stopping conditions, but the mechanism is the same, in that the propagation will go in reverse through points already found from the "before" stopping condition to the outer stopping condition.