Description
Detects start of visibility (AOS), end of visibility (LOS), and maximum elevation events and determines the elevation at the time of these events.
Timing Precision Mode
This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode.
Click here to see the documentation for this object in nanosecond 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
VisibilitySegment.ElevationTimes(
|
Variable evaluationEpoch,
|
|
Array eventTimes,
|
|
Array eventTypes,
|
|
Array eventElevation)
|
Arguments
evaluationEpoch
|
|
Description:
|
This epoch defines an end-point of the evaluation interval. FreeFlyer will determine whether any events have occurred between this epoch and the previous evaluationEpoch specified for this argument.
|
eventTimes
|
|
Description:
|
An Array to be filled with the detected event times.
|
eventTypes
|
|
Description:
|
An Array to be filled with the detected event types.
Event Type == 1 is start of visibility.
Event Type == 2 is end of visibility.
Event Type == 3 is maximum elevation during this visibility period.
The FF_Preferences.IntervalEventReportingBehavior property controls whether the start of propagation is reported as an event. By default, if visibility starts before the beginning of the propagation span, FreeFlyer will label the start of the propagation as the start of visibility.
|
eventElevation
|
|
Description:
|
An Array to be filled with the detected event elevations.
|
Return Value
Returns the number of detected events.
Syntax
myVariable1 = myVisibilitySegment1.ElevationTimes(myVariable2, myArray1, myArray2, myArray3);
|
This example shows how to configure a VisibilitySegment to determine when a Spacecraft can see a GroundStation, and report the visibility times as well as the time of maximum elevation, and the elevation of the GroundStation with respect to the Spacecraft at the time of each event. The event times and types are stored in arrays, which are used to create a custom-formatted data report. Event Type = 1 means start of visibility; Event Type = 2 means end of visibility; Event Type = 3 means maximum elevation.
// Create Objects
Spacecraft Spacecraft1;
GroundStation GroundStation1;
Variable i;
Variable numEvents;
Array EventTimes[0];
Array EventTypes[0];
Array EventElevations[0];
StringArray EventTypeLabels = {"", "Start of visibility", "End of visibility", "Maximum elevation"};
// Configure the Segment
VisibilitySegment Segment1;
Segment1.SetObserver(Spacecraft1);
Segment1.SetTarget(GroundStation1);
Segment1.AddOccultingBody(Earth, Moon);
// Propagate and Generate Output
While (Spacecraft1.ElapsedDays < 1);
numEvents = Segment1.ElevationTimes(Spacecraft1.Epoch, EventTimes, EventTypes, EventElevations);
For i = 0 to numEvents-1 step 1;
Report EventTypeLabels[EventTypes[i]], EventTimes[i].EpochFormat(), EventElevations[i];
End;
Step Spacecraft1;
End;
|
Output:
|
This example shows how to configure a VisibilitySegment to determine when a GroundStation can see the Moon, and report the visibility times as well as the time of maximum elevation, and the elevation of the Moon with respect to the GroundStation at the time of each event. The event times and types are stored in arrays, which are used to create a custom-formatted data report. Event Type = 1 means start of visibility; Event Type = 2 means end of visibility; Event Type = 3 means maximum elevation.
// Create Objects
Spacecraft Spacecraft1;
GroundStation GroundStation1;
Variable i;
Variable numEvents;
Array EventTimes[0];
Array EventTypes[0];
Array EventElevations[0];
StringArray EventTypeLabels = {"", "Start of visibility", "End of visibility", "Maximum elevation"};
// Configure the Segment
VisibilitySegment Segment2;
Segment2.SetObserver(GroundStation1);
Segment2.SetTarget(Moon);
// Propagate and Generate Output
While (Spacecraft1.ElapsedDays < 1);
numEvents = Segment2.ElevationTimes(Spacecraft1.Epoch, EventTimes, EventTypes, EventElevations);
For i = 0 to numEvents-1 step 1;
Report EventTypeLabels[EventTypes[i]], EventTimes[i].EpochFormat(), EventElevations[i];
End;
Step Spacecraft1;
End;
|
Output:
|
See also
VisibilitySegment Object
Coverage and Contact Analysis Guide
Visibility Calculators Guide
|