.. default-domain:: c .. highlight:: c Vessel ====== .. type:: krpc_SpaceCenter_Vessel_t These objects are used to interact with vessels in KSP. This includes getting orbital and flight data, manipulating control inputs and managing resources. Created using :func:`krpc_SpaceCenter_ActiveVessel` or :func:`krpc_SpaceCenter_Vessels`. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Name(krpc_connection_t connection, char * * result) .. function:: void krpc_SpaceCenter_Vessel_set_Name(const char * value) The name of the vessel. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Type(krpc_connection_t connection, krpc_SpaceCenter_VesselType_t * result) .. function:: void krpc_SpaceCenter_Vessel_set_Type(krpc_SpaceCenter_VesselType_t value) The type of the vessel. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Situation(krpc_connection_t connection, krpc_SpaceCenter_VesselSituation_t * result) The situation the vessel is in. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Loaded(krpc_connection_t connection, bool * result) Whether the vessel is loaded, i.e. its parts are instantiated in the scene because it is within loading range of the active vessel. A vessel that is not loaded exists only as orbital data and is always on-rails (see :func:`krpc_SpaceCenter_Vessel_Packed`). .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Packed(krpc_connection_t connection, bool * result) Whether the vessel is packed (on-rails). A packed vessel has its physics simulation suspended and follows its orbit analytically. A vessel that is not loaded (see :func:`krpc_SpaceCenter_Vessel_Loaded`) is always packed. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_PhysicsRange(krpc_connection_t connection, float * result) .. function:: void krpc_SpaceCenter_Vessel_set_PhysicsRange(float value) The distance from the active vessel, in meters, out to which this vessel keeps running its physics simulation — and so stays controllable, able to burn its engines and respond to its autopilot. Setting this raises the vessel out of the stock physics bubble, so that it keeps flying while the active vessel is far away. Set to zero to restore the game's default range. :Game Scenes: Flight .. note:: This always reports the vessel's live range, so reading it when no range has been set gives the game's default for the vessel's current :func:`krpc_SpaceCenter_Vessel_Situation` — which is much shorter than the distance at which the vessel unloads. In orbit a vessel is put on rails just 350m away, long before it unloads at 2.5km, and a vessel on rails produces no thrust and ignores control input even though it is still loaded. There is a 10% margin below the range, so that a vessel hovering at the threshold does not repeatedly drop out of the simulation and rejoin it. The vessel leaves the simulation at the distance set here, and rejoins it at 90% of that distance; in between it keeps whichever state it is already in. The requested range applies in every situation. The game's own defaults are not uniform — a vessel flying in atmosphere stays loaded out to 22.5km — so setting a small range can shorten the range such a vessel would otherwise have had. A range lasts until it is set back to zero or the game is exited. Unlike most state a client sets, it is not released when that client disconnects, because dropping a distant vessel back to the default range would put it on-rails part way through a maneuver. Holding a vessel off-rails a long way from the active vessel costs performance, and accumulates positional error that can destroy it. Raise the range on the vessels that need it, by as little as they need. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Recoverable(krpc_connection_t connection, bool * result) Whether the vessel is recoverable. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Recover(krpc_connection_t connection) Recover the vessel. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_MET(krpc_connection_t connection, double * result) The mission elapsed time in seconds. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Biome(krpc_connection_t connection, char * * result) The name of the biome the vessel is currently in. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Flight(krpc_connection_t connection, krpc_SpaceCenter_Flight_t * result, krpc_SpaceCenter_ReferenceFrame_t referenceFrame) Returns a :func:`krpc_SpaceCenter_Vessel_Flight` object that can be used to get flight telemetry for the vessel, in the specified reference frame. :Parameters: * **referenceFrame** -- Reference frame. Defaults to the vessel's surface reference frame (:func:`krpc_SpaceCenter_Vessel_SurfaceReferenceFrame`). :Game Scenes: Flight .. note:: When this is called with no arguments, the vessel's surface reference frame is used. This reference frame moves with the vessel, therefore velocities and speeds returned by the flight object will be zero. See the :rst:ref:`reference frames tutorial ` for examples of getting :rst:ref:`the orbital and surface speeds of a vessel `. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Orbit(krpc_connection_t connection, krpc_SpaceCenter_Orbit_t * result) The current orbit of the vessel. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Control(krpc_connection_t connection, krpc_SpaceCenter_Control_t * result) Returns a :func:`krpc_SpaceCenter_Vessel_Control` object that can be used to manipulate the vessel's control inputs. For example, its pitch/yaw/roll controls, RCS and thrust. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Comms(krpc_connection_t connection, krpc_SpaceCenter_Comms_t * result) Returns a :func:`krpc_SpaceCenter_Vessel_Comms` object that can be used to interact with CommNet for this vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AutoPilot(krpc_connection_t connection, krpc_SpaceCenter_AutoPilot_t * result) An :func:`krpc_SpaceCenter_Vessel_AutoPilot` object, that can be used to perform simple auto-piloting of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_CrewCapacity(krpc_connection_t connection, int32_t * result) The number of crew that can occupy the vessel. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_CrewCount(krpc_connection_t connection, int32_t * result) The number of crew that are occupying the vessel. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Crew(krpc_connection_t connection, krpc_list_object_t * result) The crew in the vessel. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Resources(krpc_connection_t connection, krpc_SpaceCenter_Resources_t * result) A :func:`krpc_SpaceCenter_Vessel_Resources` object, that can used to get information about resources stored in the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_ResourcesInDecoupleStage(krpc_connection_t connection, krpc_SpaceCenter_Resources_t * result, int32_t stage, bool cumulative) .. warning:: Deprecated. Use :func:`krpc_SpaceCenter_Stage_Resources` from the object returned by :func:`krpc_SpaceCenter_Vessel_DecoupleStageAt` instead. Returns a :func:`krpc_SpaceCenter_Vessel_Resources` object, that can used to get information about resources stored in a given *stage*. :Parameters: * **stage** -- Get resources for parts that are decoupled in this stage. * **cumulative** -- When ``false``, returns the resources for parts decoupled in just the given stage. When ``true`` returns the resources decoupled in the given stage and all subsequent stages combined. :Game Scenes: Flight .. note:: Deprecated. Use :func:`krpc_SpaceCenter_Vessel_DecoupleStageAt` and :func:`krpc_SpaceCenter_Stage_Resources` instead. For details on stage numbering, see the discussion on :rst:ref:`cnano-api-parts-staging`. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Stages(krpc_connection_t connection, krpc_list_object_t * result) Activation (burn) stages for this vessel, in ascending stage order. This does not include the -1 stage (parts with no staging icon), as it carries no delta-v; use :func:`krpc_SpaceCenter_Vessel_StageAt` with -1 to get those parts. :Game Scenes: Flight .. note:: Lists activation stages only (``decouple`` is ``false``). See also :rst:ref:`cnano-api-parts-staging`. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_StageAt(krpc_connection_t connection, krpc_SpaceCenter_Stage_t * result, int32_t stage) The activation stage with the given number. Pass -1 to get the parts that are never activated (those with no staging icon). :Parameters: * **stage** -- Get activation stage at this index. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_DecoupleStages(krpc_connection_t connection, krpc_list_object_t * result) Decouple stages for this vessel, in ascending stage order. The -1 stage, containing the parts that are never decoupled and remain on the vessel, is included first when any such parts exist. :Game Scenes: Flight .. note:: Lists decouple stages only. Delta-v is not defined on these stages. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_DecoupleStageAt(krpc_connection_t connection, krpc_SpaceCenter_Stage_t * result, int32_t stage) The decouple stage with the given number. Pass -1 to get the parts that are never decoupled and remain on the vessel after all stages have fired. :Parameters: * **stage** -- Get decouple stage at this index. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_DeltaV(krpc_connection_t connection, float * result) Total delta-v for the vessel in the current situation, in m/s. :Game Scenes: Flight .. note:: Requires the stock delta-v display to be ready. Units are meters per second. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_VacuumDeltaV(krpc_connection_t connection, float * result) Total vacuum delta-v for the vessel, in m/s. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_SeaLevelDeltaV(krpc_connection_t connection, float * result) Total sea-level delta-v for the vessel, in m/s. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_BurnTime(krpc_connection_t connection, float * result) Total burn time for the vessel, in seconds. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Parts(krpc_connection_t connection, krpc_SpaceCenter_Parts_t * result) A :type:`krpc_SpaceCenter_Parts_t` object, that can used to interact with the parts that make up this vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Mass(krpc_connection_t connection, float * result) The total mass of the vessel, including resources, in kg. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_DryMass(krpc_connection_t connection, float * result) The total mass of the vessel, excluding resources, in kg. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Thrust(krpc_connection_t connection, float * result) The total thrust currently being produced by the vessel's engines, in Newtons. This is computed by summing :func:`krpc_SpaceCenter_Engine_Thrust` for every engine in the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableThrust(krpc_connection_t connection, float * result) Gets the total available thrust that can be produced by the vessel's active engines, in Newtons. This is computed by summing :func:`krpc_SpaceCenter_Engine_AvailableThrust` for every active engine in the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableThrustAt(krpc_connection_t connection, float * result, double pressure) Gets the total available thrust that can be produced by the vessel's active engines, in Newtons. This is computed by summing :func:`krpc_SpaceCenter_Engine_AvailableThrustAt` for every active engine in the vessel. Takes the given pressure into account. :Parameters: * **pressure** -- Atmospheric pressure in atmospheres :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_MaxThrust(krpc_connection_t connection, float * result) The total maximum thrust that can be produced by the vessel's active engines, in Newtons. This is computed by summing :func:`krpc_SpaceCenter_Engine_MaxThrust` for every active engine. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_MaxThrustAt(krpc_connection_t connection, float * result, double pressure) The total maximum thrust that can be produced by the vessel's active engines, in Newtons. This is computed by summing :func:`krpc_SpaceCenter_Engine_MaxThrustAt` for every active engine. Takes the given pressure into account. :Parameters: * **pressure** -- Atmospheric pressure in atmospheres :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_MaxVacuumThrust(krpc_connection_t connection, float * result) The total maximum thrust that can be produced by the vessel's active engines when the vessel is in a vacuum, in Newtons. This is computed by summing :func:`krpc_SpaceCenter_Engine_MaxVacuumThrust` for every active engine. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Acceleration(krpc_connection_t connection, float * result) The acceleration currently produced by the vessel's engines, in :math:`m/s^2`. This is :func:`krpc_SpaceCenter_Vessel_Thrust` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_Mass`. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableAcceleration(krpc_connection_t connection, float * result) The total available acceleration that can be produced by the vessel's active engines, in :math:`m/s^2`. This is :func:`krpc_SpaceCenter_Vessel_AvailableThrust` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_Mass`. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableAccelerationAt(krpc_connection_t connection, float * result, double pressure) The total available acceleration that can be produced by the vessel's active engines, in :math:`m/s^2`. This is :func:`krpc_SpaceCenter_Vessel_AvailableThrustAt` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_Mass`. Takes the given pressure into account. :Parameters: * **pressure** -- Atmospheric pressure in atmospheres :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_MaxAcceleration(krpc_connection_t connection, float * result) The total maximum acceleration that can be produced by the vessel's active engines, in :math:`m/s^2`. This is :func:`krpc_SpaceCenter_Vessel_MaxThrust` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_Mass`. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_MaxAccelerationAt(krpc_connection_t connection, float * result, double pressure) The total maximum acceleration that can be produced by the vessel's active engines, in :math:`m/s^2`. This is :func:`krpc_SpaceCenter_Vessel_MaxThrustAt` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_Mass`. Takes the given pressure into account. :Parameters: * **pressure** -- Atmospheric pressure in atmospheres :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_MaxVacuumAcceleration(krpc_connection_t connection, float * result) The total maximum acceleration that can be produced by the vessel's active engines when the vessel is in a vacuum, in :math:`m/s^2`. This is :func:`krpc_SpaceCenter_Vessel_MaxVacuumThrust` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_Mass`. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_SpecificImpulse(krpc_connection_t connection, float * result) The combined specific impulse of all active engines, in seconds. This is computed using the formula `described here `_. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_SpecificImpulseAt(krpc_connection_t connection, float * result, double pressure) The combined specific impulse of all active engines, in seconds. This is computed using the formula `described here `_. Takes the given pressure into account. :Parameters: * **pressure** -- Atmospheric pressure in atmospheres :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_VacuumSpecificImpulse(krpc_connection_t connection, float * result) The combined vacuum specific impulse of all active engines, in seconds. This is computed using the formula `described here `_. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_KerbinSeaLevelSpecificImpulse(krpc_connection_t connection, float * result) The combined specific impulse of all active engines at sea level on Kerbin, in seconds. This is computed using the formula `described here `_. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_MomentOfInertia(krpc_connection_t connection, krpc_tuple_double_double_double_t * result) The moment of inertia of the vessel around its center of mass in :math:`kg.m^2`. The inertia values in the returned 3-tuple are around the pitch, roll and yaw directions respectively. This corresponds to the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_InertiaTensor(krpc_connection_t connection, krpc_list_double_t * result) The inertia tensor of the vessel around its center of mass, in the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). Returns the 3x3 matrix as a list of elements, in row-major order. .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableTorque(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum torque that the vessel generates. Includes contributions from reaction wheels, RCS, gimballed engines and aerodynamic control surfaces. Returns the torques in :math:`N.m` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableReactionWheelTorque(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum torque that the currently active and powered reaction wheels can generate. Returns the torques in :math:`N.m` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableRCSTorque(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum torque that the currently active RCS thrusters can generate. Returns the torques in :math:`N.m` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableRCSForce(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum force that the currently active RCS thrusters can generate. Returns the forces in :math:`N` along each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the right, forward and bottom directions of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableRCSAcceleration(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum acceleration that the currently active RCS thrusters can generate. This is :func:`krpc_SpaceCenter_Vessel_AvailableRCSForce` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_Mass`. Returns the accelerations in :math:`m/s^2` along each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the right, forward and bottom directions of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableEngineTorque(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum torque that the currently active and gimballed engines can generate. Returns the torques in :math:`N.m` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableControlSurfaceTorque(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum torque that the aerodynamic control surfaces can generate. Returns the torques in :math:`N.m` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableOtherTorque(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum torque that parts (excluding reaction wheels, gimballed engines, RCS and control surfaces) can generate. Returns the torques in :math:`N.m` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableAngularAcceleration(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum angular acceleration that the vessel can generate. Includes contributions from reaction wheels, RCS, gimballed engines and aerodynamic control surfaces. This is :func:`krpc_SpaceCenter_Vessel_AvailableTorque` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_MomentOfInertia`. Returns the angular accelerations in :math:`rad/s^2` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableReactionWheelAngularAcceleration(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum angular acceleration that the currently active and powered reaction wheels can generate. This is :func:`krpc_SpaceCenter_Vessel_AvailableReactionWheelTorque` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_MomentOfInertia`. Returns the angular accelerations in :math:`rad/s^2` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableRCSAngularAcceleration(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum angular acceleration that the currently active RCS thrusters can generate. This is :func:`krpc_SpaceCenter_Vessel_AvailableRCSTorque` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_MomentOfInertia`. Returns the angular accelerations in :math:`rad/s^2` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableEngineAngularAcceleration(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum angular acceleration that the currently active and gimballed engines can generate. This is :func:`krpc_SpaceCenter_Vessel_AvailableEngineTorque` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_MomentOfInertia`. Returns the angular accelerations in :math:`rad/s^2` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableControlSurfaceAngularAcceleration(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum angular acceleration that the aerodynamic control surfaces can generate. This is :func:`krpc_SpaceCenter_Vessel_AvailableControlSurfaceTorque` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_MomentOfInertia`. Returns the angular accelerations in :math:`rad/s^2` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AvailableOtherAngularAcceleration(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result) The maximum angular acceleration that parts (excluding reaction wheels, gimballed engines, RCS and control surfaces) can generate. This is :func:`krpc_SpaceCenter_Vessel_AvailableOtherTorque` divided by the vessel's :func:`krpc_SpaceCenter_Vessel_MomentOfInertia`. Returns the angular accelerations in :math:`rad/s^2` around each of the coordinate axes of the vessels reference frame (:func:`krpc_SpaceCenter_Vessel_ReferenceFrame`). These axes are equivalent to the pitch, roll and yaw axes of the vessel. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_ReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t * result) The reference frame that is fixed relative to the vessel, and orientated with the vessel. * The origin is at the center of mass of the vessel. * The axes rotate with the vessel. * The x-axis points out to the right of the vessel. * The y-axis points in the forward direction of the vessel. * The z-axis points out of the bottom off the vessel. :Game Scenes: Flight .. figure:: /images/reference-frames/vessel-aircraft.png :align: center Vessel reference frame origin and axes for the Aeris 3A aircraft .. figure:: /images/reference-frames/vessel-rocket.png :align: center Vessel reference frame origin and axes for the Kerbal-X rocket .. function:: krpc_error_t krpc_SpaceCenter_Vessel_OrbitalReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t * result) The reference frame that is fixed relative to the vessel, and orientated with the vessels orbital prograde/normal/radial directions. * The origin is at the center of mass of the vessel. * 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. :Game Scenes: Flight .. note:: Be careful not to confuse this with 'orbit' mode on the navball. .. figure:: /images/reference-frames/vessel-orbital.png :align: center Vessel orbital reference frame origin and axes .. function:: krpc_error_t krpc_SpaceCenter_Vessel_SurfaceReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t * result) The reference frame that is fixed relative to the vessel, and orientated with the surface of the body being orbited. * The origin is at the center of mass of the vessel. * The axes rotate with the north and up directions on the surface of the body. * The x-axis points in the `zenith `_ direction (upwards, normal to the body being orbited, from the center of the body towards the center of mass of the vessel). * The y-axis points northwards towards the `astronomical horizon `_ (north, and tangential to the surface of the body -- the direction in which a compass would point when on the surface). * The z-axis points eastwards towards the `astronomical horizon `_ (east, and tangential to the surface of the body -- east on a compass when on the surface). :Game Scenes: Flight .. note:: Be careful not to confuse this with 'surface' mode on the navball. .. figure:: /images/reference-frames/vessel-surface.png :align: center Vessel surface reference frame origin and axes .. function:: krpc_error_t krpc_SpaceCenter_Vessel_SurfaceVelocityReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t * result) The reference frame that is fixed relative to the vessel, and orientated with the velocity vector of the vessel relative to the surface of the body being orbited. * The origin is at the center of mass of the vessel. * The axes rotate with the vessel's velocity vector. * The y-axis points in the direction of the vessel's velocity vector, relative to the surface of the body being orbited. * The z-axis is in the plane of the `astronomical horizon `_. * The x-axis is orthogonal to the other two axes. :Game Scenes: Flight .. figure:: /images/reference-frames/vessel-surface-velocity.png :align: center Vessel surface velocity reference frame origin and axes .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Position(krpc_connection_t connection, krpc_tuple_double_double_double_t * result, krpc_SpaceCenter_ReferenceFrame_t referenceFrame) The position of the center of mass of the vessel, in the given reference frame. :Parameters: * **referenceFrame** -- The reference frame that the returned position vector is in. :returns: The position as a vector. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_BoundingBox(krpc_connection_t connection, krpc_tuple_tuple_double_double_double_tuple_double_double_double_t * result, krpc_SpaceCenter_ReferenceFrame_t referenceFrame) The axis-aligned bounding box of the vessel in the given reference frame. :Parameters: * **referenceFrame** -- The reference frame that the returned position vectors are in. :returns: The positions of the minimum and maximum vertices of the box, as position vectors. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Velocity(krpc_connection_t connection, krpc_tuple_double_double_double_t * result, krpc_SpaceCenter_ReferenceFrame_t referenceFrame) The velocity of the center of mass of the vessel, in the given reference frame. :Parameters: * **referenceFrame** -- The reference frame that the returned velocity vector is in. :returns: The velocity as a vector. The vector points in the direction of travel, and its magnitude is the speed of the body in meters per second. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Rotation(krpc_connection_t connection, krpc_tuple_double_double_double_double_t * result, krpc_SpaceCenter_ReferenceFrame_t referenceFrame) The rotation of the vessel, in the given reference frame. :Parameters: * **referenceFrame** -- The reference frame that the returned rotation is in. :returns: The rotation as a quaternion of the form :math:`(x, y, z, w)`. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_Direction(krpc_connection_t connection, krpc_tuple_double_double_double_t * result, krpc_SpaceCenter_ReferenceFrame_t referenceFrame) The direction in which the vessel is pointing, 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: Flight .. function:: krpc_error_t krpc_SpaceCenter_Vessel_AngularVelocity(krpc_connection_t connection, krpc_tuple_double_double_double_t * result, krpc_SpaceCenter_ReferenceFrame_t referenceFrame) The angular velocity of the vessel, in the given reference frame. :Parameters: * **referenceFrame** -- The reference frame the returned angular velocity is in. :returns: The angular velocity as a vector. The magnitude of the vector is the rotational speed of the vessel, in radians per second. The direction of the vector indicates the axis of rotation, using the right-hand rule. :Game Scenes: Flight .. type:: krpc_SpaceCenter_VesselType_t The type of a vessel. See :func:`krpc_SpaceCenter_Vessel_Type`. .. macro:: KRPC_SPACECENTER_VESSELTYPE_BASE Base. .. macro:: KRPC_SPACECENTER_VESSELTYPE_DEBRIS Debris. .. macro:: KRPC_SPACECENTER_VESSELTYPE_LANDER Lander. .. macro:: KRPC_SPACECENTER_VESSELTYPE_PLANE Plane. .. macro:: KRPC_SPACECENTER_VESSELTYPE_PROBE Probe. .. macro:: KRPC_SPACECENTER_VESSELTYPE_RELAY Relay. .. macro:: KRPC_SPACECENTER_VESSELTYPE_ROVER Rover. .. macro:: KRPC_SPACECENTER_VESSELTYPE_SHIP Ship. .. macro:: KRPC_SPACECENTER_VESSELTYPE_STATION Station. .. macro:: KRPC_SPACECENTER_VESSELTYPE_SPACEOBJECT SpaceObject. .. macro:: KRPC_SPACECENTER_VESSELTYPE_UNKNOWN Unknown. .. macro:: KRPC_SPACECENTER_VESSELTYPE_EVA EVA. .. macro:: KRPC_SPACECENTER_VESSELTYPE_FLAG Flag. .. macro:: KRPC_SPACECENTER_VESSELTYPE_DEPLOYEDSCIENCECONTROLLER DeployedScienceController. .. macro:: KRPC_SPACECENTER_VESSELTYPE_DEPLOYEDSCIENCEPART DeploedSciencePart. .. macro:: KRPC_SPACECENTER_VESSELTYPE_DROPPEDPART DroppedPart. .. macro:: KRPC_SPACECENTER_VESSELTYPE_DEPLOYEDGROUNDPART DeployedGroundPart. .. type:: krpc_SpaceCenter_VesselSituation_t The situation a vessel is in. See :func:`krpc_SpaceCenter_Vessel_Situation`. .. macro:: KRPC_SPACECENTER_VESSELSITUATION_DOCKED Vessel is docked to another. .. macro:: KRPC_SPACECENTER_VESSELSITUATION_ESCAPING Escaping. .. macro:: KRPC_SPACECENTER_VESSELSITUATION_FLYING Vessel is flying through an atmosphere. .. macro:: KRPC_SPACECENTER_VESSELSITUATION_LANDED Vessel is landed on the surface of a body. .. macro:: KRPC_SPACECENTER_VESSELSITUATION_ORBITING Vessel is orbiting a body. .. macro:: KRPC_SPACECENTER_VESSELSITUATION_PRELAUNCH Vessel is awaiting launch. .. macro:: KRPC_SPACECENTER_VESSELSITUATION_SPLASHED Vessel has splashed down in an ocean. .. macro:: KRPC_SPACECENTER_VESSELSITUATION_SUBORBITAL Vessel is on a sub-orbital trajectory. .. type:: krpc_SpaceCenter_CrewMember_t Represents crew in a vessel. Can be obtained using :func:`krpc_SpaceCenter_Vessel_Crew`. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Name(krpc_connection_t connection, char * * result) .. function:: void krpc_SpaceCenter_CrewMember_set_Name(const char * value) The crew members name. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Type(krpc_connection_t connection, krpc_SpaceCenter_CrewMemberType_t * result) The type of crew member. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_OnMission(krpc_connection_t connection, bool * result) Whether the crew member is on a mission. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Courage(krpc_connection_t connection, float * result) .. function:: void krpc_SpaceCenter_CrewMember_set_Courage(float value) The crew members courage. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Stupidity(krpc_connection_t connection, float * result) .. function:: void krpc_SpaceCenter_CrewMember_set_Stupidity(float value) The crew members stupidity. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Experience(krpc_connection_t connection, float * result) .. function:: void krpc_SpaceCenter_CrewMember_set_Experience(float value) The crew members experience. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Badass(krpc_connection_t connection, bool * result) .. function:: void krpc_SpaceCenter_CrewMember_set_Badass(bool value) Whether the crew member is a badass. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Veteran(krpc_connection_t connection, bool * result) .. function:: void krpc_SpaceCenter_CrewMember_set_Veteran(bool value) Whether the crew member is a veteran. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Trait(krpc_connection_t connection, char * * result) The crew member's job. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Gender(krpc_connection_t connection, krpc_SpaceCenter_CrewMemberGender_t * result) The crew member's gender. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_RosterStatus(krpc_connection_t connection, krpc_SpaceCenter_RosterStatus_t * result) The crew member's current roster status. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t * result) The part containing the crew member. Returns ``nullptr`` if the crew member is not occupying a part, or the vessel containing the part is not loaded. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_SuitType(krpc_connection_t connection, krpc_SpaceCenter_SuitType_t * result) .. function:: void krpc_SpaceCenter_CrewMember_set_SuitType(krpc_SpaceCenter_SuitType_t value) The crew member's suit type. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_CareerLogFlights(krpc_connection_t connection, krpc_list_int32_t * result) The flight IDs for each entry in the career flight log. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_CareerLogTypes(krpc_connection_t connection, krpc_list_string_t * result) The type for each entry in the career flight log. .. function:: krpc_error_t krpc_SpaceCenter_CrewMember_CareerLogTargets(krpc_connection_t connection, krpc_list_string_t * result) The body name for each entry in the career flight log. .. type:: krpc_SpaceCenter_CrewMemberType_t The type of a crew member. See :func:`krpc_SpaceCenter_CrewMember_Type`. .. macro:: KRPC_SPACECENTER_CREWMEMBERTYPE_APPLICANT An applicant for crew. .. macro:: KRPC_SPACECENTER_CREWMEMBERTYPE_CREW Rocket crew. .. macro:: KRPC_SPACECENTER_CREWMEMBERTYPE_TOURIST A tourist. .. macro:: KRPC_SPACECENTER_CREWMEMBERTYPE_UNOWNED An unowned crew member. .. type:: krpc_SpaceCenter_CrewMemberGender_t A crew member's gender. See :func:`krpc_SpaceCenter_CrewMember_Gender`. .. macro:: KRPC_SPACECENTER_CREWMEMBERGENDER_MALE Male. .. macro:: KRPC_SPACECENTER_CREWMEMBERGENDER_FEMALE Female. .. type:: krpc_SpaceCenter_RosterStatus_t A crew member's roster status. See :func:`krpc_SpaceCenter_CrewMember_RosterStatus`. .. macro:: KRPC_SPACECENTER_ROSTERSTATUS_AVAILABLE Available. .. macro:: KRPC_SPACECENTER_ROSTERSTATUS_ASSIGNED Assigned. .. macro:: KRPC_SPACECENTER_ROSTERSTATUS_DEAD Dead. .. macro:: KRPC_SPACECENTER_ROSTERSTATUS_MISSING Missing. .. type:: krpc_SpaceCenter_SuitType_t A crew member's suit type. See :func:`krpc_SpaceCenter_CrewMember_SuitType`. .. macro:: KRPC_SPACECENTER_SUITTYPE_DEFAULT Default. .. macro:: KRPC_SPACECENTER_SUITTYPE_VINTAGE Vintage. .. macro:: KRPC_SPACECENTER_SUITTYPE_FUTURE Future. .. macro:: KRPC_SPACECENTER_SUITTYPE_SLIM Slim.