Setting a GroundStation as the Observer/Target for a VisibilitySegment
-
- Posts: 6
- Joined: Mon Apr 08, 2024 1:43 pm
Setting a GroundStation as the Observer/Target for a VisibilitySegment
One important thing to note when working with VisibilitySegment objects is which object you treat as the Observer object and which you treat as the Target object. When switching the Observer and Target objects in a Visibility Segment it affects when the line-of-sight contact is true and the reported start and stop times. When you are evaluating line-of-sight calculation for Visibility Segments the observer determines what Field-of-View (FOV) is used to determine contact and the Target determines the point the observer's Field-of-View needs to see.
In the case when the GroundStation is the observer and the Spacecraft is the target, the GroundStation's mask will be used to define the FOV and the Spacecraft's origin is the target point.
In the case when the Spacecraft is the observer and the GroundStation is the target, the Spacecraft's origin will use a 360 degree FOV and the GroundStation's location point is the target that defines contact.
To be explicit, the GroundStation's location point, which does not include the GroundStation mask, is the only thing evaluated when a GroundStation is the target. In addition, if a Sensor on the Spacecraft is the observer then the Visibility Segment FOV is constrained by the sensor's configuration and only when the Sensor sees the GroundStation's location point will the visibility be true.
In the case when the GroundStation is the observer and the Spacecraft is the target, the GroundStation's mask will be used to define the FOV and the Spacecraft's origin is the target point.
Code: Select all
Spacecraft sc;
GroundStation gs;
VisibilitySegment visSeg;
// Take the GroundStation Mask into account
visSeg.SetObserver(gs);
visSeg.SetTarget(sc);
Code: Select all
Spacecraft sc;
GroundStation gs;
VisibilitySegment visSeg;
// Treat the GroundStation as a location point
visSeg.SetObserver(sc);
visSeg.SetTarget(gs);