Orbit¶
- class Orbit¶
Describes an orbit. For example, the orbit of a vessel, obtained by calling
Vessel.Orbit
, or a celestial body, obtained by callingCelestialBody.Orbit
.- CelestialBody Body { get; }¶
The celestial body (e.g. planet or moon) around which the object is orbiting.
- Game Scenes:
All
- Double Apoapsis { get; }¶
Gets the apoapsis of the orbit, in meters, from the center of mass of the body being orbited.
- Game Scenes:
All
Note
For the apoapsis altitude reported on the in-game map view, use
Orbit.ApoapsisAltitude
.
- Double Periapsis { get; }¶
The periapsis of the orbit, in meters, from the center of mass of the body being orbited.
- Game Scenes:
All
Note
For the periapsis altitude reported on the in-game map view, use
Orbit.PeriapsisAltitude
.
- Double ApoapsisAltitude { get; }¶
The apoapsis of the orbit, in meters, above the sea level of the body being orbited.
- Game Scenes:
All
Note
This is equal to
Orbit.Apoapsis
minus the equatorial radius of the body.
- Double PeriapsisAltitude { get; }¶
The periapsis of the orbit, in meters, above the sea level of the body being orbited.
- Game Scenes:
All
Note
This is equal to
Orbit.Periapsis
minus the equatorial radius of the body.
- Double Radius { get; }¶
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.
- Game Scenes:
All
Note
This value will change over time if the orbit is elliptical.
- Double RadiusAt (Double ut)¶
The orbital radius at the given time, in meters.
- Parameters:
ut – The universal time to measure the radius at.
- Game Scenes:
All
- Tuple<Double, Double, Double> PositionAt (Double ut, ReferenceFrame referenceFrame)¶
The position at a given time, in the specified reference frame.
- Parameters:
ut – The universal time to measure the position at.
referenceFrame – The reference frame that the returned position vector is in.
- Returns:
The position as a vector.
- Game Scenes:
All
- Double Speed { get; }¶
The current orbital speed of the object in meters per second.
- Game Scenes:
All
Note
This value will change over time if the orbit is elliptical.
- Double TimeToApoapsis { get; }¶
The time until the object reaches apoapsis, in seconds.
- Game Scenes:
All
- Double TimeToPeriapsis { get; }¶
The time until the object reaches periapsis, in seconds.
- Game Scenes:
All
- Double Eccentricity { get; }¶
The eccentricity of the orbit.
- Game Scenes:
All
- Double Inclination { get; }¶
The inclination of the orbit, in radians.
- Game Scenes:
All
- Double LongitudeOfAscendingNode { get; }¶
The longitude of the ascending node, in radians.
- Game Scenes:
All
- Double ArgumentOfPeriapsis { get; }¶
The argument of periapsis, in radians.
- Game Scenes:
All
- Double Epoch { get; }¶
The time since the epoch (the point at which the mean anomaly at epoch was measured, in seconds.
- Game Scenes:
All
- Double MeanAnomaly { get; }¶
The mean anomaly.
- Game Scenes:
All
- Double MeanAnomalyAtUT (Double ut)¶
The mean anomaly at the given time.
- Parameters:
ut – The universal time in seconds.
- Game Scenes:
All
- Double EccentricAnomaly { get; }¶
The eccentric anomaly.
- Game Scenes:
All
- Double EccentricAnomalyAtUT (Double ut)¶
The eccentric anomaly at the given universal time.
- Parameters:
ut – The universal time, in seconds.
- Game Scenes:
All
- Double TrueAnomaly { get; }¶
The true anomaly.
- Game Scenes:
All
- Double TrueAnomalyAtUT (Double ut)¶
The true anomaly at the given time.
- Parameters:
ut – The universal time in seconds.
- Game Scenes:
All
- Double TrueAnomalyAtRadius (Double radius)¶
The true anomaly at the given orbital radius.
- Parameters:
radius – The orbital radius in meters.
- Game Scenes:
All
- Double UTAtTrueAnomaly (Double trueAnomaly)¶
The universal time, in seconds, corresponding to the given true anomaly.
- Parameters:
trueAnomaly – True anomaly.
- Game Scenes:
All
- Double RadiusAtTrueAnomaly (Double trueAnomaly)¶
The orbital radius at the point in the orbit given by the true anomaly.
- Parameters:
trueAnomaly – The true anomaly.
- Game Scenes:
All
- Double TrueAnomalyAtAN (Orbit target)¶
The true anomaly of the ascending node with the given target orbit.
- Parameters:
target – Target orbit.
- Game Scenes:
All
- Double TrueAnomalyAtDN (Orbit target)¶
The true anomaly of the descending node with the given target orbit.
- Parameters:
target – Target orbit.
- Game Scenes:
All
- Double OrbitalSpeedAt (Double time)¶
The orbital speed at the given time, in meters per second.
- Parameters:
time – Time from now, in seconds.
- Game Scenes:
All
- static Tuple<Double, Double, Double> ReferencePlaneNormal (IConnection connection, ReferenceFrame referenceFrame)¶
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.
- Parameters:
referenceFrame – The reference frame that the returned direction is in.
- Returns:
The direction as a unit vector.
- Game Scenes:
All
- static Tuple<Double, Double, Double> ReferencePlaneDirection (IConnection connection, ReferenceFrame referenceFrame)¶
The direction from which the orbits longitude of ascending node is measured, in the given reference frame.
- Parameters:
referenceFrame – The reference frame that the returned direction is in.
- Returns:
The direction as a unit vector.
- Game Scenes:
All
- Double RelativeInclination (Orbit target)¶
Relative inclination of this orbit and the target orbit, in radians.
- Parameters:
target – Target orbit.
- Game Scenes:
All
- Double TimeToSOIChange { get; }¶
The time until the object changes sphere of influence, in seconds. Returns
NaN
if the object is not going to change sphere of influence.- Game Scenes:
All
- Orbit NextOrbit { get; }¶
If the object is going to change sphere of influence in the future, returns the new orbit after the change. Otherwise returns
null
.- Game Scenes:
All
- Double TimeOfClosestApproach (Orbit target)¶
Estimates and returns the time at closest approach to a target orbit.
- Parameters:
target – Target orbit.
- Returns:
The universal time at closest approach, in seconds.
- Game Scenes:
All
- Double DistanceAtClosestApproach (Orbit target)¶
Estimates and returns the distance at closest approach to a target orbit, in meters.
- Parameters:
target – Target orbit.
- Game Scenes:
All
- IList<IList<Double>> ListClosestApproaches (Orbit target, Int32 orbits)¶
Returns the times at closest approach and corresponding distances, to a target orbit.
- Parameters:
target – Target orbit.
orbits – The number of future orbits to search.
- 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.
- Game Scenes:
All