Page 1 of 1

Step a Formation and Spacecraft simultaneously

Posted: Fri Jun 14, 2024 8:17 pm
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;