Description
Returns the point in the orbit where the Spacecraft is at its closest approach to the celestial body represented by referenceBodyName.
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.OrbitPeriapsis(
|
String referenceBodyName)
|
Arguments
referenceBodyName
|
|
Description:
|
A String containing the name of the celestial object to use when looking for periapsis.
|
Return Value
Returns the point in the orbit where the Spacecraft is at its closest approach to a Planet, Moon, or CelestialObject.
Syntax
Step mySpacecraft1 to ( mySpacecraft1.OrbitPeriapsis(myString1));
|
The OrbitPeriapsis 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.
Report Spacecraft1.OrbitPeriapsis("Mars"); // Reports 0
Step Spacecraft1 to (Spacecraft1.OrbitPeriapsis("Mars"));
Report Spacecraft1.OrbitPeriapsis("Mars"); // Reports 1
|
The first Report command will report a 0, provided the Spacecraft is not initialized at the periapsis of its orbit. The second Report command will report a 1, signifying the spacecraft has reached periapsis.
Note: This example only works with orbits that have an eccentricity larger than 0.0001.
|
See also
Spacecraft Object
Spacecraft.OrbitPeriapsis
Spacecraft Propagation Guide
Coverage and Contact Analysis Guide
|