Click or drag to resize

Targeted Segment List Operators

Often we either don't fully know some value that will determine our trajectory, or in some other way want to edit the SegmentConfiguration of the segments being propagated. To accomplish this, instead of using a SegmentList to propagate a list of segments, we use a TargetedSegmentList and TargetedSegmentListOperators

In addition to the segments, the TargetedSegmentList will also run a set of TargetedSegmentListOperators. These operators will modify something in the segments. After all operators have been run, the lists will be run and the results of that run will be the official results used in the overall propagation for that targeted segment list.

Note Note

The functionality described in this topic requires a license for the Segment Propagation Library.

TargetedSegmentListOperators

TargetedSegmentListOperators work in one of two ways. Either they modify some mutable element of the segments, or they modify the SegmentConfiguration for a specific segment. As part of an operator's evaluation, it may run the segments, however, the results from these runs are not official and are often optionally reported.

The operators make significant use of Evaluator Parameterization. In short, instead of using a geometry type directly in some computation, you substitute a placeholder geometry type, and something higher up in the computation will set the value that the placeholder will evaluate. See the Evaluator Parameterization topic for more information.

Available Operators

DME Component Libraries comes with several operators, however, if there is one missing you can implement it yourself or contact AGI. The included operators are as follows:

  • ChangeStoppingConditionThresholdOperator<T> - An operator that modifies the value of a threshold for a StoppingCondition. The next time the segment with the condition is propagated, it will use the new threshold. This can be useful when you want to round a threshold to a nearest second.

  • ChangeStoppingConditionEnabledOperator - An operator that enables or disables a StoppingCondition. Often, stopping conditions are added to a propagate segment to avoid certain edge cases that could cause problems if propagation goes on too long (such as a maximum duration stopping condition). Other operators may get the trajectory close enough that those conditions are no longer necessary, and disabling those conditions may be desired.

  • ChangeReturnSegmentOperator - An operator that will change the ReturnSegmentBehavior of a ReturnSegment. One common use case for ReturnSegments is to end a TargetedSegmentList early when an early differential corrector is far away from a solution. However, eventually you want to run all of the segments so a later operator can run. This operator will effectively turn a ReturnSegment on or off as needed.

  • ChangeStopSegmentOperator - An operator that enables or disables a StopSegment. Similar to a ReturnSegment, a StopSegment might be added to a list of segments in order to stop propagating if the segments propagate to a bad state. However, you also might reach a point where the StopSegment is no longer needed and should be disabled.

  • RunSegmentListOperator - A useful way to understand this operator conceptually is that it essentially allows the user to operate a targeted segment list like a simple segment list. This functionality can be helpful when developing a targeted segment list, especially when developing large and complex targeted lists where observing the list before it is complete can aid in the understanding of its configuration and function.

  • TargetedSegmentListDifferentialCorrector - This operator will treat the propagation of the segments in the TargetedSegmentList as a function, whose variables are the variables in this operator, and whose answer is the constraints. The differential corrector will modify those variables to drive the answer to the desired values of the constraints. See the Multivariable Function Solvers topic for more information and examples.

  • ChangePropagateSegmentsPropagatorOperator - When you are using the differential corrector, often you have an initial corrector trying to get you into the ballpark of where you need to be, then a second one where you solve for a more exact trajectory. For example, consider planning a mission from the Earth to the Moon. Before you can target getting into a polar orbit around the Moon you have to get in the ballpark of the Moon first. For that first corrector, using a low-fidelity StoppablePropagator could save a good deal of time, allowing you to only use a high precision stoppable propagator for the final corrector. This operator will do just that.

    Using this operator has several caveats. Because StoppingConditions are owned by the StoppablePropagator, the original propagator and the new one will have its own set of stopping conditions. It is the responsibility of the author of the segments to configure the stopping conditions properly. If the stopping conditions in the two stoppable propagators need to have the same threshold, use the same ParameterizedValueDefinition<T> for the thresholds. The StateElementAdapters will be configured automatically on the new stoppable propagator, but the adapters must be configured to set their PreviousDefinedIn (get / set) properties. The following example shows how to properly configure and use this operator:

    Java
    EarthCentralBody earth = CentralBodiesFacet.getFromContext().getEarth();
    
    // configure the first low precision propagator
    TwoBodyStoppablePropagator firstLowPrecisionPropagator = new TwoBodyStoppablePropagator(
            WorldGeodeticSystem1984.GravitationalParameter, 
            SatelliteMotionIdentification, 
            earth.getInertialFrame(), 
            Duration.fromMinutes(5.0));
    firstLowPrecisionPropagator.setInitialDate(TimeConstants.J2000);
    firstLowPrecisionPropagator.setInitialMotion(new Motion1<Cartesian>(new Cartesian(42000000.0, 0.0, 0.0), new Cartesian(0.0, 3000.0, 0.0)));
    
    // set its stopping condition
    DurationStoppingCondition firstCondition = new DurationStoppingCondition();
    firstCondition.setThreshold(ValueDefinition.toValueDefinition(Duration.fromMinutes(10.0)));
    firstLowPrecisionPropagator.getStoppingConditions().add(firstCondition);
    
    // create the segment
    PropagateSegment segment = new PropagateSegment(firstLowPrecisionPropagator);
    ReferenceFrameAdapter fullyConfiguredAdapter = new ReferenceFrameAdapter(SatelliteMotionIdentification, earth.getInertialFrame());
    fullyConfiguredAdapter.setPreviousReferenceFrame(earth.getInertialFrame()); // note that the previous defined in must be set
    segment.setElementAndAdapter(fullyConfiguredAdapter); // set the adapter
    
    // create the high precision propagator that will replace the existing propagator
    StoppableNumericalPropagator secondHighPrecisionPropagator = new StoppableNumericalPropagator();
    NumericalPropagatorDefinition numericalPropagator = createNumericalPropagator();
    secondHighPrecisionPropagator.setPropagatorDefinition(numericalPropagator);
    
    // this needs its own stopping condition too
    DurationStoppingCondition secondCondition = new DurationStoppingCondition();
    secondCondition.setThreshold(firstCondition.getThreshold());
    secondHighPrecisionPropagator.getStoppingConditions().add(secondCondition);
    
    // create the targeted segment list
    TargetedSegmentList list = new TargetedSegmentList();
    list.getSegments().add(segment);
    
    // add the operator
    ChangePropagateSegmentsPropagatorOperator changeOperator = new ChangePropagateSegmentsPropagatorOperator(segment, secondHighPrecisionPropagator);
    list.getOperators().add(createDifferentialCorrector1(segment, segment));
    list.getOperators().add(changeOperator);
    list.getOperators().add(createDifferentialCorrector2(segment, segment));
    
    // propagate
    SegmentListPropagator propagator = list.getSegmentListPropagator();
    TargetedSegmentListResults results = (TargetedSegmentListResults) propagator.propagateSegmentList();
    PropagateSegmentResults highPrecisionResults = (PropagateSegmentResults) results.getResultsOfSegment(segment);
    
    
  • SwapSegmentOperator - Allows you to swap segment definitions in a targeted segment list.

  • SeedFiniteManeuverOperator - An operator that is very similar to the SwapSegmentOperator, but meant to switch between an ImpulsiveManeuverSegment and a FiniteManeuverSegment. This operator will set the duration of the finite maneuver based on the needed delta-v of the ImpulsiveManeuverInformation with the PropagationElementIdentification (get / set). Each segment must be configured independently, combined with a SwitchableSegment.