WhileStepping

Top  Previous  Next

Description


The WhileStepping command allows the user to execute arbitrary FreeFlyer script while propagating a Spacecraft to an end condition. The WhileStepping command will execute the code inside the loop at every internal step of the Spacecraft Propagator. The Spacecraft propagator step size can be used to control the frequency that the script inside a WhileStepping command is executed.

 

This command behaves very similarly to how the Step command behaves when stepping to a condition, but allows the user to execute additional script during the propagation.

 

 

Syntax


// Step to 1 day in the future

TimeSpan epoch = mySpacecraft.Epoch;

WhileStepping mySpacecraft to (mySpacecraft.Epoch >= (epoch + TimeSpan.FromDays(1)));

      Put mySpacecraft to myEphemeris;

      View mySpacecraft;

End;

 

// Step to the orbit apogee stop-propagation method

WhileStepping mySpacecraft to (mySpacecraft.OrbitApogee);

      Put mySpacecraft to myEphemeris;

      View mySpacecraft;

End;

 

 

Details


If you do not need to execute additional FreeFlyer script while propagation a Spacecraft to a condition, consider using the Step command instead for simplicity.

 

 

See Also


Lists

Formations

Spacecraft Propagation

Stepping the Spacecraft

Step Command

List of Stop-Propagation Properties and Methods

Spacecraft Properties and Methods

Formation Properties and Methods