space_ex v0.1.0 SpaceEx.SpaceCenter.Orbit

Describes an orbit.

For example, the orbit of a vessel, obtained by calling SpaceEx.SpaceCenter.Vessel.get_orbit/2, or a celestial body, obtained by calling SpaceEx.SpaceCenter.CelestialBody.get_orbit/2.

Link to this section Summary

Functions

Estimates and returns the distance at closest approach to a target vessel, in meters

The eccentric anomaly at the given universal time

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 celestial body (e.g

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

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 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 current radius of the orbit, in meters

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

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 the times at closest approach and corresponding distances, to a target vessel

The mean anomaly at the given time

The orbital speed at the given time, in meters per second

The position at a given time, in the specified reference frame

The orbital radius at the given time, in meters

The orbital radius at the point in the orbit given by the true anomaly

Relative inclination of this orbit and the orbit of the given target vessel, in radians

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

Estimates and returns the time at closest approach to a target vessel

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

Link to this function distance_at_closest_approach(conn, this, target)

Estimates and returns the distance at closest approach to a target vessel, in meters.

  • target — Target vessel.
Link to this function eccentric_anomaly_at_ut(conn, this, ut)

The eccentric anomaly at the given universal time.

  • ut — The universal time, in seconds.
Link to this function get_apoapsis(conn, this)

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.get_apoapsis_altitude/2.

Link to this function get_apoapsis_altitude(conn, this)

The apoapsis of the orbit, in meters, above the sea level of the body being orbited.

This is equal to SpaceEx.SpaceCenter.Orbit.get_apoapsis/2 minus the equatorial radius of the body.

Link to this function get_argument_of_periapsis(conn, this)

The argument of periapsis, in radians.

Link to this function get_body(conn, this)

The celestial body (e.g.

planet or moon) around which the object is orbiting.

Link to this function get_eccentric_anomaly(conn, this)

The eccentric anomaly.

Link to this function get_eccentricity(conn, this)

The eccentricity of the orbit.

Link to this function get_epoch(conn, this)

The time since the epoch (the point at which the mean anomaly at epoch was measured, in seconds.

Link to this function get_inclination(conn, this)

The inclination of the orbit, in radians.

Link to this function get_longitude_of_ascending_node(conn, this)

The longitude of the ascending node, in radians.

Link to this function get_mean_anomaly(conn, this)

The mean anomaly.

Link to this function get_mean_anomaly_at_epoch(conn, this)

The mean anomaly at epoch.

Link to this function get_next_orbit(conn, this)

If the object is going to change sphere of influence in the future, returns the new orbit after the change.

Otherwise returns nil.

Link to this function get_orbital_speed(conn, this)

The current orbital speed in meters per second.

Link to this function get_periapsis(conn, this)

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.get_periapsis_altitude/2.

Link to this function get_periapsis_altitude(conn, this)

The periapsis of the orbit, in meters, above the sea level of the body being orbited.

This is equal to SpaceEx.SpaceCenter.Orbit.get_periapsis/2 minus the equatorial radius of the body.

Link to this function get_period(conn, this)

The orbital period, in seconds.

Link to this function get_radius(conn, this)

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.

Link to this function get_semi_major_axis(conn, this)

The semi-major axis of the orbit, in meters.

Link to this function get_semi_minor_axis(conn, this)

The semi-minor axis of the orbit, in meters.

Link to this function get_speed(conn, this)

The current orbital speed of the object in meters per second.

This value will change over time if the orbit is elliptical.

Link to this function get_time_to_apoapsis(conn, this)

The time until the object reaches apoapsis, in seconds.

Link to this function get_time_to_periapsis(conn, this)

The time until the object reaches periapsis, in seconds.

Link to this function get_time_to_soi_change(conn, this)

The time until the object changes sphere of influence, in seconds.

Returns NaN if the object is not going to change sphere of influence.

Link to this function get_true_anomaly(conn, this)

The true anomaly.

Link to this function list_closest_approaches(conn, this, target, orbits)

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.

Link to this function mean_anomaly_at_ut(conn, this, ut)

The mean anomaly at the given time.

  • ut — The universal time in seconds.
Link to this function orbital_speed_at(conn, this, time)

The orbital speed at the given time, in meters per second.

  • time — Time from now, in seconds.
Link to this function position_at(conn, this, ut, referenceFrame)

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.

Link to this function radius_at(conn, this, ut)

The orbital radius at the given time, in meters.

  • ut — The universal time to measure the radius at.
Link to this function radius_at_true_anomaly(conn, this, trueAnomaly)

The orbital radius at the point in the orbit given by the true anomaly.

  • trueAnomaly — The true anomaly.
Link to this function relative_inclination(conn, this, target)

Relative inclination of this orbit and the orbit of the given target vessel, in radians.

  • target — Target vessel.
Link to this function static_reference_plane_direction(conn, referenceFrame)

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.
Link to this function static_reference_plane_normal(conn, 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.

Returns: The direction as a unit vector.

  • referenceFrame — The reference frame that the returned direction is in.
Link to this function time_of_closest_approach(conn, this, target)

Estimates and returns the time at closest approach to a target vessel.

Returns: The universal time at closest approach, in seconds.

  • target — Target vessel.
Link to this function true_anomaly_at_an(conn, this, target)

The true anomaly of the ascending node with the given target vessel.

  • target — Target vessel.
Link to this function true_anomaly_at_dn(conn, this, target)

The true anomaly of the descending node with the given target vessel.

  • target — Target vessel.
Link to this function true_anomaly_at_radius(conn, this, radius)

The true anomaly at the given orbital radius.

  • radius — The orbital radius in meters.
Link to this function true_anomaly_at_ut(conn, this, ut)

The true anomaly at the given time.

  • ut — The universal time in seconds.
Link to this function ut_at_true_anomaly(conn, this, trueAnomaly)

The universal time, in seconds, corresponding to the given true anomaly.

  • trueAnomaly — True anomaly.