Description
For a spacecraft with no sensors: the calculation is based on a direct line of sight. For a spacecraft equipped with sensors: contact is determined when any active Sensor of contactSpacecraft can "see" Spacecraft.
Timing Precision Mode
This page describes functionality in nanosecond timing precision mode.
Click here to see the documentation for this object in millisecond timing precision mode.
Note: This is an interval method. See the Interval Methods page for more information.
Note: This method has a state. See the Methods and Properties with State page for more information.
Method Signature
Spacecraft.ContactTimes(
|
Spacecraft contactSpacecraft)
|
Arguments
contactSpacecraft
|
|
Description:
|
Spacecraft to use in contact calculation.
|
Return Value
Returns the acquisition of signal time (AOS), loss of signal time (LOS), and duration of the argument's contact with the Spacecraft.
The FF_Preferences.IntervalEventReportingBehavior property controls whether the start and end of propagation are reported as events. By default, if contact starts before the beginning of the propagation span, FreeFlyer will label the start of the propagation as the start of contact. If contact extends past the end of the propagation span, FreeFlyer labels the end of propagation as the end of contact.
Syntax
myString1 = mySpacecraft1.ContactTimes(mySpacecraft2);
|
This example demonstrates how to generate a report of a Spacecraft's contact times with another Spacecraft, without a sensor attached
Spacecraft Spacecraft1;
Spacecraft Spacecraft2;
// Configure Spacecraft orbit
Spacecraft2.I = 175;
Spacecraft2.A = 7100;
// *** For Millisecond Mode Only ***
While (Spacecraft1.ElapsedDays < 1);
Report Spacecraft1.ContactTimes(Spacecraft2) to "SC_ContactTimes.txt";
Step Spacecraft1;
Step Spacecraft2 to (Spacecraft2.Epoch == Spacecraft1.Epoch);
End;
Or
// *** For Nanosecond Mode Only ***
While (Spacecraft1.ElapsedTime < TIMESPAN(1 days));
Report Spacecraft1.ContactTimes(Spacecraft2) to "SC_ContactTimes.txt";
Step Spacecraft1;
Step Spacecraft2 to (Spacecraft2.Epoch == Spacecraft1.Epoch);
End;
|
Output:
Note: Output generated using nanosecond timing precision mode.
|
This example demonstrates how to generate a report of a Spacecraft's contact times with another spacecraft. In this example, the second spacecraft has an attached sensor.
Spacecraft Spacecraft1;
Spacecraft Spacecraft2;
// Configure Spacecraft orbits and add a Sensor to be used by the Spacecraft.ContactTimes() method
Spacecraft2.I = 175;
Spacecraft2.A = 7100;
Spacecraft2.AddSensor("Sensor1");
Spacecraft2.Sensors[0].ConeHalfAngle = 45;
// *** For Millisecond Mode Only ***
While (Spacecraft1.ElapsedDays < 1);
Report Spacecraft1.ContactTimes(Spacecraft2) to "SC_ContactTimes.txt";
Step Spacecraft1;
Step Spacecraft2 to (Spacecraft2.Epoch == Spacecraft1.Epoch);
End;
Or
// *** For Nanosecond Mode Only ***
While (Spacecraft1.ElapsedTime < TIMESPAN(1 days));
Report Spacecraft1.ContactTimes(Spacecraft2) to "SC_ContactTimes.txt";
Step Spacecraft1;
Step Spacecraft2 to (Spacecraft2.Epoch == Spacecraft1.Epoch);
End;
|
Output:
Note: Output generated using nanosecond timing precision mode.
|
See also
Spacecraft Object
Spacecraft.ContactTimes
Spacecraft Propagation Guide
Coverage and Contact Analysis Guide
|