Description
Returns the point in the orbit where the Spacecraft is at its closest approach to the celestial body represented by referenceBodyIDVariable. FreeFlyer determines this condition by monitoring the dot product between the position and velocity vectors and identifying when this value passes from negative to positive.
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 a Stop-Propagation method. See the Stop-Propagation Properties and 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.OrbitPerigee(
|
Variable referenceBodyIDVariable)
|
Arguments
referenceBodyIDVariable
|
|
Description:
|
A Variable containing the numerical identifier for the celestial object to use when looking for periapsis. Body ID's 1-11 are assigned to the default Solar System objects, as shown below. Custom CelestialObjects will have body ID's starting at 12 and assigned in the order they are created.
|
Valid Range:
|
referenceBodyIDVariable ≥ 0
|
Valid Values:
|
Celestial Object
|
Value
|
Mercury
|
Mercury.BodyID or 1
|
Venus
|
Venus.BodyID or 2
|
Earth
|
Earth.BodyID or 3
|
Mars
|
Mars.BodyID or 4
|
Jupiter
|
Jupiter.BodyID or 5
|
Saturn
|
Saturn.BodyID or 6
|
Uranus
|
Uranus.BodyID or 7
|
Neptune
|
Neptune.BodyID or 8
|
Pluto
|
Pluto.BodyID or 9
|
Moon
|
Moon.BodyID or 10
|
Sun
|
Sun.BodyID or 11
|
<Custom CelestialBody>
|
<Custom CelestialBody>.BodyID, starting at 12 and assigned in the order the custom CelestialObjects are created.
|
|
Return Value
Returns the point in the orbit where the Spacecraft is at its closest approach to its central body. FreeFlyer determines this condition by monitoring the dot product between the position and velocity vectors and identifying when this value passes from negative to positive.
Syntax
Step mySpacecraft1 to ( mySpacecraft1.OrbitPerigee(myVariable1));
|
The OrbitPerigee method can be used to notify the user when the Spacecraft has reached the periapsis of its orbit. The following example shows how you can determine if a Spacecraft is at the periapsis of its orbit around Mars.
Variable MarsID;
MarsID = Mars.BodyID;
Report Spacecraft1.OrbitPerigee(MarsID); // Reports 0
Step Spacecraft1 to (Spacecraft1.OrbitPerigee(MarsID) );
Report Spacecraft1.OrbitPerigee(MarsID); // Reports 1
|
The first Report command will report a 0, provided the Spacecraft is not initialized at the perigee of its orbit. The second Report command will report a 1, signifying the spacecraft has reached perigee.
Note: This example only works with orbits that have an eccentricity larger than 0.0001.
|
See also
Spacecraft Object
Spacecraft.OrbitPerigee
Spacecraft Propagation Guide
Coverage and Contact Analysis Guide
|