Target

Top  Previous  Next

Description


The Target command begins a block of commands, called a Targeting loop, that attempts to Achieve a desired set of goals by Varying the values of a user-specified set of object properties. A DifferentialCorrector object can optionally be used in a Targeting loop. For more information, see the Targeting Guide.

 

 

Syntax


Target;

      Iterate mySpacecraft;

      Vary myImpulsiveBurn.BurnDirection[0] = 0 + 0.001;

      Maneuver mySpacecraft using myImpulsiveBurn;

      Achieve mySpacecraft.A = 8000 +/- 50;

      Report myImpulsiveBurn.BurnDirection[0], mySpacecraft.A;

End;

 

Target using myDifferentialCorrector;

      Iterate mySpacecraft;

      Vary myImpulsiveBurn.BurnDirection[0] = 0 + 0.001;

      Maneuver mySpacecraft using myImpulsiveBurn;

      Achieve mySpacecraft.A = 8000 +/- 50;

      Report myImpulsiveBurn.BurnDirection[0], mySpacecraft.A;

End;

 

// Use If statements to control the Vary and Achieve parameters in a Target loop

Target using myDifferentialCorrector;
    Iterate mySpacecraft;

    If (eventValue == 0);

           Vary myImpulsiveBurn.BurnDirection[0] = 0 + 0.001;

    ElseIf (eventValue == 1);

           Vary myImpulsiveBurn.BurnDirection[0] = 0 - 0.001;

    End;
    Maneuver mySpacecraft using myImpulsiveBurn;
    Achieve mySpacecraft.A = 8000 +/- 50;
End;

 

Where:

0 is the seed value for myImpulsiveBurn.BurnDirection[0]

0.001 is the perturbation for myImpulsiveBurn.BurnDirection[0]

8000 is the goal value for mySpacecraft.A

50 is the allowable tolerance value for mySpacecraft.A

 

 

Details


The optional "using myDifferentialCorrector" clause allows you to report the status of the Targeting loop using a DifferentialCorrector object. You can report properties such as DifferentialCorrector.Converged, DifferentialCorrector.Iterations, and DifferentialCorrector.SensitivityMatrix. The DifferentialCorrector object also allows you to specify the maximum number of iterations allowed before convergence.

The Iterate, Vary, and Achieve commands are used in conjunction with the Target command.

An unlimited number of Iterate, Vary, and Achieve commands can be used in a single Targeting loop. It is recommended but not required that the number of Vary and Achieve commands be equal.

The ResetTargetingLoop command is an optional component of the Targeting loop which allows the user to re-initialize the seeds and perturbations of a Vary command if the Targeting process is not converging properly.

A Target loop must be closed with an End statement.

Properties and Methods with a state are always reset at the start of each iteration of a Target loop.

Iterate, Vary, and Achieve commands can be placed inside loops (If, While, For, etc) if the number and type of items being targeted is not known or fixed at the time the script is written, allowing the user to load targeting parameters from a file or database at runtime.

oIn millisecond timing precision mode, if you want to put Iterate, Vary, or Achieve commands inside loops (If, While, For, etc), the keywords "with RuntimeSetup" must be used, as shown below:

Target with RuntimeSetup using myDifferentialCorrector;
    Iterate mySpacecraft;

    If (eventValue == 0);

           Vary myImpulsiveBurn.BurnDirection[0] = 0 + 0.001;

    ElseIf (eventValue == 1);

           Vary myImpulsiveBurn.BurnDirection[0] = 0 - 0.001;

    End;
    Maneuver mySpacecraft using myImpulsiveBurn;
    Achieve mySpacecraft.A = 8000 +/- 50;
End;

 

 

Command Editor


Initial Setup

 

Choose Parameters To Vary

 

Choose Conditions To Achieve

 

Choose Output Conditions

 

Script

Displays the FreeFlyer Script that is generated by the editor

The ellipsis (...) indicates that additional script can be added inside the loop

 

Description

Displays descriptions of the editor and its fields

Description text changes as the mouse pointer moves over the different fields within the editor

 

 

See Also


DifferentialCorrector Properties and Methods

Iterate Command

Vary Command

Achieve Command

ResetTargetingLoop

Targeting Guide