Description
Evaluates the visibility condition configured by the segment and returns true (1) if the observer can see the target and returns false (0) if the observer can not see the target.
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.
Method Signature
VisibilitySegment.Visibility(
|
Variable evaluationEpoch)
|
Arguments
evaluationEpoch
|
|
Description:
|
The epoch at which to evaluate visibility.
|
Return Value
Returns true (1) if visibility is available, and false (0) otherwise.
Syntax
myVariable1 = myVisibilitySegment1.Visibility(myVariable2);
|
This example shows how to configure a VisibilitySegment to determine when a Spacecraft can see a GroundStation, and report the visibility.
Spacecraft sc;
GroundStation gs;
VisibilitySegment segment1;
segment1.SetObserver(sc);
segment1.SetTarget(gs);
segment1.AddOccultingBody(Earth, Moon);
While (sc.ElapsedTime < TIMESPAN(1 days));
Report sc.EpochText, segment1.Visibility(sc.Epoch);
Step sc;
End;
|
Output excerpt:
|
This example shows how to configure a VisibilitySegment to determine when a GroundStation can see the Moon, and report the visibility.
Spacecraft sc;
GroundStation gs;
VisibilitySegment segment2;
segment2.SetObserver(gs);
segment2.SetTarget(Moon);
While (sc.ElapsedTime < TIMESPAN(1 days));
Report sc.EpochText, segment2.Visibility(sc.Epoch);
Step sc;
End;
|
Output excerpt:
|
See also
VisibilitySegment Object
Coverage and Contact Analysis Guide
Visibility Calculators Guide
|