space_ex v0.4.0 SpaceEx.SpaceCenter.Orbit
Describes an orbit.
For example, the orbit of a vessel, obtained by calling
SpaceEx.SpaceCenter.Vessel.orbit/2
, or a celestial body, obtained by calling
SpaceEx.SpaceCenter.CelestialBody.orbit/2
.
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 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/2
.
The apoapsis of the orbit, in meters, above the sea level of the body being orbited.
This is equal to SpaceEx.SpaceCenter.Orbit.apoapsis/2
minus the equatorial radius of the body.
The argument of periapsis, in radians.
The celestial body (e.g.
planet or moon) around which the object is orbiting.
Estimates and returns the distance at closest approach to a target vessel, in meters.
target
— Target vessel.
The eccentric anomaly.
The eccentric anomaly at the given universal time.
ut
— The universal time, in seconds.
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.
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.
The longitude of the ascending node, in radians.
The mean anomaly.
The mean anomaly at the given time.
ut
— The universal time in seconds.
If the object is going to change sphere of influence in the future, returns the new orbit after the change.
Otherwise returns nil
.
The current orbital speed in meters per second.
The orbital speed at the given time, in meters per second.
time
— Time from now, in seconds.
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/2
.
The periapsis of the orbit, in meters, above the sea level of the body being orbited.
This is equal to SpaceEx.SpaceCenter.Orbit.periapsis/2
minus the equatorial radius of the body.
The orbital period, in seconds.
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.referenceFrame
— The reference frame that the returned position vector is in.
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.
The orbital radius at the given time, in meters.
ut
— The universal time to measure the radius at.
The orbital radius at the point in the orbit given by the true anomaly.
trueAnomaly
— The true anomaly.
The direction from which the orbits longitude of ascending node is measured, in the given reference frame.
Returns: The direction as a unit vector.
referenceFrame
— The reference frame that the returned direction is in.
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.
referenceFrame
— The reference frame that the returned direction is in.
Relative inclination of this orbit and the orbit of the given target vessel, in radians.
target
— Target vessel.
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.
This value will change over time if the orbit is elliptical.
Estimates and returns the time at closest approach to a target vessel.
Returns: The universal time at closest approach, in seconds.
target
— 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.
Returns NaN
if the object is not going to change sphere of influence.
The true anomaly.
The true anomaly of the ascending node with the given target vessel.
target
— Target vessel.
The true anomaly of the descending node with the given target vessel.
target
— Target vessel.
The true anomaly at the given orbital radius.
radius
— The orbital radius in meters.
The true anomaly at the given time.
ut
— The universal time in seconds.
The universal time, in seconds, corresponding to the given true anomaly.
trueAnomaly
— True anomaly.