Step a Formation and Spacecraft simultaneously

Post your experiences with FreeFlyer in this forum to get feedback and support. If you're a current customer who needs support, please contact the FreeFlyer Support Team.
Technical Support Email: techsupport@ai-solutions.com Phone: +1 (301) 306-1756 Ext 2
Angel Rocha 6645752e1159d
Posts: 5
Joined: Thu May 16, 2024 2:53 am
Step a Formation and Spacecraft simultaneously

Post by Angel Rocha 6645752e1159d »

The Formation Object has built in Step and StepToEpoch Methods that can be used to Step the entire Formation with one line of script. Alternatively, you can use the Step Command to Step the entire Formation in the same way you would for a Spacecraft.

Step using Step Command

Code: Select all

While (Spacecraft1.ElapsedTime < TIMESPAN(1 days));
      Step Form;
      Step Spacecraft1 to (Spacecraft1.Epoch == Form[0].Epoch);
End;

Step using StepToEpoch Method

Code: Select all

While (Spacecraft1.ElapsedTime < TIMESPAN(1 days));
      Step Spacecraft1;
      Form.StepToEpoch(Spacecraft1.Epoch);
End;