Orbit#

type krpc_SpaceCenter_Orbit_t#

Describes an orbit. For example, the orbit of a vessel, obtained by calling krpc_SpaceCenter_Vessel_Orbit(), or a celestial body, obtained by calling krpc_SpaceCenter_CelestialBody_Orbit().

krpc_error_t krpc_SpaceCenter_Orbit_CreateFromPositionAndVelocity(krpc_connection_t connection, krpc_SpaceCenter_Orbit_t *returnValue, krpc_SpaceCenter_CelestialBody_t body, const krpc_tuple_double_double_double_t *position, const krpc_tuple_double_double_double_t *velocity, double ut, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#

Create the orbit that passes through a given position at a given velocity. The orbit coasts freely under the gravity of the body being orbited, so it describes where an object left to fall from that position and velocity would be at any later time.

Parameters:
  • body – The celestial body being orbited.

  • position – The position, as a position vector.

  • velocity – The velocity, as a vector pointing in the direction of travel, whose magnitude is the speed in meters per second.

  • ut – The universal time, in seconds, at which the object is at position traveling at velocity.

  • referenceFrame – The reference frame that position and velocity are in. Defaults to krpc_SpaceCenter_CelestialBody_NonRotatingReferenceFrame() of body.

Note

The orbit is a single conic around body. It never changes sphere of influence, so krpc_SpaceCenter_Orbit_NextOrbit() is nullptr, and no atmosphere slows it. A vessel held on rails follows its own orbit exactly, while one inside the physics bubble is simulated and drifts from it a little.

krpc_SpaceCenter_Orbit_Radius(), krpc_SpaceCenter_Orbit_Speed(), krpc_SpaceCenter_Orbit_Position(), krpc_SpaceCenter_Orbit_Velocity() and the like describe the orbit at ut and stay there. Use krpc_SpaceCenter_Orbit_RadiusAt(), krpc_SpaceCenter_Orbit_SpeedAt(), krpc_SpaceCenter_Orbit_PositionAt(), krpc_SpaceCenter_Orbit_VelocityAt() and krpc_SpaceCenter_Orbit_TrueAnomalyAtUT() for another time, and krpc_SpaceCenter_Orbit_ReferenceFrame() and krpc_SpaceCenter_Orbit_OrbitalReferenceFrame() to follow the orbit as time passes.

The orbit is held until krpc_SpaceCenter_Orbit_Remove() is called on it or the client that created it disconnects. Remove each one created by a script that creates them repeatedly, for example once per update.

krpc_error_t krpc_SpaceCenter_Orbit_CreateFromOrbitalElements(krpc_connection_t connection, krpc_SpaceCenter_Orbit_t *returnValue, krpc_SpaceCenter_CelestialBody_t body, double semiMajorAxis, double eccentricity, double inclination, double longitudeOfAscendingNode, double argumentOfPeriapsis, double meanAnomalyAtEpoch, double epoch)#

Create the orbit with the given orbital elements around a given body. The orbit coasts freely under the gravity of that body, so it describes where an object on it would be at any time.

Parameters:
  • body – The celestial body being orbited.

  • semiMajorAxis – The semi-major axis of the orbit, in meters. Positive for an ellipse and negative for a hyperbola.

  • eccentricity – The eccentricity of the orbit. Below one for an ellipse and above one for a hyperbola.

  • inclination – The inclination of the orbit, in radians.

  • longitudeOfAscendingNode – The longitude of the ascending node, in radians.

  • argumentOfPeriapsis – The argument of periapsis, in radians.

  • meanAnomalyAtEpoch – The mean anomaly at epoch, in radians.

  • epoch – The universal time, in seconds, that meanAnomalyAtEpoch is measured at.

Note

The orbit is a single conic around body. It never changes sphere of influence, so krpc_SpaceCenter_Orbit_NextOrbit() is nullptr, and no atmosphere slows it.

The angles are measured against the reference plane and direction that krpc_SpaceCenter_Orbit_Inclination(), krpc_SpaceCenter_Orbit_LongitudeOfAscendingNode() and krpc_SpaceCenter_Orbit_ArgumentOfPeriapsis() report them against. krpc_SpaceCenter_Orbit_ReferencePlaneNormal() and krpc_SpaceCenter_Orbit_ReferencePlaneDirection() give these as vectors in a reference frame.

krpc_SpaceCenter_Orbit_Radius(), krpc_SpaceCenter_Orbit_Speed(), krpc_SpaceCenter_Orbit_Position(), krpc_SpaceCenter_Orbit_Velocity() and the like describe the orbit at epoch and stay there. Use krpc_SpaceCenter_Orbit_RadiusAt(), krpc_SpaceCenter_Orbit_SpeedAt(), krpc_SpaceCenter_Orbit_PositionAt(), krpc_SpaceCenter_Orbit_VelocityAt() and krpc_SpaceCenter_Orbit_TrueAnomalyAtUT() for another time, and krpc_SpaceCenter_Orbit_ReferenceFrame() and krpc_SpaceCenter_Orbit_OrbitalReferenceFrame() to follow the orbit as time passes.

The orbit is held until krpc_SpaceCenter_Orbit_Remove() is called on it or the client that created it disconnects. Remove each one created by a script that creates them repeatedly, for example once per update.

krpc_error_t krpc_SpaceCenter_Orbit_Remove(krpc_connection_t connection, krpc_SpaceCenter_Orbit_t instance)#

Remove the orbit, releasing the memory the server holds for it.

Note

Only an orbit created by krpc_SpaceCenter_Orbit_CreateFromPositionAndVelocity() or krpc_SpaceCenter_Orbit_CreateFromOrbitalElements() can be removed. Every other orbit belongs to something in the game, and the server holds one of each.

Any further use of this object throws an exception, as does use of a reference frame defined against it. An orbit belongs to the client that created it, and is removed when that client disconnects.

krpc_error_t krpc_SpaceCenter_Orbit_Body(krpc_connection_t connection, krpc_SpaceCenter_CelestialBody_t *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The celestial body (e.g. planet or moon) around which the object is orbiting.

krpc_error_t krpc_SpaceCenter_Orbit_ReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The reference frame that moves along the orbit, and is orientated in a fixed direction.

  • The origin is at the point the orbit has reached at the current time.

  • The axes do not rotate. They point in the same fixed directions as those of krpc_SpaceCenter_CelestialBody_NonRotatingReferenceFrame() of krpc_SpaceCenter_Orbit_Body().

Note

For the orbit of a vessel, the origin is the point the vessel’s orbit has reached rather than the vessel’s own center of mass. The two are a few meters apart, as a vessel inside the physics bubble is simulated rather than being held on its orbit.

krpc_error_t krpc_SpaceCenter_Orbit_OrbitalReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The reference frame that moves along the orbit, and is orientated with its prograde/normal/radial directions.

  • The origin is at the point the orbit has reached at the current time.

  • The axes rotate with the orbital prograde/normal/radial directions.

  • The x-axis points in the orbital anti-radial direction.

  • The y-axis points in the orbital prograde direction.

  • The z-axis points in the orbital normal direction.

Note

For the orbit of a vessel, the origin is the point the vessel’s orbit has reached rather than the vessel’s own center of mass, which is what krpc_SpaceCenter_Vessel_OrbitalReferenceFrame() is centered on.

krpc_error_t krpc_SpaceCenter_Orbit_Apoapsis(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

Gets the apoapsis of the orbit, in meters, from the center of mass of the body being orbited.

Note

For the apoapsis altitude reported on the in-game map view, use krpc_SpaceCenter_Orbit_ApoapsisAltitude().

krpc_error_t krpc_SpaceCenter_Orbit_Periapsis(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The periapsis of the orbit, in meters, from the center of mass of the body being orbited.

Note

For the periapsis altitude reported on the in-game map view, use krpc_SpaceCenter_Orbit_PeriapsisAltitude().

krpc_error_t krpc_SpaceCenter_Orbit_ApoapsisAltitude(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

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

Note

This is equal to krpc_SpaceCenter_Orbit_Apoapsis() minus the equatorial radius of the body.

krpc_error_t krpc_SpaceCenter_Orbit_PeriapsisAltitude(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

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

Note

This is equal to krpc_SpaceCenter_Orbit_Periapsis() minus the equatorial radius of the body.

krpc_error_t krpc_SpaceCenter_Orbit_SemiMajorAxis(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

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

krpc_error_t krpc_SpaceCenter_Orbit_SemiMinorAxis(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

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

krpc_error_t krpc_SpaceCenter_Orbit_SemiLatusRectum(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The semi-latus rectum of the orbit, in meters.

krpc_error_t krpc_SpaceCenter_Orbit_Radius(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

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.

Note

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

krpc_error_t krpc_SpaceCenter_Orbit_Altitude(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The current altitude of the object, in meters above the sea level of the body being orbited.

Note

This is equal to krpc_SpaceCenter_Orbit_Radius() minus the equatorial radius of the body.

krpc_error_t krpc_SpaceCenter_Orbit_RadiusAt(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double ut)#

The orbital radius at the given time, in meters.

Parameters:
  • ut – The universal time to measure the radius at.

krpc_error_t krpc_SpaceCenter_Orbit_RadiusAtTrueAnomaly(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double trueAnomaly)#

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

Parameters:
  • trueAnomaly – The true anomaly.

krpc_error_t krpc_SpaceCenter_Orbit_Position(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Orbit_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#

The position the orbit has reached at the current time, in the given reference frame.

Parameters:
  • referenceFrame – The reference frame that the returned position vector is in. Defaults to krpc_SpaceCenter_CelestialBody_NonRotatingReferenceFrame() of krpc_SpaceCenter_Orbit_Body().

Returns:

The position as a vector.

krpc_error_t krpc_SpaceCenter_Orbit_PositionAt(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Orbit_t instance, double ut, krpc_SpaceCenter_ReferenceFrame_t 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. Defaults to krpc_SpaceCenter_CelestialBody_NonRotatingReferenceFrame() of krpc_SpaceCenter_Orbit_Body().

Returns:

The position as a vector.

krpc_error_t krpc_SpaceCenter_Orbit_PositionAtTrueAnomaly(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Orbit_t instance, double trueAnomaly, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#

The position at the point in the orbit given by the true anomaly, in the specified reference frame.

Parameters:
  • trueAnomaly – The true anomaly.

  • referenceFrame – The reference frame that the returned position vector is in. Defaults to krpc_SpaceCenter_CelestialBody_NonRotatingReferenceFrame() of krpc_SpaceCenter_Orbit_Body().

Returns:

The position as a vector.

krpc_error_t krpc_SpaceCenter_Orbit_Velocity(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Orbit_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#

The velocity the orbit has reached at the current time, in the given reference frame.

Parameters:
  • referenceFrame – The reference frame that the returned velocity vector is in. Defaults to krpc_SpaceCenter_CelestialBody_NonRotatingReferenceFrame() of krpc_SpaceCenter_Orbit_Body().

Returns:

The velocity as a vector. The vector points in the direction of travel, and its magnitude is the speed in meters per second.

krpc_error_t krpc_SpaceCenter_Orbit_VelocityAt(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Orbit_t instance, double ut, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#

The velocity at a given time, in the specified reference frame.

Parameters:
  • ut – The universal time to measure the velocity at.

  • referenceFrame – The reference frame that the returned velocity vector is in. Defaults to krpc_SpaceCenter_CelestialBody_NonRotatingReferenceFrame() of krpc_SpaceCenter_Orbit_Body().

Returns:

The velocity as a vector. The vector points in the direction of travel, and its magnitude is the speed in meters per second.

krpc_error_t krpc_SpaceCenter_Orbit_VelocityAtTrueAnomaly(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Orbit_t instance, double trueAnomaly, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#

The velocity at the point in the orbit given by the true anomaly, in the specified reference frame.

Parameters:
  • trueAnomaly – The true anomaly.

  • referenceFrame – The reference frame that the returned velocity vector is in. Defaults to krpc_SpaceCenter_CelestialBody_NonRotatingReferenceFrame() of krpc_SpaceCenter_Orbit_Body().

Returns:

The velocity as a vector. The vector points in the direction of travel, and its magnitude is the speed in meters per second.

krpc_error_t krpc_SpaceCenter_Orbit_Speed(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

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

Note

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

krpc_error_t krpc_SpaceCenter_Orbit_SpeedAt(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double ut)#

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

Parameters:
  • ut – The universal time to measure the speed at.

krpc_error_t krpc_SpaceCenter_Orbit_SpeedAtRadius(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double radius)#

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

Parameters:
  • radius – The orbital radius in meters.

Note

This is the vis-viva speed. A radius the orbit never reaches is accepted. On an ellipse the speed is NaN above twice the semi-major axis.

krpc_error_t krpc_SpaceCenter_Orbit_SpeedAtTrueAnomaly(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double trueAnomaly)#

The orbital speed at the point in the orbit given by the true anomaly, in meters per second.

Parameters:
  • trueAnomaly – The true anomaly.

krpc_error_t krpc_SpaceCenter_Orbit_SpecificEnergy(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The specific orbital energy, in Joules per kilogram (equivalently, meters squared per second squared).

Note

This is the sum of the orbit’s specific kinetic and potential energy, and is negative for a bound (elliptical) orbit.

krpc_error_t krpc_SpaceCenter_Orbit_SpecificAngularMomentum(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The specific relative angular momentum, in meters squared per second.

krpc_error_t krpc_SpaceCenter_Orbit_Period(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The orbital period, in seconds.

krpc_error_t krpc_SpaceCenter_Orbit_MeanMotion(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The mean motion, in radians per second.

krpc_error_t krpc_SpaceCenter_Orbit_TimeToApoapsis(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The time until the object reaches apoapsis, in seconds.

krpc_error_t krpc_SpaceCenter_Orbit_TimeToPeriapsis(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The time until the object reaches periapsis, in seconds.

krpc_error_t krpc_SpaceCenter_Orbit_Eccentricity(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The eccentricity of the orbit.

krpc_error_t krpc_SpaceCenter_Orbit_Inclination(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The inclination of the orbit, in radians.

krpc_error_t krpc_SpaceCenter_Orbit_LongitudeOfAscendingNode(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The longitude of the ascending node, in radians.

Note

For a near-equatorial orbit, the ascending node is ill-defined and this value may vary erratically over time.

krpc_error_t krpc_SpaceCenter_Orbit_ArgumentOfPeriapsis(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The argument of periapsis, in radians.

Note

For a near-circular orbit, the periapsis is ill-defined and this value may vary erratically over time.

krpc_error_t krpc_SpaceCenter_Orbit_MeanAnomalyAtEpoch(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The mean anomaly at epoch.

krpc_error_t krpc_SpaceCenter_Orbit_Epoch(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The universal time, in seconds, at which the mean anomaly at epoch is measured.

krpc_error_t krpc_SpaceCenter_Orbit_MeanAnomaly(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The mean anomaly.

krpc_error_t krpc_SpaceCenter_Orbit_MeanAnomalyAtUT(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double ut)#

The mean anomaly at the given time.

Parameters:
  • ut – The universal time in seconds.

krpc_error_t krpc_SpaceCenter_Orbit_EccentricAnomaly(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The eccentric anomaly.

krpc_error_t krpc_SpaceCenter_Orbit_EccentricAnomalyAtUT(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double ut)#

The eccentric anomaly at the given universal time.

Parameters:
  • ut – The universal time, in seconds.

krpc_error_t krpc_SpaceCenter_Orbit_TrueAnomaly(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The true anomaly.

krpc_error_t krpc_SpaceCenter_Orbit_TrueAnomalyAtUT(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double ut)#

The true anomaly at the given time.

Parameters:
  • ut – The universal time in seconds.

krpc_error_t krpc_SpaceCenter_Orbit_TrueAnomalyAtRadius(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double radius)#

The true anomaly at the given orbital radius.

Parameters:
  • radius – The orbital radius in meters.

krpc_error_t krpc_SpaceCenter_Orbit_UTAtTrueAnomaly(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double trueAnomaly)#

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

Parameters:
  • trueAnomaly – True anomaly.

krpc_error_t krpc_SpaceCenter_Orbit_TrueAnomalyAtAN(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, krpc_SpaceCenter_Orbit_t target)#

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

Parameters:
  • target – Target orbit.

krpc_error_t krpc_SpaceCenter_Orbit_TrueAnomalyAtDN(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, krpc_SpaceCenter_Orbit_t target)#

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

Parameters:
  • target – Target orbit.

krpc_error_t krpc_SpaceCenter_Orbit_OrbitalSpeed(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

Warning

Deprecated. Use krpc_SpaceCenter_Orbit_Speed() instead.

The current orbital speed in meters per second.

krpc_error_t krpc_SpaceCenter_Orbit_OrbitalSpeedAt(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, double ut)#

Warning

Deprecated. Use krpc_SpaceCenter_Orbit_SpeedAt() instead.

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

Parameters:
  • ut – The universal time to measure the speed at.

krpc_error_t krpc_SpaceCenter_Orbit_OrbitalEnergy(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

Warning

Deprecated. Use krpc_SpaceCenter_Orbit_SpecificEnergy() instead.

The specific orbital energy of the orbit, in Joules per kilogram.

krpc_error_t krpc_SpaceCenter_Orbit_ReferencePlaneNormal(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_ReferenceFrame_t 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.

krpc_error_t krpc_SpaceCenter_Orbit_ReferencePlaneDirection(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_ReferenceFrame_t 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.

krpc_error_t krpc_SpaceCenter_Orbit_RelativeInclination(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance, krpc_SpaceCenter_Orbit_t target)#

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

Parameters:
  • target – Target orbit.

krpc_error_t krpc_SpaceCenter_Orbit_TimeToSOIChange(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Orbit_t instance)#

The time until the object changes sphere of influence, in seconds. Returns NaN if the object is not going to change sphere of influence.

krpc_error_t krpc_SpaceCenter_Orbit_NextOrbit(krpc_connection_t connection, krpc_SpaceCenter_Orbit_t *returnValue, krpc_SpaceCenter_Orbit_t instance)#

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

krpc_error_t krpc_SpaceCenter_Orbit_NextClosestApproach(krpc_connection_t connection, krpc_SpaceCenter_ClosestApproach_t *returnValue, krpc_SpaceCenter_Orbit_t instance, krpc_SpaceCenter_Orbit_t target)#

The next closest approach to a target orbit.

Parameters:
  • target – Target orbit.

krpc_error_t krpc_SpaceCenter_Orbit_ClosestApproaches(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Orbit_t instance, krpc_SpaceCenter_Orbit_t target, int32_t orbits)#

A list of the closest approaches to a target orbit, one for each of the next orbits orbital periods.

Parameters:
  • target – Target orbit.

  • orbits – The number of future orbits to search.