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;
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
Note: To add an Iterate command via Command Editor, you must start with a Target command, and edit the Initial Setup page.
Object to be reset at start of each iteration
•Determines the objects that are restored to their starting states at the beginning of each iteration of a targeting loop |
Choose Differential Corrector
•Determines whether a DifferentialCorrector object will be used to access to the status of the Targeting loop, including properties such as DifferentialCorrector.Converged
•The DifferentialCorrector object specifies the maximum number of iterations allowed before convergence |
|
Choose Parameters To Vary
Note: To add a Vary command via Command Editor, you must start with a Target command, and edit the Choose Parameters To Vary page.
Parameter to Vary
•Determines the object properties that are adjusted in the Target loop in order to meet the user-specified goals |
Seed Value
•Initial guess for the varied parameter |
Perturbation
•Offset from the current guess that is used to determine the next guess |
Use Constraints
•Determines whether the allowable guesses will be constrained to a specified range of values |
Minimum
•Lowest allowable value for the varied parameter |
Maximum
•Highest allowable value for the varied parameter |
|
Choose Conditions To Achieve
Note: To add an Achieve command via Command Editor, you must start with a Target command, and edit the Choose Parameters To Target page.
Parameter to Achieve
•Defines the goals of the Target loop |
Goal Value
•Desired value for the achieved parameter |
Tolerance
•Allowable offset from the goal value for the achieved parameter |
|
Choose Output Conditions
Plot Target Parameters
•Determines whether to generate a plot of the Varied and Achieved parameters |
Report Target Parameters To Screen
•Determines whether to generate an on-screen report of the Varied and Achieved parameters |
Report Target Parameters to File
•Determines whether to generate a report file of the Varied and Achieved parameters |
|
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
|