space_ex v0.8.0 SpaceEx.SpaceCenter.Orbit
Describes an orbit.
For example, the orbit of a vessel, obtained by calling
SpaceEx.SpaceCenter.Vessel.orbit/1, or a celestial body, obtained by calling
SpaceEx.SpaceCenter.CelestialBody.orbit/1.
Link to this section Summary
Functions
Gets the apoapsis of the orbit, in meters, from the center of mass of the body being orbited
The apoapsis of the orbit, in meters, above the sea level of the body being orbited
The argument of periapsis, in radians
The celestial body (e.g
Estimates and returns the distance at closest approach to a target vessel, in meters
The eccentric anomaly at the given universal time
The eccentricity of the orbit
The time since the epoch (the point at which the mean anomaly at epoch was measured, in seconds
The inclination of the orbit, in radians
Returns the times at closest approach and corresponding distances, to a target vessel
The longitude of the ascending node, in radians
The mean anomaly at the given time
If the object is going to change sphere of influence in the future, returns the new orbit after the change
The current orbital speed in meters per second
The orbital speed at the given time, in meters per second
The periapsis of the orbit, in meters, from the center of mass of the body being orbited
The periapsis of the orbit, in meters, above the sea level of the body being orbited
The orbital period, in seconds
The position at a given time, in the specified reference frame
The current radius of the orbit, in meters
The orbital radius at the given time, in meters
The orbital radius at the point in the orbit given by the true anomaly
The direction from which the orbits longitude of ascending node is measured, in the given reference frame
The direction that is normal to the orbits reference plane, in the given reference frame
Relative inclination of this orbit and the orbit of the given target vessel, in radians
The semi-major axis of the orbit, in meters
The semi-minor axis of the orbit, in meters
The current orbital speed of the object in meters per second
Estimates and returns the time at closest approach to a target vessel
The time until the object reaches apoapsis, in seconds
The time until the object reaches periapsis, in seconds
The time until the object changes sphere of influence, in seconds
The true anomaly of the ascending node with the given target vessel
The true anomaly of the descending node with the given target vessel
The true anomaly at the given orbital radius
The true anomaly at the given time
The universal time, in seconds, corresponding to the given true anomaly
Link to this section Functions
Gets the apoapsis of the orbit, in meters, from the center of mass of the body being orbited.
For the apoapsis altitude reported on the in-game map view,
use SpaceEx.SpaceCenter.Orbit.apoapsis_altitude/1.
Returns: a high precision decimal
The apoapsis of the orbit, in meters, above the sea level of the body being orbited.
This is equal to SpaceEx.SpaceCenter.Orbit.apoapsis/1 minus the equatorial radius of the body.
Returns: a high precision decimal
The argument of periapsis, in radians.
Returns: a high precision decimal
The celestial body (e.g.
planet or moon) around which the object is orbiting.
Returns: a reference to a SpaceEx.SpaceCenter.CelestialBody object
Estimates and returns the distance at closest approach to a target vessel, in meters.
target— Target vessel.
Returns: a high precision decimal
The eccentric anomaly.
Returns: a high precision decimal
The eccentric anomaly at the given universal time.
ut— The universal time, in seconds.
Returns: a high precision decimal
The eccentricity of the orbit.
Returns: a high precision decimal
The time since the epoch (the point at which the mean anomaly at epoch was measured, in seconds.
Returns: a high precision decimal
The inclination of the orbit, in radians.
Returns: a high precision decimal
Returns the times at closest approach and corresponding distances, to a target vessel.
Returns A list of two lists. The first is a list of times at closest approach, as universal times in seconds. The second is a list of corresponding distances at closest approach, in meters.
target— Target vessel.orbits— The number of future orbits to search.
Returns: [[double, ...], ...], where double is a high precision decimal
The longitude of the ascending node, in radians.
Returns: a high precision decimal
The mean anomaly.
Returns: a high precision decimal
Returns: a high precision decimal
The mean anomaly at the given time.
ut— The universal time in seconds.
Returns: a high precision decimal
If the object is going to change sphere of influence in the future, returns the new orbit after the change.
Otherwise returns nil.
Returns: a reference to a SpaceEx.SpaceCenter.Orbit object
The current orbital speed in meters per second.
Returns: a high precision decimal
The orbital speed at the given time, in meters per second.
time— Time from now, in seconds.
Returns: a high precision decimal
The periapsis of the orbit, in meters, from the center of mass of the body being orbited.
For the periapsis altitude reported on the in-game map view,
use SpaceEx.SpaceCenter.Orbit.periapsis_altitude/1.
Returns: a high precision decimal
The periapsis of the orbit, in meters, above the sea level of the body being orbited.
This is equal to SpaceEx.SpaceCenter.Orbit.periapsis/1 minus the equatorial radius of the body.
Returns: a high precision decimal
The orbital period, in seconds.
Returns: a high precision decimal
The position at a given time, in the specified reference frame.
Returns the position as a vector.
ut— The universal time to measure the position at.reference_frame— The reference frame that the returned position vector is in.
Returns: {double, double, double}, where double is a high precision decimal
The current radius of the orbit, in meters.
This is the distance between the center of mass of the object in orbit, and the center of mass of the body around which it is orbiting.
This value will change over time if the orbit is elliptical.
Returns: a high precision decimal
The orbital radius at the given time, in meters.
ut— The universal time to measure the radius at.
Returns: a high precision decimal
The orbital radius at the point in the orbit given by the true anomaly.
true_anomaly— The true anomaly.
Returns: a high precision decimal
The direction from which the orbits longitude of ascending node is measured, in the given reference frame.
Returns the direction as a unit vector.
reference_frame— The reference frame that the returned direction is in.
Returns: {double, double, double}, where double is a high precision decimal
The direction that is normal to the orbits reference plane, in the given reference frame.
The reference plane is the plane from which the orbits inclination is measured.
Returns the direction as a unit vector.
reference_frame— The reference frame that the returned direction is in.
Returns: {double, double, double}, where double is a high precision decimal
Relative inclination of this orbit and the orbit of the given target vessel, in radians.
target— Target vessel.
Returns: a high precision decimal
The semi-major axis of the orbit, in meters.
Returns: a high precision decimal
The semi-minor axis of the orbit, in meters.
Returns: a high precision decimal
The current orbital speed of the object in meters per second.
This value will change over time if the orbit is elliptical.
Returns: a high precision decimal
Estimates and returns the time at closest approach to a target vessel.
Returns the universal time at closest approach, in seconds.
target— Target vessel.
Returns: a high precision decimal
The time until the object reaches apoapsis, in seconds.
Returns: a high precision decimal
The time until the object reaches periapsis, in seconds.
Returns: a high precision decimal
The time until the object changes sphere of influence, in seconds.
Returns NaN
if the object is not going to change sphere of influence.
Returns: a high precision decimal
The true anomaly.
Returns: a high precision decimal
The true anomaly of the ascending node with the given target vessel.
target— Target vessel.
Returns: a high precision decimal
The true anomaly of the descending node with the given target vessel.
target— Target vessel.
Returns: a high precision decimal
The true anomaly at the given orbital radius.
radius— The orbital radius in meters.
Returns: a high precision decimal
The true anomaly at the given time.
ut— The universal time in seconds.
Returns: a high precision decimal
The universal time, in seconds, corresponding to the given true anomaly.
true_anomaly— True anomaly.
Returns: a high precision decimal