Parts#
The following classes allow interaction with a vessels individual parts.
Parts#
-
type krpc_SpaceCenter_Parts_t#
Instances of this class are used to interact with the parts of a vessel. An instance can be obtained by calling
krpc_SpaceCenter_Vessel_Parts().-
krpc_error_t krpc_SpaceCenter_Parts_All(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all of the vessels parts.
-
krpc_error_t krpc_SpaceCenter_Parts_Root(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
The vessels root part.
Note
See the discussion on Trees of Parts.
-
krpc_error_t krpc_SpaceCenter_Parts_Controlling(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
-
krpc_error_t krpc_SpaceCenter_Parts_set_Controlling(krpc_connection_t connection, krpc_SpaceCenter_Parts_t instance, krpc_SpaceCenter_Part_t value)#
The part from which the vessel is controlled. Returns
nullptrif the vessel has no control point, in which case it is oriented by its root part.- Game Scenes:
Flight
Note
A vessel gets no control point when it is created by a decoupler or an undocking and none of its parts is a command module with crew aboard. A probe core does not give it one either. Assign this property to choose the control point, which is equivalent to “Control From Here” in game.
-
krpc_error_t krpc_SpaceCenter_Parts_WithName(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance, const char *name)#
A list of parts whose
krpc_SpaceCenter_Part_Name()is name.- Parameters:
-
krpc_error_t krpc_SpaceCenter_Parts_WithTitle(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance, const char *title)#
A list of all parts whose
krpc_SpaceCenter_Part_Title()is title.- Parameters:
-
krpc_error_t krpc_SpaceCenter_Parts_WithTag(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance, const char *tag)#
A list of all parts whose
krpc_SpaceCenter_Part_Tag()is tag.- Parameters:
-
krpc_error_t krpc_SpaceCenter_Parts_WithModule(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance, const char *moduleName)#
A list of all parts that contain a
krpc_SpaceCenter_Module_twhosekrpc_SpaceCenter_Module_Name()is moduleName.- Parameters:
-
krpc_error_t krpc_SpaceCenter_Parts_ModulesWithName(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance, const char *moduleName)#
A list of modules (combined across all parts in the vessel) whose
krpc_SpaceCenter_Module_Name()is moduleName.- Parameters:
-
krpc_error_t krpc_SpaceCenter_Parts_Antennas(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all antennas in the vessel.
Note
If RemoteTech is installed, this will always return an empty list. To interact with RemoteTech antennas, use the RemoteTech service APIs.
-
krpc_error_t krpc_SpaceCenter_Parts_CargoBays(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all cargo bays in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_ControlSurfaces(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all control surfaces in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Decouplers(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all decouplers in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_DockingPorts(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all docking ports in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Engines(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all engines in the vessel.
Note
This includes any part that generates thrust. This covers many different types of engine, including liquid fuel rockets, solid rocket boosters, jet engines and RCS thrusters.
-
krpc_error_t krpc_SpaceCenter_Parts_Experiments(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all science experiments in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Fairings(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all fairings in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Intakes(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all intakes in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Legs(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all landing legs attached to the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_LaunchClamps(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all launch clamps attached to the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Lights(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all lights in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Parachutes(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all parachutes in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Radiators(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all radiators in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_ResourceDrains(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all resource drains in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_RCS(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all RCS blocks/thrusters in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_ReactionWheels(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all reaction wheels in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_ResourceConverters(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all resource converters in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_ResourceHarvesters(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all resource harvesters in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_RoboticControllers(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all robotic controllers in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_RoboticHinges(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all robotic hinges in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_RoboticPistons(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all robotic pistons in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_RoboticRotations(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all robotic rotations in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_RoboticRotors(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all robotic rotors in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Sensors(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all sensors in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_SolarPanels(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all solar panels in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_Wheels(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
A list of all wheels in the vessel.
-
krpc_error_t krpc_SpaceCenter_Parts_All(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Parts_t instance)#
Part#
-
type krpc_SpaceCenter_Part_t#
Represents an individual part. Vessels are made up of multiple parts. Instances of this class can be obtained by several methods in
krpc_SpaceCenter_Parts_t.-
krpc_error_t krpc_SpaceCenter_Part_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Part_t instance)#
Internal name of the part, as used in part cfg files. For example “Mark1-2Pod”.
-
krpc_error_t krpc_SpaceCenter_Part_Title(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Part_t instance)#
Title of the part, as shown when the part is right clicked in-game. For example “Mk1-2 Command Pod”.
-
krpc_error_t krpc_SpaceCenter_Part_Config(krpc_connection_t connection, krpc_SpaceCenter_ConfigNode_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The static configuration of the part, as found in its part cfg file. This provides access to data that is not exposed elsewhere, such as the configuration of the part’s modules. Returns
nullptrif the part has no associated configuration node.
-
krpc_error_t krpc_SpaceCenter_Part_Tag(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Part_t instance)#
-
krpc_error_t krpc_SpaceCenter_Part_set_Tag(krpc_connection_t connection, krpc_SpaceCenter_Part_t instance, const char *value)#
The name tag for the part. Can be set to a custom string using the in-game user interface. Throws an exception if no name tag part module is installed.
Note
The name tag part module is provided by KSPCommunityPartModules 0.5 or later, or by kOS, which shares this string.
-
krpc_error_t krpc_SpaceCenter_Part_FlagURL(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Part_t instance)#
-
krpc_error_t krpc_SpaceCenter_Part_set_FlagURL(krpc_connection_t connection, krpc_SpaceCenter_Part_t instance, const char *value)#
The asset URL for the part’s flag.
-
krpc_error_t krpc_SpaceCenter_Part_Highlighted(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
-
krpc_error_t krpc_SpaceCenter_Part_set_Highlighted(krpc_connection_t connection, krpc_SpaceCenter_Part_t instance, bool value)#
Whether the part is highlighted.
- Game Scenes:
Flight
Note
The highlighting is removed when the client that enabled it disconnects.
-
krpc_error_t krpc_SpaceCenter_Part_HighlightColor(krpc_connection_t connection, krpc_StdLib_ColorRGB_t *returnValue, krpc_SpaceCenter_Part_t instance)#
-
krpc_error_t krpc_SpaceCenter_Part_set_HighlightColor(krpc_connection_t connection, krpc_SpaceCenter_Part_t instance, const krpc_StdLib_ColorRGB_t *value)#
The color used to highlight the part.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_Cost(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The cost of the part, in units of funds.
-
krpc_error_t krpc_SpaceCenter_Part_Vessel(krpc_connection_t connection, krpc_SpaceCenter_Vessel_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The vessel that contains this part.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_Parent(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The parts parent. Returns
nullptrif the part does not have a parent. This, in combination withkrpc_SpaceCenter_Part_Children(), can be used to traverse the vessels parts tree.Note
See the discussion on Trees of Parts.
-
krpc_error_t krpc_SpaceCenter_Part_Children(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The parts children. Returns an empty list if the part has no children. This, in combination with
krpc_SpaceCenter_Part_Parent(), can be used to traverse the vessels parts tree.Note
See the discussion on Trees of Parts.
-
krpc_error_t krpc_SpaceCenter_Part_AxiallyAttached(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether the part is axially attached to its parent, i.e. on the top or bottom of its parent. If the part has no parent, returns
false.Note
See the discussion on Attachment Modes.
-
krpc_error_t krpc_SpaceCenter_Part_RadiallyAttached(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether the part is radially attached to its parent, i.e. on the side of its parent. If the part has no parent, returns
false.Note
See the discussion on Attachment Modes.
-
krpc_error_t krpc_SpaceCenter_Part_Stage(krpc_connection_t connection, int32_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The stage in which this part will be activated. Returns -1 if the part is not activated by staging.
Note
See the discussion on Staging.
-
krpc_error_t krpc_SpaceCenter_Part_DecoupleStage(krpc_connection_t connection, int32_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The stage in which this part will be decoupled. Returns -1 if the part is never decoupled from the vessel.
Note
See the discussion on Staging.
-
krpc_error_t krpc_SpaceCenter_Part_Massless(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether the part is massless.
-
krpc_error_t krpc_SpaceCenter_Part_Mass(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The current mass of the part, including resources it contains, in kilograms. Returns zero if the part is massless.
-
krpc_error_t krpc_SpaceCenter_Part_DryMass(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The mass of the part, not including any resources it contains, in kilograms. Returns zero if the part is massless.
-
krpc_error_t krpc_SpaceCenter_Part_Shielded(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether the part is shielded from the exterior of the vessel, for example by a fairing.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_DynamicPressure(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The dynamic pressure acting on the part, in Pascals.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_StaticPressure(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The static pressure acting on the part, in Pascals. Below the waterline this includes the pressure of the water.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_Displacement(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The volume of water the part displaces when fully submerged, in \(m^3\).
- Game Scenes:
Flight, Editor Vab, Editor Sph
Note
See
krpc_SpaceCenter_Part_DisplacedVolume()for the volume it is displacing now.
-
krpc_error_t krpc_SpaceCenter_Part_BuoyancyMultiplier(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The multiplier applied to the buoyant force on the part. One for most parts.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Part_BuoyantForceAt(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance, double density, double gravity)#
The buoyant force on the part when fully submerged in a fluid of the given density, in Newtons.
- Parameters:
density – The density of the fluid, in \(kg/m^3\).
gravity – The acceleration due to gravity, in \(m/s^2\).
- Game Scenes:
Flight, Editor Vab, Editor Sph
Note
Applies
krpc_SpaceCenter_BuoyancyScalar()andkrpc_SpaceCenter_Part_BuoyancyMultiplier(), so the result is what the game would do to the part rather than what Archimedes’ principle alone gives.
-
krpc_error_t krpc_SpaceCenter_Part_Splashed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether the part is in contact with water.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_SubmergedPortion(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The fraction of the part below the waterline, between 0 and 1.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_DisplacedVolume(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The volume of water the part is displacing, in \(m^3\).
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_Depth(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The depth of the part below the waterline, in meters, measured at
krpc_SpaceCenter_Part_CenterOfDisplacement(). Negative above the waterline. Returns zero if the body the vessel is at has no ocean.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_MinDepth(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The depth of the shallowest point of the part below the waterline, in meters. Returns zero if the body the vessel is at has no ocean.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_MaxDepth(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The depth of the deepest point of the part below the waterline, in meters. Returns zero if the body the vessel is at has no ocean.
- Game Scenes:
Flight
Note
The game ramps the buoyant force in over the first fraction of a meter of this depth.
-
krpc_error_t krpc_SpaceCenter_Part_SubmergedDynamicPressure(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The dynamic pressure of the water acting on the part, in Pascals.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_SubmergedDragMultiplier(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The multiplier applied to the drag on the part while it is submerged.
- Game Scenes:
Flight
Note
The game sets this high on splashdown and eases it down as the part moves through the water. It climbs back once the part slows to a crawl, so a hull under way reads lower than one lying still.
-
krpc_error_t krpc_SpaceCenter_Part_SubmergedLiftMultiplier(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The multiplier applied to the lift on the part while it is submerged.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_WaterAngularDragMultiplier(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The multiplier applied to the angular drag on the part while it is submerged.
- Game Scenes:
Flight, Editor Vab, Editor Sph
Note
Part of the part’s configuration rather than a live readout, so it reads the same in the editor and at a body with no ocean.
-
krpc_error_t krpc_SpaceCenter_Part_ImpactTolerance(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The impact tolerance of the part, in meters per second.
-
krpc_error_t krpc_SpaceCenter_Part_Temperature(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
Temperature of the part, in Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_SkinTemperature(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
Temperature of the skin of the part, in Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_MaxTemperature(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
Maximum temperature that the part can survive, in Kelvin.
-
krpc_error_t krpc_SpaceCenter_Part_MaxSkinTemperature(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
Maximum temperature that the skin of the part can survive, in Kelvin.
-
krpc_error_t krpc_SpaceCenter_Part_MaxPressure(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
Maximum pressure that the part can survive, in Pascals.
Note
With part pressure limits enabled in the difficulty settings, the part is destroyed when
krpc_SpaceCenter_Part_StaticPressure()pluskrpc_SpaceCenter_Part_DynamicPressure()exceeds this.
-
krpc_error_t krpc_SpaceCenter_Part_ThermalMass(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
A measure of how much energy it takes to increase the internal temperature of the part, in Joules per Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_ThermalSkinMass(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
A measure of how much energy it takes to increase the skin temperature of the part, in Joules per Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_ThermalResourceMass(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
A measure of how much energy it takes to increase the temperature of the resources contained in the part, in Joules per Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_ThermalConductionFlux(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The rate at which heat energy is conducting into or out of the part via contact with other parts. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_ThermalConvectionFlux(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The rate at which heat energy is convecting into or out of the part from the surrounding atmosphere. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_ThermalRadiationFlux(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The rate at which heat energy is radiating into or out of the part from the surrounding environment. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_ThermalInternalFlux(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The rate at which heat energy is begin generated by the part. For example, some engines generate heat by combusting fuel. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_ThermalSkinToInternalFlux(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Part_t instance)#
The rate at which heat energy is transferring between the part’s skin and its internals. Measured in energy per unit time, or power, in Watts. A positive value means the part’s internals are gaining heat energy, and negative means its skin is gaining heat energy.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_CrewCapacity(krpc_connection_t connection, int32_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The number of crew members that can occupy the part.
-
krpc_error_t krpc_SpaceCenter_Part_Crew(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The crew members occupying the part.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_AvailableSeats(krpc_connection_t connection, uint32_t *returnValue, krpc_SpaceCenter_Part_t instance)#
How many open seats the part has.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_Resources(krpc_connection_t connection, krpc_SpaceCenter_Resources_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Resources()object for the part.
-
krpc_error_t krpc_SpaceCenter_Part_Crossfeed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether this part is crossfeed capable.
-
krpc_error_t krpc_SpaceCenter_Part_IsFuelLine(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether this part is a fuel line.
-
krpc_error_t krpc_SpaceCenter_Part_FuelLinesFrom(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The parts that are connected to this part via fuel lines, where the direction of the fuel line is into this part.
- Game Scenes:
Flight
Note
See the discussion on Fuel Lines.
-
krpc_error_t krpc_SpaceCenter_Part_FuelLinesTo(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The parts that are connected to this part via fuel lines, where the direction of the fuel line is out of this part.
- Game Scenes:
Flight
Note
See the discussion on Fuel Lines.
-
krpc_error_t krpc_SpaceCenter_Part_Modules(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The modules for this part.
-
krpc_error_t krpc_SpaceCenter_Part_Antenna(krpc_connection_t connection, krpc_SpaceCenter_Antenna_t *returnValue, krpc_SpaceCenter_Part_t instance)#
An
krpc_SpaceCenter_Part_Antenna()if the part is an antenna, otherwisenullptr.Note
If RemoteTech is installed, this will always return
nullptr. To interact with RemoteTech antennas, use the RemoteTech service APIs.
-
krpc_error_t krpc_SpaceCenter_Part_CargoBay(krpc_connection_t connection, krpc_SpaceCenter_CargoBay_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_CargoBay()if the part is a cargo bay, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_ControlSurface(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_ControlSurface()if the part is an aerodynamic control surface, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Decoupler(krpc_connection_t connection, krpc_SpaceCenter_Decoupler_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Decoupler()if the part is a decoupler, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_DockingPort(krpc_connection_t connection, krpc_SpaceCenter_DockingPort_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_DockingPort()if the part is a docking port, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Engine(krpc_connection_t connection, krpc_SpaceCenter_Engine_t *returnValue, krpc_SpaceCenter_Part_t instance)#
An
krpc_SpaceCenter_Part_Engine()if the part is an engine, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Experiment(krpc_connection_t connection, krpc_SpaceCenter_Experiment_t *returnValue, krpc_SpaceCenter_Part_t instance)#
An
krpc_SpaceCenter_Part_Experiment()if the part contains a single science experiment, otherwisenullptr.Note
Throws an exception if the part contains more than one experiment. In that case, use
krpc_SpaceCenter_Part_Experiments()to get the list of experiments in the part.
-
krpc_error_t krpc_SpaceCenter_Part_Experiments(krpc_connection_t connection, krpc_list_object_t *returnValue, bool *returnValueIsNull, krpc_SpaceCenter_Part_t instance)#
A list of
krpc_SpaceCenter_Part_Experiment()objects that the part contains.
-
krpc_error_t krpc_SpaceCenter_Part_Fairing(krpc_connection_t connection, krpc_SpaceCenter_Fairing_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Fairing()if the part is a fairing, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Intake(krpc_connection_t connection, krpc_SpaceCenter_Intake_t *returnValue, krpc_SpaceCenter_Part_t instance)#
An
krpc_SpaceCenter_Part_Intake()if the part is an intake, otherwisenullptr.Note
This includes any part that generates thrust. This covers many different types of engine, including liquid fuel rockets, solid rocket boosters and jet engines. For RCS thrusters see
krpc_SpaceCenter_Part_RCS().
-
krpc_error_t krpc_SpaceCenter_Part_Leg(krpc_connection_t connection, krpc_SpaceCenter_Leg_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Leg()if the part is a landing leg, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_LaunchClamp(krpc_connection_t connection, krpc_SpaceCenter_LaunchClamp_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_LaunchClamp()if the part is a launch clamp, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Light(krpc_connection_t connection, krpc_SpaceCenter_Light_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Light()if the part is a light, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Parachute(krpc_connection_t connection, krpc_SpaceCenter_Parachute_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Parachute()if the part is a parachute, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Radiator(krpc_connection_t connection, krpc_SpaceCenter_Radiator_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Radiator()if the part is a radiator, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_ResourceDrain(krpc_connection_t connection, krpc_SpaceCenter_ResourceDrain_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_ResourceDrain()if the part is a resource drain, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_RCS(krpc_connection_t connection, krpc_SpaceCenter_RCS_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_RCS()if the part is an RCS block/thruster, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_ReactionWheel(krpc_connection_t connection, krpc_SpaceCenter_ReactionWheel_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_ReactionWheel()if the part is a reaction wheel, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_ResourceConverter(krpc_connection_t connection, krpc_SpaceCenter_ResourceConverter_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_ResourceConverter()if the part is a resource converter, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_ResourceHarvester(krpc_connection_t connection, krpc_SpaceCenter_ResourceHarvester_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_ResourceHarvester()if the part is a resource harvester, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_RoboticController(krpc_connection_t connection, krpc_SpaceCenter_RoboticController_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_RoboticController()if the part is a robotic controller, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_RoboticHinge(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_RoboticHinge()if the part is a robotic hinge, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_RoboticPiston(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_RoboticPiston()if the part is a robotic piston, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_RoboticRotation(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_RoboticRotation()if the part is a robotic rotation servo, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_RoboticRotor(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotor_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_RoboticRotor()if the part is a robotic rotor, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Sensor(krpc_connection_t connection, krpc_SpaceCenter_Sensor_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Sensor()if the part is a sensor, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_SolarPanel(krpc_connection_t connection, krpc_SpaceCenter_SolarPanel_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_SolarPanel()if the part is a solar panel, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Wheel(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t *returnValue, krpc_SpaceCenter_Part_t instance)#
A
krpc_SpaceCenter_Part_Wheel()if the part is a wheel, otherwisenullptr.
-
krpc_error_t krpc_SpaceCenter_Part_Position(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The position of the part 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, Editor Vab, Editor Sph
Note
This is a fixed position in the part, defined by the parts model. It s not necessarily the same as the parts center of mass. Use
krpc_SpaceCenter_Part_CenterOfMass()to get the parts center of mass.
-
krpc_error_t krpc_SpaceCenter_Part_CenterOfMass(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The position of the parts center of mass in the given reference frame. If the part is physicsless in flight, this is equivalent to
krpc_SpaceCenter_Part_Position().- Parameters:
referenceFrame – The reference frame that the returned position vector is in.
- Returns:
The position as a vector.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Part_BoundingBox(krpc_connection_t connection, krpc_SpaceCenter_BoundingBox_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The axis-aligned bounding box of the part 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.
- Game Scenes:
Flight, Editor Vab, Editor Sph
Note
This is computed from the meshes that make up the parts model, and covers only this part - the models of any child parts are excluded. If the part has no visible model, the box has zero volume and is centered on the
krpc_SpaceCenter_Part_CenterOfMass()of the part.
-
krpc_error_t krpc_SpaceCenter_Part_Direction(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The direction the part points in, 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, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Part_Velocity(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The linear velocity of the part 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
-
krpc_error_t krpc_SpaceCenter_Part_Rotation(krpc_connection_t connection, krpc_tuple_double_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The rotation of the part, 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 \((x, y, z, w)\).
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Part_Lift(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The aerodynamic lift currently acting on the part.
- Parameters:
referenceFrame – The reference frame that the returned vector is in.
- Returns:
A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
- Game Scenes:
Flight
Note
Not available when the Ferram Aerospace Research mod is installed.
-
krpc_error_t krpc_SpaceCenter_Part_Drag(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The aerodynamic drag currently acting on the part.
- Parameters:
referenceFrame – The reference frame that the returned vector is in.
- Returns:
A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
- Game Scenes:
Flight
Note
Not available when the Ferram Aerospace Research mod is installed.
-
krpc_error_t krpc_SpaceCenter_Part_CenterOfBuoyancy(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The point the buoyant force on the part acts at, 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, Editor Vab, Editor Sph
Note
A submerged part reports the point the game applied the force at, which it shifts towards the submerged part of the hull. Any other part reports its configured center of buoyancy.
-
krpc_error_t krpc_SpaceCenter_Part_CenterOfDisplacement(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The point the depth of the part is measured at, 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, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Part_BuoyantForce(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The buoyant force currently acting on the part.
- Parameters:
referenceFrame – The reference frame that the returned vector is in.
- Returns:
A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
- Game Scenes:
Flight
Note
The buoyant force on its own. The water drag and lift the game applies alongside it are reported by
krpc_SpaceCenter_Part_SubmergedDragMultiplier()andkrpc_SpaceCenter_Part_SubmergedLiftMultiplier().
-
krpc_error_t krpc_SpaceCenter_Part_MomentOfInertia(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The moment of inertia of the part in \(kg.m^2\) around its center of mass in the parts center of mass reference frame (
krpc_SpaceCenter_Part_CenterOfMassReferenceFrame()).- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Part_InertiaTensor(krpc_connection_t connection, krpc_list_double_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The inertia tensor of the part around its center of mass, in the parts center of mass reference frame (
krpc_SpaceCenter_Part_CenterOfMassReferenceFrame()). Returns the 3x3 matrix as a list of elements, in row-major order.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Part_ReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The reference frame that is fixed relative to this part, and centered on a fixed position within the part, defined by the parts model.
The origin is at the position of the part, as returned by
krpc_SpaceCenter_Part_Position().The axes rotate with the part.
The x, y and z axis directions depend on the design of the part.
- Game Scenes:
Flight, Editor Vab, Editor Sph
Note
For docking port parts, this reference frame is not necessarily equivalent to the reference frame for the docking port, returned by
krpc_SpaceCenter_DockingPort_ReferenceFrame().
Mk1 Command Pod reference frame origin and axes#
-
krpc_error_t krpc_SpaceCenter_Part_CenterOfMassReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t *returnValue, krpc_SpaceCenter_Part_t instance)#
The reference frame that is fixed relative to this part, and centered on its center of mass.
The origin is at the center of mass of the part, as returned by
krpc_SpaceCenter_Part_CenterOfMass().The axes rotate with the part.
The x, y and z axis directions depend on the design of the part.
- Game Scenes:
Flight, Editor Vab, Editor Sph
Note
For docking port parts, this reference frame is not necessarily equivalent to the reference frame for the docking port, returned by
krpc_SpaceCenter_DockingPort_ReferenceFrame().
-
krpc_error_t krpc_SpaceCenter_Part_AddForce(krpc_connection_t connection, krpc_SpaceCenter_Force_t *returnValue, krpc_SpaceCenter_Part_t instance, const krpc_tuple_double_double_double_t *force, const krpc_tuple_double_double_double_t *position, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
Warning
Deprecated. Use
Debug.AddForceinstead.Exert a constant force on the part, acting at the given position.
- Parameters:
force – A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
position – The position at which the force acts, as a vector.
referenceFrame – The reference frame that the force and position are in.
- Returns:
An object that can be used to remove or modify the force.
- Game Scenes:
Flight
Note
The force is removed when the client that added it disconnects.
-
krpc_error_t krpc_SpaceCenter_Part_InstantaneousForce(krpc_connection_t connection, krpc_SpaceCenter_Part_t instance, const krpc_tuple_double_double_double_t *force, const krpc_tuple_double_double_double_t *position, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
Warning
Deprecated. Use
Debug.InstantaneousForceinstead.Exert an instantaneous force on the part, acting at the given position.
- Parameters:
force – A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
position – The position at which the force acts, as a vector.
referenceFrame – The reference frame that the force and position are in.
- Game Scenes:
Flight
Note
The force is applied instantaneously in a single physics update.
-
krpc_error_t krpc_SpaceCenter_Part_set_Glow(krpc_connection_t connection, krpc_SpaceCenter_Part_t instance, bool value)#
Whether the part is glowing.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Part_AutoStrutMode(krpc_connection_t connection, krpc_SpaceCenter_AutoStrutMode_t *returnValue, krpc_SpaceCenter_Part_t instance)#
Auto-strut mode.
-
krpc_error_t krpc_SpaceCenter_Part_HasRealFuelsTank(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether the part is a fuel tank managed by RealFuels. The remaining properties in this section are only available when it is.
-
krpc_error_t krpc_SpaceCenter_Part_HighlyPressurized(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Part_t instance)#
Whether the tank is highly pressurized, which is what a pressure-fed engine needs to draw from (see
krpc_SpaceCenter_Engine_PressureFed()). Throws an exception if the part is not a RealFuels fuel tank (seekrpc_SpaceCenter_Part_HasRealFuelsTank()).
-
krpc_error_t krpc_SpaceCenter_Part_BoiloffRate(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Part_t instance)#
The rate at which the tank’s cryogenic contents are boiling off, in kilograms per second of in-game time, measured over the last update RealFuels computed it in. The contents keep boiling off under time warp, where that update covers a much longer span of in-game time than a physics frame does. The rate is zero for a tank holding nothing cryogenic, for one still being fed by a launch clamp, whose temperature RealFuels holds down instead, and in the editor. Throws an exception if the part is not a RealFuels fuel tank (see
krpc_SpaceCenter_Part_HasRealFuelsTank()).
-
krpc_error_t krpc_SpaceCenter_Part_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Part_t instance)#
-
type krpc_SpaceCenter_AutoStrutMode_t#
The state of an auto-strut.
krpc_SpaceCenter_Part_AutoStrutMode()-
KRPC_SPACECENTER_AUTOSTRUTMODE_OFF#
Off
-
KRPC_SPACECENTER_AUTOSTRUTMODE_ROOT#
Root
-
KRPC_SPACECENTER_AUTOSTRUTMODE_HEAVIEST#
Heaviest
-
KRPC_SPACECENTER_AUTOSTRUTMODE_GRANDPARENT#
Grandparent
-
KRPC_SPACECENTER_AUTOSTRUTMODE_FORCEROOT#
ForceRoot
-
KRPC_SPACECENTER_AUTOSTRUTMODE_FORCEHEAVIEST#
ForceHeaviest
-
KRPC_SPACECENTER_AUTOSTRUTMODE_FORCEGRANDPARENT#
ForceGrandparent
-
KRPC_SPACECENTER_AUTOSTRUTMODE_OFF#
-
type krpc_SpaceCenter_Force_t#
Obtained by calling
Debug.AddForce.-
krpc_error_t krpc_SpaceCenter_Force_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Force_t instance)#
The part that this force is applied to.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Force_ForceVector(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Force_t instance)#
-
krpc_error_t krpc_SpaceCenter_Force_set_ForceVector(krpc_connection_t connection, krpc_SpaceCenter_Force_t instance, const krpc_tuple_double_double_double_t *value)#
The force vector, in Newtons.
- Returns:
A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Force_Position(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Force_t instance)#
-
krpc_error_t krpc_SpaceCenter_Force_set_Position(krpc_connection_t connection, krpc_SpaceCenter_Force_t instance, const krpc_tuple_double_double_double_t *value)#
The position at which the force acts, in reference frame
krpc_SpaceCenter_Force_ReferenceFrame().- Returns:
The position as a vector.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Force_ReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t *returnValue, krpc_SpaceCenter_Force_t instance)#
-
krpc_error_t krpc_SpaceCenter_Force_set_ReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_Force_t instance, krpc_SpaceCenter_ReferenceFrame_t value)#
The reference frame of the force vector and position.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Force_Remove(krpc_connection_t connection, krpc_SpaceCenter_Force_t instance)#
Remove the force.
- Game Scenes:
Flight
Note
Any further use of this object throws an exception.
-
krpc_error_t krpc_SpaceCenter_Force_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Force_t instance)#
Module#
-
type krpc_SpaceCenter_Module_t#
This can be used to interact with a specific part module. This includes part modules in stock KSP, and those added by mods.
In KSP, each part has zero or more PartModules associated with it. Each one contains some of the functionality of the part. For example, an engine has a “ModuleEngines” part module that contains all the functionality of an engine.
-
krpc_error_t krpc_SpaceCenter_Module_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Module_t instance)#
Name of the PartModule. For example, “ModuleEngines”.
-
krpc_error_t krpc_SpaceCenter_Module_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Module_t instance)#
The part that contains this module.
-
krpc_error_t krpc_SpaceCenter_Module_Config(krpc_connection_t connection, krpc_SpaceCenter_ConfigNode_t *returnValue, krpc_SpaceCenter_Module_t instance)#
The static configuration of the module, as found in the part’s cfg file. This provides access to data that is not exposed as a field, such as the resources produced by a generator. Returns
nullptrif the module’s configuration node cannot be found.
-
krpc_error_t krpc_SpaceCenter_Module_FieldList(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Module_t instance)#
A list of all the fields of the module, including those not visible in the right-click menu of the part. Filter by
krpc_SpaceCenter_PartField_Visible()to get just the visible ones.
-
krpc_error_t krpc_SpaceCenter_Module_EventList(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Module_t instance)#
A list of all the events of the module, including those not currently visible or active. Events are the clickable buttons visible in the right-click menu of the part. Filter by
krpc_SpaceCenter_PartEvent_Visible()andkrpc_SpaceCenter_PartEvent_Active()to get just the ones shown in the menu.
-
krpc_error_t krpc_SpaceCenter_Module_ActionList(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Module_t instance)#
A list of all the actions of the module. These are the parts actions that can be assigned to action groups in the in-game editor.
-
krpc_error_t krpc_SpaceCenter_Module_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Module_t instance)#
-
type krpc_SpaceCenter_PartField_t#
A field of a part module. Obtained by calling
krpc_SpaceCenter_Module_FieldList().-
krpc_error_t krpc_SpaceCenter_PartField_Module(krpc_connection_t connection, krpc_SpaceCenter_Module_t *returnValue, krpc_SpaceCenter_PartField_t instance)#
The part module that contains this field.
-
krpc_error_t krpc_SpaceCenter_PartField_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_PartField_t instance)#
The identifier of the field. This is stable and does not change between game versions, unlike
krpc_SpaceCenter_PartField_GuiName().
-
krpc_error_t krpc_SpaceCenter_PartField_GuiName(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_PartField_t instance)#
The name of the field, as displayed in the right-click menu of the part. This may be empty for fields that are not visible in the menu.
-
krpc_error_t krpc_SpaceCenter_PartField_Visible(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_PartField_t instance)#
Whether the field is visible in the right-click menu of the part, in the current scene (flight or editor).
-
krpc_error_t krpc_SpaceCenter_PartField_Type(krpc_connection_t connection, krpc_SpaceCenter_FieldType_t *returnValue, krpc_SpaceCenter_PartField_t instance)#
The type of the field.
-
krpc_error_t krpc_SpaceCenter_PartField_Value(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_PartField_t instance)#
-
krpc_error_t krpc_SpaceCenter_PartField_set_Value(krpc_connection_t connection, krpc_SpaceCenter_PartField_t instance, const char *value)#
The value of the field, as a string. This works for fields of any type, and returns the same string that is shown in the right-click menu of the part.
Note
Setting the value using this property is only permitted for string fields. Use the typed properties (
krpc_SpaceCenter_PartField_BoolValue(),krpc_SpaceCenter_PartField_IntValue(),krpc_SpaceCenter_PartField_FloatValue(),krpc_SpaceCenter_PartField_DoubleValue()) to set fields of other types.
-
krpc_error_t krpc_SpaceCenter_PartField_BoolValue(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_PartField_t instance)#
-
krpc_error_t krpc_SpaceCenter_PartField_set_BoolValue(krpc_connection_t connection, krpc_SpaceCenter_PartField_t instance, bool value)#
The value of a boolean field.
Note
The getter throws an exception if the field is not a boolean field (see
krpc_SpaceCenter_PartField_Type()).
-
krpc_error_t krpc_SpaceCenter_PartField_IntValue(krpc_connection_t connection, int32_t *returnValue, krpc_SpaceCenter_PartField_t instance)#
-
krpc_error_t krpc_SpaceCenter_PartField_set_IntValue(krpc_connection_t connection, krpc_SpaceCenter_PartField_t instance, int32_t value)#
The value of an integer field.
Note
The getter throws an exception if the field is not an integer field (see
krpc_SpaceCenter_PartField_Type()).
-
krpc_error_t krpc_SpaceCenter_PartField_FloatValue(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_PartField_t instance)#
-
krpc_error_t krpc_SpaceCenter_PartField_set_FloatValue(krpc_connection_t connection, krpc_SpaceCenter_PartField_t instance, float value)#
The value of a single precision floating point field.
Note
The getter throws an exception if the field is not a single precision floating point field (see
krpc_SpaceCenter_PartField_Type()).
-
krpc_error_t krpc_SpaceCenter_PartField_DoubleValue(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_PartField_t instance)#
-
krpc_error_t krpc_SpaceCenter_PartField_set_DoubleValue(krpc_connection_t connection, krpc_SpaceCenter_PartField_t instance, double value)#
The value of a double precision floating point field.
Note
The getter throws an exception if the field is not a double precision floating point field (see
krpc_SpaceCenter_PartField_Type()).
-
krpc_error_t krpc_SpaceCenter_PartField_Reset(krpc_connection_t connection, krpc_SpaceCenter_PartField_t instance)#
Set the value of the field to its original value.
Note
The original value is the value the field had when the part was loaded. Works for any field, including those not visible in the right-click menu.
-
krpc_error_t krpc_SpaceCenter_PartField_Module(krpc_connection_t connection, krpc_SpaceCenter_Module_t *returnValue, krpc_SpaceCenter_PartField_t instance)#
-
type krpc_SpaceCenter_FieldType_t#
The type of a part module field. See
krpc_SpaceCenter_PartField_Type().-
KRPC_SPACECENTER_FIELDTYPE_BOOLEAN#
A boolean field. Access using
krpc_SpaceCenter_PartField_BoolValue().
-
KRPC_SPACECENTER_FIELDTYPE_INTEGER#
An integer field. Access using
krpc_SpaceCenter_PartField_IntValue().
-
KRPC_SPACECENTER_FIELDTYPE_FLOAT#
A single precision floating point field. Access using
krpc_SpaceCenter_PartField_FloatValue().
-
KRPC_SPACECENTER_FIELDTYPE_DOUBLE#
A double precision floating point field. Access using
krpc_SpaceCenter_PartField_DoubleValue().
-
KRPC_SPACECENTER_FIELDTYPE_STRING#
A string field. Access using
krpc_SpaceCenter_PartField_Value().
-
KRPC_SPACECENTER_FIELDTYPE_UNKNOWN#
A field whose type is not one of the above. Its value can still be read as a string using
krpc_SpaceCenter_PartField_Value().
-
KRPC_SPACECENTER_FIELDTYPE_BOOLEAN#
-
type krpc_SpaceCenter_PartEvent_t#
An event of a part module. Events are the clickable buttons visible in the right-click menu of the part. Obtained by calling
krpc_SpaceCenter_Module_EventList().-
krpc_error_t krpc_SpaceCenter_PartEvent_Module(krpc_connection_t connection, krpc_SpaceCenter_Module_t *returnValue, krpc_SpaceCenter_PartEvent_t instance)#
The part module that contains this event.
-
krpc_error_t krpc_SpaceCenter_PartEvent_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_PartEvent_t instance)#
The identifier of the event. This is stable and does not change between game versions, unlike
krpc_SpaceCenter_PartEvent_GuiName().
-
krpc_error_t krpc_SpaceCenter_PartEvent_GuiName(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_PartEvent_t instance)#
The name of the event, as displayed in the right-click menu of the part.
-
krpc_error_t krpc_SpaceCenter_PartEvent_Visible(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_PartEvent_t instance)#
Whether the event is visible in the right-click menu of the part, in the current scene (flight or editor).
-
krpc_error_t krpc_SpaceCenter_PartEvent_Active(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_PartEvent_t instance)#
Whether the event is currently active.
-
krpc_error_t krpc_SpaceCenter_PartEvent_Trigger(krpc_connection_t connection, krpc_SpaceCenter_PartEvent_t instance)#
Trigger the event. Equivalent to clicking the button in the right-click menu of the part.
-
krpc_error_t krpc_SpaceCenter_PartEvent_Module(krpc_connection_t connection, krpc_SpaceCenter_Module_t *returnValue, krpc_SpaceCenter_PartEvent_t instance)#
-
type krpc_SpaceCenter_PartAction_t#
An action of a part module. These are the part actions that can be assigned to action groups in the in-game editor. Obtained by calling
krpc_SpaceCenter_Module_ActionList().-
krpc_error_t krpc_SpaceCenter_PartAction_Module(krpc_connection_t connection, krpc_SpaceCenter_Module_t *returnValue, krpc_SpaceCenter_PartAction_t instance)#
The part module that contains this action.
-
krpc_error_t krpc_SpaceCenter_PartAction_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_PartAction_t instance)#
The identifier of the action. This is stable and does not change between game versions, unlike
krpc_SpaceCenter_PartAction_GuiName().
-
krpc_error_t krpc_SpaceCenter_PartAction_GuiName(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_PartAction_t instance)#
The name of the action, as displayed in the in-game editor.
-
krpc_error_t krpc_SpaceCenter_PartAction_set_Activated(krpc_connection_t connection, krpc_SpaceCenter_PartAction_t instance, bool value)#
Activate or deactivate the action. Equivalent to triggering the action from an action group. Set to
trueto activate the action, orfalseto deactivate it.
-
krpc_error_t krpc_SpaceCenter_PartAction_Module(krpc_connection_t connection, krpc_SpaceCenter_Module_t *returnValue, krpc_SpaceCenter_PartAction_t instance)#
Config Node#
-
type krpc_SpaceCenter_ConfigNode_t#
Represents a configuration node, as found in a part’s configuration file. A node has a name, a set of named values and a set of child nodes. This is used to access the static configuration of a part or part module, for example via
krpc_SpaceCenter_Part_Config()andkrpc_SpaceCenter_Module_Config().-
krpc_error_t krpc_SpaceCenter_ConfigNode_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_ConfigNode_t instance)#
The name of the configuration node. For example “MODULE”.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_Values(krpc_connection_t connection, krpc_dictionary_string_string_t *returnValue, krpc_SpaceCenter_ConfigNode_t instance)#
The values stored in the node, as a dictionary mapping names to values.
Note
If a name appears more than once, only the first value is included. Use
krpc_SpaceCenter_ConfigNode_GetValues()to get all of the values with a given name.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_HasValue(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ConfigNode_t instance, const char *name)#
Returns
trueif the node has a value with the given name.- Parameters:
name – Name of the value.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_GetValue(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_ConfigNode_t instance, const char *name)#
Returns the value with the given name. If there is more than one value with the given name, the first is returned. Throws an exception if there is no value with the given name.
- Parameters:
name – Name of the value.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_GetValues(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_SpaceCenter_ConfigNode_t instance, const char *name)#
Returns all of the values with the given name, as a list.
- Parameters:
name – Name of the values.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_Nodes(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_ConfigNode_t instance)#
The child nodes contained in this node.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_HasNode(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ConfigNode_t instance, const char *name)#
Returns
trueif the node has a child node with the given name.- Parameters:
name – Name of the child node.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_GetNode(krpc_connection_t connection, krpc_SpaceCenter_ConfigNode_t *returnValue, krpc_SpaceCenter_ConfigNode_t instance, const char *name)#
Returns the child node with the given name. If there is more than one child node with the given name, the first is returned. Throws an exception if there is no child node with the given name.
- Parameters:
name – Name of the child node.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_GetNodes(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_ConfigNode_t instance, const char *name)#
Returns all of the child nodes with the given name, as a list.
- Parameters:
name – Name of the child nodes.
-
krpc_error_t krpc_SpaceCenter_ConfigNode_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_ConfigNode_t instance)#
Specific Types of Part#
The following classes provide functionality for specific types of part.
Antenna#
Note
If RemoteTech is installed, use the RemoteTech service APIs to interact with antennas. This class is only for stock KSP antennas.
-
type krpc_SpaceCenter_Antenna_t#
An antenna. Obtained by calling
krpc_SpaceCenter_Part_Antenna().-
krpc_error_t krpc_SpaceCenter_Antenna_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Antenna_t instance)#
The part object for this antenna.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Antenna_State(krpc_connection_t connection, krpc_SpaceCenter_DeployableState_t *returnValue, krpc_SpaceCenter_Antenna_t instance)#
The current state of the antenna.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Antenna_Deployable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Antenna_t instance)#
Whether the antenna is deployable.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Antenna_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Antenna_t instance)#
-
krpc_error_t krpc_SpaceCenter_Antenna_set_Deployed(krpc_connection_t connection, krpc_SpaceCenter_Antenna_t instance, bool value)#
Whether the antenna is deployed.
- Game Scenes:
Flight
Note
Fixed antennas are always deployed. Returns an error if you try to deploy a fixed antenna.
-
krpc_error_t krpc_SpaceCenter_Antenna_CanTransmit(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Antenna_t instance)#
Whether data can be transmitted by this antenna.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Antenna_Transmit(krpc_connection_t connection, krpc_SpaceCenter_Antenna_t instance)#
Transmit data.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Antenna_Cancel(krpc_connection_t connection, krpc_SpaceCenter_Antenna_t instance)#
Cancel current transmission of data.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Antenna_AllowPartial(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Antenna_t instance)#
-
krpc_error_t krpc_SpaceCenter_Antenna_set_AllowPartial(krpc_connection_t connection, krpc_SpaceCenter_Antenna_t instance, bool value)#
Whether partial data transmission is permitted.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Antenna_Power(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Antenna_t instance)#
The power of the antenna.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Antenna_Combinable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Antenna_t instance)#
Whether the antenna can be combined with other antennae on the vessel to boost the power.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Antenna_CombinableExponent(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Antenna_t instance)#
Exponent used to calculate the combined power of multiple antennae on a vessel.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Antenna_PacketInterval(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Antenna_t instance)#
Interval between sending packets in seconds.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Antenna_PacketSize(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Antenna_t instance)#
Amount of data sent per packet in Mits.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Antenna_PacketResourceCost(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Antenna_t instance)#
Units of electric charge consumed per packet sent.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Antenna_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Antenna_t instance)#
Cargo Bay#
-
type krpc_SpaceCenter_CargoBay_t#
A cargo bay. Obtained by calling
krpc_SpaceCenter_Part_CargoBay().-
krpc_error_t krpc_SpaceCenter_CargoBay_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_CargoBay_t instance)#
The part object for this cargo bay.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_CargoBay_State(krpc_connection_t connection, krpc_SpaceCenter_DeployableState_t *returnValue, krpc_SpaceCenter_CargoBay_t instance)#
The state of the cargo bay.
- Game Scenes:
Flight
Note
This describes where the bay’s doors are, which is not the same as whether the parts inside are sheltered: a bay whose open end has nothing attached to it never shelters anything, however tightly shut it is. Use
krpc_SpaceCenter_Part_Shielded()for that.A cargo bay is never
KRPC_SPACECENTER_DEPLOYABLESTATE_BROKEN, as the game does not track damage for them.
-
krpc_error_t krpc_SpaceCenter_CargoBay_Open(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_CargoBay_t instance)#
-
krpc_error_t krpc_SpaceCenter_CargoBay_set_Open(krpc_connection_t connection, krpc_SpaceCenter_CargoBay_t instance, bool value)#
Whether the cargo bay is open.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_CargoBay_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_CargoBay_t instance)#
Control Surface#
-
type krpc_SpaceCenter_ControlSurface_t#
An aerodynamic control surface. Obtained by calling
krpc_SpaceCenter_Part_ControlSurface().-
krpc_error_t krpc_SpaceCenter_ControlSurface_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
The part object for this control surface.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_PitchEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_PitchEnabled(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, bool value)#
Whether the control surface has pitch control enabled.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_YawEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_YawEnabled(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, bool value)#
Whether the control surface has yaw control enabled.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_RollEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_RollEnabled(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, bool value)#
Whether the control surface has roll control enabled.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_AuthorityLimiter(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_AuthorityLimiter(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, float value)#
The authority limiter for the control surface, which controls how far the control surface will move.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_Inverted(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_Inverted(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, bool value)#
Whether the control surface movement is inverted.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_Deployed(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, bool value)#
Whether the control surface has been fully deployed. Throws an exception if set while
krpc_SpaceCenter_ControlSurface_DeflectionOverride()is enabled, which holds the surface deployed.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_DeployAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_DeployAngle(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, float value)#
The deploy angle of the control surface, in degrees.
- Game Scenes:
Flight, Editor Vab, Editor Sph
Note
Applied when
krpc_SpaceCenter_ControlSurface_Deployed()is true, and clamped to the range given bykrpc_SpaceCenter_ControlSurface_MinDeployAngle()andkrpc_SpaceCenter_ControlSurface_MaxDeployAngle(). Whilekrpc_SpaceCenter_ControlSurface_DeflectionOverride()is enabled,krpc_SpaceCenter_ControlSurface_Deflection()drives the angle. A value set here takes effect when the override is released.
-
krpc_error_t krpc_SpaceCenter_ControlSurface_MinDeployAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
The minimum
krpc_SpaceCenter_ControlSurface_DeployAngle()of the control surface, in degrees.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_MaxDeployAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
The maximum
krpc_SpaceCenter_ControlSurface_DeployAngle()of the control surface, in degrees.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_DeflectionOverride(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_DeflectionOverride(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, bool value)#
Whether the control surface deflection is being set directly, bypassing the vessel’s normal flight control. When enabled, the surface holds the deflection set by
krpc_SpaceCenter_ControlSurface_Deflection()instead of responding to pitch, yaw and roll control inputs. The prior state is restored when the override is released, when the controlling client disconnects, or when the vessel changes.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ControlSurface_Deflection(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
-
krpc_error_t krpc_SpaceCenter_ControlSurface_set_Deflection(krpc_connection_t connection, krpc_SpaceCenter_ControlSurface_t instance, float value)#
The deflection command applied when
krpc_SpaceCenter_ControlSurface_DeflectionOverride()is enabled, as a value between -1 and 1, mapped onto the surface’s deploy angle range.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ControlSurface_SurfaceArea(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
Surface area of the control surface in \(m^2\).
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ControlSurface_AvailableTorque(krpc_connection_t connection, krpc_SpaceCenter_AxisRange_t *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
The available torque, in Newton meters, that can be produced by this control surface, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
krpc_SpaceCenter_Vessel_ReferenceFrame().- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ControlSurface_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ControlSurface_t instance)#
Decoupler#
-
type krpc_SpaceCenter_Decoupler_t#
A decoupler. Obtained by calling
krpc_SpaceCenter_Part_Decoupler()-
krpc_error_t krpc_SpaceCenter_Decoupler_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Decoupler_t instance)#
The part object for this decoupler.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Decoupler_Decouple(krpc_connection_t connection, krpc_SpaceCenter_Vessel_t *returnValue, krpc_SpaceCenter_Decoupler_t instance)#
Fires the decoupler. Returns the new vessel created when the decoupler fires. Throws an exception if the decoupler has already fired.
- Game Scenes:
Flight
Note
When called, the active vessel may change. It is therefore possible that, after calling this function, the object(s) returned by previous call(s) to
krpc_SpaceCenter_ActiveVessel()no longer refer to the active vessel.
-
krpc_error_t krpc_SpaceCenter_Decoupler_Decoupled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Decoupler_t instance)#
Whether the decoupler has fired.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Decoupler_Staged(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Decoupler_t instance)#
Whether the decoupler is enabled in the staging sequence.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Decoupler_Impulse(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Decoupler_t instance)#
The impulse that the decoupler imparts when it is fired, in Newton seconds.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Decoupler_IsOmniDecoupler(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Decoupler_t instance)#
Whether the decoupler is an omni-decoupler (e.g. stack separator)
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Decoupler_AttachedPart(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Decoupler_t instance)#
The part attached to this decoupler’s explosive node.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Decoupler_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Decoupler_t instance)#
Deployable State#
The deployment state shared by antennas, cargo bays, landing legs, radiators, resource harvesters, solar panels and wheels.
-
type krpc_SpaceCenter_DeployableState_t#
The state of a deployable part.
krpc_SpaceCenter_Antenna_State(),krpc_SpaceCenter_CargoBay_State(),krpc_SpaceCenter_Leg_State(),krpc_SpaceCenter_Radiator_State(),krpc_SpaceCenter_ResourceHarvester_State(),krpc_SpaceCenter_SolarPanel_State(),krpc_SpaceCenter_Wheel_State()-
KRPC_SPACECENTER_DEPLOYABLESTATE_DEPLOYED#
The part is fully deployed. A cargo bay in this state is fully open. Parts that cannot be retracted, such as fixed radiators, solar panels, antennas, landing legs and wheels, are always in this state.
-
KRPC_SPACECENTER_DEPLOYABLESTATE_RETRACTED#
The part is fully retracted. A cargo bay in this state is closed and locked.
-
KRPC_SPACECENTER_DEPLOYABLESTATE_DEPLOYING#
The part is being deployed. A cargo bay in this state is opening.
-
KRPC_SPACECENTER_DEPLOYABLESTATE_RETRACTING#
The part is being retracted. A cargo bay in this state is closing.
-
KRPC_SPACECENTER_DEPLOYABLESTATE_BROKEN#
The part is broken. Cargo bays and resource harvesters never report this state, as the game does not track damage for them.
-
KRPC_SPACECENTER_DEPLOYABLESTATE_DEPLOYED#
Docking Port#
-
type krpc_SpaceCenter_DockingPort_t#
A docking port. Obtained by calling
krpc_SpaceCenter_Part_DockingPort()-
krpc_error_t krpc_SpaceCenter_DockingPort_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
The part object for this docking port.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_DockingPort_State(krpc_connection_t connection, krpc_SpaceCenter_DockingPortState_t *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
The current state of the docking port.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_DockedPart(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
The part that this docking port is docked to. Returns
nullptrif this docking port is not docked to anything.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_Undock(krpc_connection_t connection, krpc_SpaceCenter_Vessel_t *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
Undocks the docking port and returns the new
krpc_SpaceCenter_Vessel_tthat is created. This method can be called for either docking port in a docked pair. Throws an exception if the docking port is not docked to anything.- Game Scenes:
Flight
Note
When called, the active vessel may change. It is therefore possible that, after calling this function, the object(s) returned by previous call(s) to
krpc_SpaceCenter_ActiveVessel()no longer refer to the active vessel.
-
krpc_error_t krpc_SpaceCenter_DockingPort_ReengageDistance(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
The distance a docking port must move away when it undocks before it becomes ready to dock with another port, in meters.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_HasShield(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
Whether the docking port has a shield.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_Shielded(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
-
krpc_error_t krpc_SpaceCenter_DockingPort_set_Shielded(krpc_connection_t connection, krpc_SpaceCenter_DockingPort_t instance, bool value)#
The state of the docking ports shield, if it has one.
Returns
trueif the docking port has a shield, and the shield is closed. Otherwise returnsfalse. When set totrue, the shield is closed, and when set tofalsethe shield is opened. If the docking port does not have a shield, setting this attribute has no effect.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_CanRotate(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
Whether the docking port can be commanded to rotate while docked.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_MaximumRotation(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
Maximum rotation angle in degrees.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_MinimumRotation(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
Minimum rotation angle in degrees.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_RotationTarget(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
-
krpc_error_t krpc_SpaceCenter_DockingPort_set_RotationTarget(krpc_connection_t connection, krpc_SpaceCenter_DockingPort_t instance, float value)#
Rotation target angle in degrees.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_RotationLocked(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
-
krpc_error_t krpc_SpaceCenter_DockingPort_set_RotationLocked(krpc_connection_t connection, krpc_SpaceCenter_DockingPort_t instance, bool value)#
Lock rotation. When locked, allows auto-strut to work across the joint.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_Position(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_DockingPort_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The position of the docking port, 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
-
krpc_error_t krpc_SpaceCenter_DockingPort_Direction(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_DockingPort_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The direction that docking port points in, 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
-
krpc_error_t krpc_SpaceCenter_DockingPort_Rotation(krpc_connection_t connection, krpc_tuple_double_double_double_double_t *returnValue, krpc_SpaceCenter_DockingPort_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The rotation of the docking port, 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 \((x, y, z, w)\).
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_DockingPort_ReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
The reference frame that is fixed relative to this docking port, and oriented with the port.
The origin is at the position of the docking port.
The axes rotate with the docking port.
The x-axis points out to the right side of the docking port.
The y-axis points in the direction the docking port is facing.
The z-axis points out of the bottom off the docking port.
- Game Scenes:
Flight
Note
This reference frame is not necessarily equivalent to the reference frame for the part, returned by
krpc_SpaceCenter_Part_ReferenceFrame().
Docking port reference frame origin and axes#
Inline docking port reference frame origin and axes#
-
krpc_error_t krpc_SpaceCenter_DockingPort_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_DockingPort_t instance)#
-
type krpc_SpaceCenter_DockingPortState_t#
The state of a docking port. See
krpc_SpaceCenter_DockingPort_State().-
KRPC_SPACECENTER_DOCKINGPORTSTATE_READY#
The docking port is ready to dock to another docking port.
-
KRPC_SPACECENTER_DOCKINGPORTSTATE_DOCKED#
The docking port is docked to another docking port, or docked to another part (from the VAB/SPH).
-
KRPC_SPACECENTER_DOCKINGPORTSTATE_DOCKING#
The docking port is very close to another docking port, but has not docked. It is using magnetic force to acquire a solid dock.
-
KRPC_SPACECENTER_DOCKINGPORTSTATE_UNDOCKING#
The docking port has just been undocked from another docking port, and is disabled until it moves away by a sufficient distance (
krpc_SpaceCenter_DockingPort_ReengageDistance()).
-
KRPC_SPACECENTER_DOCKINGPORTSTATE_SHIELDED#
The docking port has a shield, and the shield is closed.
-
KRPC_SPACECENTER_DOCKINGPORTSTATE_MOVING#
The docking ports shield is currently opening/closing.
-
KRPC_SPACECENTER_DOCKINGPORTSTATE_READY#
Engine#
-
type krpc_SpaceCenter_Engine_t#
An engine, including ones of various types. For example liquid fuelled gimballed engines, solid rocket boosters and jet engines. Obtained by calling
krpc_SpaceCenter_Part_Engine().Note
For RCS thrusters
krpc_SpaceCenter_Part_RCS().-
krpc_error_t krpc_SpaceCenter_Engine_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The part object for this engine.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_Active(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_Active(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, bool value)#
Whether the engine is active. Setting this attribute may have no effect, depending on
krpc_SpaceCenter_Engine_CanShutdown()andkrpc_SpaceCenter_Engine_CanRestart().- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_Thrust(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
The current amount of thrust being produced by the engine, in Newtons.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_AvailableThrust(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
The amount of thrust, in Newtons, that would be produced by the engine when activated and with its throttle set to 100%. Returns zero if the engine does not have any fuel. Takes the engine’s current
krpc_SpaceCenter_Engine_ThrustLimit()and atmospheric conditions into account.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_AvailableThrustAt(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance, double pressure)#
The amount of thrust, in Newtons, that would be produced by the engine when activated and with its throttle set to 100%. Returns zero if the engine does not have any fuel. Takes the given pressure into account.
- Parameters:
pressure – Atmospheric pressure in atmospheres
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_MaxThrust(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
The amount of thrust, in Newtons, that would be produced by the engine when activated and fueled, with its throttle and throttle limiter set to 100%.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_MaxThrustAt(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance, double pressure)#
The amount of thrust, in Newtons, that would be produced by the engine when activated and fueled, with its throttle and throttle limiter set to 100%. Takes the given pressure into account.
- Parameters:
pressure – Atmospheric pressure in atmospheres
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_MaxVacuumThrust(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
The maximum amount of thrust that can be produced by the engine in a vacuum, in Newtons. This is the amount of thrust produced by the engine when activated,
krpc_SpaceCenter_Engine_ThrustLimit()is set to 100%, the main vessel’s throttle is set to 100% and the engine is in a vacuum.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_ThrustLimit(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_ThrustLimit(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, float value)#
The thrust limiter of the engine. A value between 0 and 1. Setting this attribute may have no effect, for example the thrust limit for a solid rocket booster cannot be changed in flight.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_Thrusters(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The components of the engine that generate thrust.
- Game Scenes:
Flight
Note
For example, this corresponds to the rocket nozzel on a solid rocket booster, or the individual nozzels on a RAPIER engine. The overall thrust produced by the engine, as reported by
krpc_SpaceCenter_Engine_AvailableThrust(),krpc_SpaceCenter_Engine_MaxThrust()and others, is the sum of the thrust generated by each thruster.
-
krpc_error_t krpc_SpaceCenter_Engine_SpecificImpulse(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
The current specific impulse of the engine, in seconds. Returns zero if the engine is not active.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_SpecificImpulseAt(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance, double pressure)#
The specific impulse of the engine under the given pressure, in seconds. Returns zero if the engine is not active.
- Parameters:
pressure – Atmospheric pressure in atmospheres
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_VacuumSpecificImpulse(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
The vacuum specific impulse of the engine, in seconds.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_KerbinSeaLevelSpecificImpulse(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
The specific impulse of the engine at sea level on Kerbin, in seconds.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_PropellantNames(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The names of the propellants that the engine consumes.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_PropellantRatios(krpc_connection_t connection, krpc_dictionary_string_float_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The ratio of resources that the engine consumes. A dictionary mapping resource names to the ratio at which they are consumed by the engine.
- Game Scenes:
Flight
Note
For example, if the ratios are 0.6 for LiquidFuel and 0.4 for Oxidizer, then for every 0.6 units of LiquidFuel that the engine burns, it will burn 0.4 units of Oxidizer.
-
krpc_error_t krpc_SpaceCenter_Engine_Propellants(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The propellants that the engine consumes.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_HasFuel(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine has any fuel available.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_Flameout(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine has flamed out - it is active but has run out of propellant, so it is producing no thrust. This is the signal a client can use to decide when to activate the next stage. Note that on a vessel with drop tanks or asparagus staging some engines can flame out while others keep burning.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_Throttle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_Throttle(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, float value)#
The current throttle setting for the engine. A value between 0 and 1. This is not necessarily the same as the vessel’s main throttle setting, as some engines take time to adjust their throttle (such as jet engines), or independent throttle may be enabled.
When the engine’s independent throttle is enabled (see
krpc_SpaceCenter_Engine_IndependentThrottle()), can be used to set the throttle percentage.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_ThrottleLocked(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the
krpc_SpaceCenter_Control_Throttle()affects the engine. For example, this istruefor liquid fueled rockets, andfalsefor solid rocket boosters.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_IndependentThrottle(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_IndependentThrottle(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, bool value)#
Whether the independent throttle is enabled for the engine.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_CanRestart(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine can be restarted once shutdown. If the engine cannot be shutdown, returns
false. For example, this istruefor liquid fueled rockets andfalsefor solid rocket boosters.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_CanShutdown(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine can be shutdown once activated. For example, this is
truefor liquid fueled rockets andfalsefor solid rocket boosters.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_HasModes(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine has multiple modes of operation.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_Mode(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_Mode(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, const char *value)#
The name of the current engine mode.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_Modes(krpc_connection_t connection, krpc_dictionary_string_object_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The available modes for the engine. A dictionary mapping mode names to
krpc_SpaceCenter_Engine_tobjects.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_ToggleMode(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance)#
Toggle the current engine mode.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_AutoModeSwitch(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_AutoModeSwitch(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, bool value)#
Whether the engine will automatically switch modes.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_Gimballed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine is gimballed.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_GimbalRange(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
The range over which the gimbal can move, in degrees. Returns 0 if the engine is not gimballed.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_GimbalLocked(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_GimbalLocked(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, bool value)#
Whether the engines gimbal is locked in place. Setting this attribute has no effect if the engine is not gimballed.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_GimbalLimit(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_GimbalLimit(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, float value)#
The gimbal limiter of the engine. A value between 0 and 1. Returns 0 if the gimbal is locked.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_GimbalOverride(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_GimbalOverride(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, bool value)#
Whether the gimbal is being controlled directly, bypassing the vessel’s normal flight controls. When enabled, the gimbal deflection is set by
krpc_SpaceCenter_Engine_GimbalActuation()instead of the normal control inputs. The override is automatically released if the controlling client disconnects or the vessel changes. Has no effect if the engine is not gimballed.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_GimbalActuation(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_GimbalActuation(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, const krpc_tuple_double_double_double_t *value)#
The gimbal actuation command applied when
krpc_SpaceCenter_Engine_GimbalOverride()is enabled, in the pitch, roll and yaw axes. Each component is a normalized control input between -1 and 1. The physical deflection is scaled bykrpc_SpaceCenter_Engine_GimbalRange()andkrpc_SpaceCenter_Engine_GimbalLimit(). When the gimbal is not being overridden, returns the current actuation.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_AvailableTorque(krpc_connection_t connection, krpc_SpaceCenter_AxisRange_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The available torque, in Newton meters, that can be produced by this engine, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
krpc_SpaceCenter_Vessel_ReferenceFrame(). Returns zero if the engine is inactive, or not gimballed.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_CanReverseThrust(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine has a recognized thrust reverser. This is
truefor stock engines with a thrust reverser (such as the J-33 “Wheesley” and J-90 “Goliath” turbofan engines) and for selected mod engines. It isfalsefor engines whose reverser is not recognized, as KSP provides no standard way to detect one.- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_ThrustReversed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
krpc_error_t krpc_SpaceCenter_Engine_set_ThrustReversed(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance, bool value)#
Whether the engine’s thrust reverser is engaged, reversing the direction of thrust. While the reverser is still moving, this reports the state it is moving to, so a read immediately after a set returns the value that was set and setting the same value again has no effect. Throws an exception if the engine does not have a thrust reverser (see
krpc_SpaceCenter_Engine_CanReverseThrust()).- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_ToggleThrustReversal(krpc_connection_t connection, krpc_SpaceCenter_Engine_t instance)#
Toggle the engine’s thrust reverser. Throws an exception if the engine does not have a thrust reverser (see
krpc_SpaceCenter_Engine_CanReverseThrust()).- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_HasRealFuels(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine is managed by RealFuels. The remaining properties in this section are only available when it is.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_Ignitions(krpc_connection_t connection, int32_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The number of times the engine can still be ignited, or -1 if it can be ignited an unlimited number of times. Throws an exception if the engine is not managed by RealFuels (see
krpc_SpaceCenter_Engine_HasRealFuels()).- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_IgnitionResources(krpc_connection_t connection, krpc_dictionary_string_double_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
The resources the engine consumes each time it ignites, keyed by resource name, with the amount of each that is required. The engine uses up an ignition and fails to light if they are not available. Throws an exception if the engine is not managed by RealFuels (see
krpc_SpaceCenter_Engine_HasRealFuels()).- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_HasUllage(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine’s propellant is subject to ullage, so that it must be settled before the engine will run reliably. Throws an exception if the engine is not managed by RealFuels (see
krpc_SpaceCenter_Engine_HasRealFuels()).- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_PropellantStability(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Engine_t instance)#
How settled the propellant feeding the engine is, from 0 (fully unsettled) to 1 (fully settled). Acceleration along the engine’s thrust axis settles it, and coasting and rotation unsettle it. Throws an exception if the engine is not managed by RealFuels (see
krpc_SpaceCenter_Engine_HasRealFuels()).- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_PropellantReliability(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Engine_t instance)#
The probability that the propellant feeding the engine behaves normally, from 0 to 1. This is
krpc_SpaceCenter_Engine_PropellantStability()scaled by the game’s ullage difficulty setting, and is the value RealFuels itself tests against when deciding whether the engine runs. Throws an exception if the engine is not managed by RealFuels (seekrpc_SpaceCenter_Engine_HasRealFuels()).- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_PressureFed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the engine is fed by tank pressure rather than by a pump, and so needs to draw from a highly pressurized tank. Throws an exception if the engine is not managed by RealFuels (see
krpc_SpaceCenter_Engine_HasRealFuels()).- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Engine_HasFeedPressure(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Engine_t instance)#
Whether the tanks feeding the engine supply the pressure it needs. Always
truefor an engine that is not pressure fed. Throws an exception if the engine is not managed by RealFuels (seekrpc_SpaceCenter_Engine_HasRealFuels()).- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Engine_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Engine_t instance)#
-
type krpc_SpaceCenter_Propellant_t#
A propellant for an engine. Obtains by calling
krpc_SpaceCenter_Engine_Propellants().-
krpc_error_t krpc_SpaceCenter_Propellant_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Propellant_t instance)#
The name of the propellant.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_CurrentAmount(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Propellant_t instance)#
The current amount of propellant consumed in the current physics update.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_CurrentRequirement(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Propellant_t instance)#
The required amount of propellant for the current physics update.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_TotalResourceAvailable(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Propellant_t instance)#
The total amount of the underlying resource currently reachable given resource flow rules.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_TotalResourceCapacity(krpc_connection_t connection, double *returnValue, krpc_SpaceCenter_Propellant_t instance)#
The total vehicle capacity for the underlying propellant resource, restricted by resource flow rules.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_IgnoreForIsp(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Propellant_t instance)#
If this propellant should be ignored when calculating required mass flow given specific impulse.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_IgnoreForThrustCurve(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Propellant_t instance)#
If this propellant should be ignored for thrust curve calculations.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_DrawStackGauge(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Propellant_t instance)#
If this propellant has a stack gauge or not.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_IsDeprived(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Propellant_t instance)#
If this propellant is deprived.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_Ratio(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Propellant_t instance)#
The propellant ratio.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Propellant_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Propellant_t instance)#
Experiment#
-
type krpc_SpaceCenter_Experiment_t#
Obtained by calling
krpc_SpaceCenter_Part_Experiment().-
krpc_error_t krpc_SpaceCenter_Experiment_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Experiment_t instance)#
The part object for this experiment.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Experiment_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Experiment_t instance)#
Internal name of the experiment, as used in part cfg files.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Title(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Experiment_t instance)#
Title of the experiment, as shown on the in-game UI.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Run(krpc_connection_t connection, krpc_SpaceCenter_Experiment_t instance)#
Run the experiment.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Transmit(krpc_connection_t connection, krpc_SpaceCenter_Experiment_t instance)#
Transmit all experimental data contained by this part.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Dump(krpc_connection_t connection, krpc_SpaceCenter_Experiment_t instance)#
Dump the experimental data contained by the experiment.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Reset(krpc_connection_t connection, krpc_SpaceCenter_Experiment_t instance)#
Reset the experiment.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Experiment_t instance)#
Whether the experiment has been deployed.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Rerunnable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Experiment_t instance)#
Whether the experiment can be re-run.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Inoperable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Experiment_t instance)#
Whether the experiment is inoperable.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_HasData(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Experiment_t instance)#
Whether the experiment contains data.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Data(krpc_connection_t connection, krpc_list_SpaceCenter_ScienceData_t *returnValue, krpc_SpaceCenter_Experiment_t instance)#
The data contained in this experiment.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Biome(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Experiment_t instance)#
The name of the biome the experiment is currently in.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Available(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Experiment_t instance)#
Determines if the experiment is available given the current conditions.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_ScienceSubject(krpc_connection_t connection, krpc_SpaceCenter_ScienceSubject_t *returnValue, bool *returnValueIsNull, krpc_SpaceCenter_Experiment_t instance)#
Containing information on the corresponding specific science result for the current conditions. Returns
nullptrif the experiment is unavailable.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Experiment_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Experiment_t instance)#
-
type krpc_SpaceCenter_ScienceData_t#
Obtained by calling
krpc_SpaceCenter_Experiment_Data().-
float data_amount#
Data amount.
-
float science_value#
Science value.
-
float transmit_value#
Transmit value.
-
float data_amount#
-
type krpc_SpaceCenter_ScienceSubject_t#
Obtained by calling
krpc_SpaceCenter_Experiment_ScienceSubject().-
char *id#
The identifier of the subject, e.g.
crewReport@KerbinSrfLandedLaunchPad.
-
char *title#
The title of the subject, as shown in the science archives.
-
bool is_complete#
Whether the subject has been fully researched. This is true once the science banked for the subject reaches the science cap. As the banked science (see
krpc_SpaceCenter_ScienceSubject_t.science) is only updated after transmission/recovery, this reflects fully mining the subject over repeated experiments, not whether a single run has produced data. To check whether a run has produced data, and how valuable it is, usekrpc_SpaceCenter_Experiment_HasData()andkrpc_SpaceCenter_ScienceData_t.transmit_value.
-
float science#
Amount of science already earned from this subject, not updated until after transmission/recovery.
-
float science_cap#
Total science allowable for this subject.
-
float data_scale#
Multiply science value by this to determine data amount in mits.
-
float subject_value#
Multiplier for specific Celestial Body/Experiment Situation combination.
-
float scientific_value#
Diminishing value multiplier for decreasing the science value returned from repeated experiments.
-
char *id#
Fairing#
-
type krpc_SpaceCenter_Fairing_t#
A fairing. Obtained by calling
krpc_SpaceCenter_Part_Fairing(). Supports both stock fairings, and those from the ProceduralFairings mod.-
krpc_error_t krpc_SpaceCenter_Fairing_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Fairing_t instance)#
The part object for this fairing.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Fairing_Jettison(krpc_connection_t connection, krpc_SpaceCenter_Fairing_t instance)#
Jettison the fairing. Has no effect if it has already been jettisoned.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Fairing_Jettisoned(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Fairing_t instance)#
Whether the fairing has been jettisoned.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Fairing_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Fairing_t instance)#
Intake#
-
type krpc_SpaceCenter_Intake_t#
An air intake. Obtained by calling
krpc_SpaceCenter_Part_Intake().-
krpc_error_t krpc_SpaceCenter_Intake_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Intake_t instance)#
The part object for this intake.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Intake_Open(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Intake_t instance)#
-
krpc_error_t krpc_SpaceCenter_Intake_set_Open(krpc_connection_t connection, krpc_SpaceCenter_Intake_t instance, bool value)#
Whether the intake is open.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Intake_Speed(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Intake_t instance)#
Speed of the flow into the intake, in \(m/s\).
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Intake_Flow(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Intake_t instance)#
The rate of flow into the intake, in units of resource per second.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Intake_Area(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Intake_t instance)#
The area of the intake’s opening, in square meters.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Intake_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Intake_t instance)#
Leg#
-
type krpc_SpaceCenter_Leg_t#
A landing leg. Obtained by calling
krpc_SpaceCenter_Part_Leg().-
krpc_error_t krpc_SpaceCenter_Leg_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Leg_t instance)#
The part object for this landing leg.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Leg_State(krpc_connection_t connection, krpc_SpaceCenter_DeployableState_t *returnValue, krpc_SpaceCenter_Leg_t instance)#
The current state of the landing leg.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Leg_Deployable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Leg_t instance)#
Whether the leg is deployable.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Leg_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Leg_t instance)#
-
krpc_error_t krpc_SpaceCenter_Leg_set_Deployed(krpc_connection_t connection, krpc_SpaceCenter_Leg_t instance, bool value)#
Whether the landing leg is deployed.
- Game Scenes:
Flight
Note
Fixed landing legs are always deployed. Returns an error if you try to deploy fixed landing gear.
-
krpc_error_t krpc_SpaceCenter_Leg_IsGrounded(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Leg_t instance)#
Returns whether the leg is touching the ground.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Leg_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Leg_t instance)#
Launch Clamp#
-
type krpc_SpaceCenter_LaunchClamp_t#
A launch clamp. Obtained by calling
krpc_SpaceCenter_Part_LaunchClamp().-
krpc_error_t krpc_SpaceCenter_LaunchClamp_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_LaunchClamp_t instance)#
The part object for this launch clamp.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_LaunchClamp_Release(krpc_connection_t connection, krpc_SpaceCenter_LaunchClamp_t instance)#
Releases the docking clamp. Has no effect if the clamp has already been released.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_LaunchClamp_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_LaunchClamp_t instance)#
Light#
-
type krpc_SpaceCenter_Light_t#
A light. Obtained by calling
krpc_SpaceCenter_Part_Light().-
krpc_error_t krpc_SpaceCenter_Light_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Light_t instance)#
The part object for this light.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Light_Active(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Light_t instance)#
-
krpc_error_t krpc_SpaceCenter_Light_set_Active(krpc_connection_t connection, krpc_SpaceCenter_Light_t instance, bool value)#
Whether the light is switched on.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Light_Color(krpc_connection_t connection, krpc_StdLib_ColorRGB_t *returnValue, krpc_SpaceCenter_Light_t instance)#
-
krpc_error_t krpc_SpaceCenter_Light_set_Color(krpc_connection_t connection, krpc_SpaceCenter_Light_t instance, const krpc_StdLib_ColorRGB_t *value)#
The color of the light.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Light_Blink(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Light_t instance)#
-
krpc_error_t krpc_SpaceCenter_Light_set_Blink(krpc_connection_t connection, krpc_SpaceCenter_Light_t instance, bool value)#
Whether blinking is enabled.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Light_BlinkRate(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Light_t instance)#
-
krpc_error_t krpc_SpaceCenter_Light_set_BlinkRate(krpc_connection_t connection, krpc_SpaceCenter_Light_t instance, float value)#
The blink rate of the light.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Light_PowerUsage(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Light_t instance)#
The current power usage, in units of charge per second.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Light_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Light_t instance)#
Parachute#
-
type krpc_SpaceCenter_Parachute_t#
A parachute. Obtained by calling
krpc_SpaceCenter_Part_Parachute().-
krpc_error_t krpc_SpaceCenter_Parachute_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Parachute_t instance)#
The part object for this parachute.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Parachute_Deploy(krpc_connection_t connection, krpc_SpaceCenter_Parachute_t instance)#
Deploys the parachute. This has no effect if the parachute has already been deployed.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Parachute_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Parachute_t instance)#
Whether the parachute has been deployed.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Parachute_Arm(krpc_connection_t connection, krpc_SpaceCenter_Parachute_t instance)#
Deploys the parachute. This has no effect if the parachute has already been armed or deployed.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Parachute_Armed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Parachute_t instance)#
Whether the parachute has been armed or deployed.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Parachute_Cut(krpc_connection_t connection, krpc_SpaceCenter_Parachute_t instance)#
Cuts the parachute.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Parachute_State(krpc_connection_t connection, krpc_SpaceCenter_ParachuteState_t *returnValue, krpc_SpaceCenter_Parachute_t instance)#
The current state of the parachute.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Parachute_DeployAltitude(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Parachute_t instance)#
-
krpc_error_t krpc_SpaceCenter_Parachute_set_DeployAltitude(krpc_connection_t connection, krpc_SpaceCenter_Parachute_t instance, float value)#
The altitude at which the parachute will full deploy, in meters. Only applicable to stock parachutes.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Parachute_DeployMinPressure(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Parachute_t instance)#
-
krpc_error_t krpc_SpaceCenter_Parachute_set_DeployMinPressure(krpc_connection_t connection, krpc_SpaceCenter_Parachute_t instance, float value)#
The minimum pressure at which the parachute will semi-deploy, in atmospheres. Only applicable to stock parachutes.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Parachute_SafeState(krpc_connection_t connection, krpc_SpaceCenter_ParachuteSafeState_t *returnValue, krpc_SpaceCenter_Parachute_t instance)#
Whether it is currently safe to deploy the parachute, given the vessel’s flight conditions. Computed by KSP from the current airspeed, pressure and temperature. Only applicable to stock parachutes. Note that KSP reports
KRPC_SPACECENTER_PARACHUTESAFESTATE_UNSAFEfor the first second after the vessel unpacks, before its thermal data is valid.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Parachute_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Parachute_t instance)#
-
type krpc_SpaceCenter_ParachuteState_t#
The state of a parachute. See
krpc_SpaceCenter_Parachute_State().-
KRPC_SPACECENTER_PARACHUTESTATE_STOWED#
The parachute is safely tucked away inside its housing.
-
KRPC_SPACECENTER_PARACHUTESTATE_ARMED#
The parachute is armed for deployment.
-
KRPC_SPACECENTER_PARACHUTESTATE_SEMIDEPLOYED#
The parachute has been deployed and is providing some drag, but is not fully deployed yet. (Stock parachutes only)
-
KRPC_SPACECENTER_PARACHUTESTATE_DEPLOYED#
The parachute is fully deployed.
-
KRPC_SPACECENTER_PARACHUTESTATE_CUT#
The parachute has been cut.
-
KRPC_SPACECENTER_PARACHUTESTATE_STOWED#
-
type krpc_SpaceCenter_ParachuteSafeState_t#
The safety state of deploying a parachute. See
krpc_SpaceCenter_Parachute_SafeState().-
KRPC_SPACECENTER_PARACHUTESAFESTATE_SAFE#
The parachute is safe to deploy.
-
KRPC_SPACECENTER_PARACHUTESAFESTATE_RISKY#
Deploying the parachute is risky, and it may break off.
-
KRPC_SPACECENTER_PARACHUTESAFESTATE_UNSAFE#
The parachute is unsafe to deploy, and will break off.
-
KRPC_SPACECENTER_PARACHUTESAFESTATE_NONE#
The safety state is not available, because the vessel is not in an atmosphere or the parachute has already been deployed or cut.
-
KRPC_SPACECENTER_PARACHUTESAFESTATE_SAFE#
Radiator#
-
type krpc_SpaceCenter_Radiator_t#
A radiator. Obtained by calling
krpc_SpaceCenter_Part_Radiator().-
krpc_error_t krpc_SpaceCenter_Radiator_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Radiator_t instance)#
The part object for this radiator.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Radiator_Deployable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Radiator_t instance)#
Whether the radiator is deployable.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Radiator_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Radiator_t instance)#
-
krpc_error_t krpc_SpaceCenter_Radiator_set_Deployed(krpc_connection_t connection, krpc_SpaceCenter_Radiator_t instance, bool value)#
For a deployable radiator,
trueif the radiator is extended. If the radiator is not deployable, this is alwaystrue.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Radiator_State(krpc_connection_t connection, krpc_SpaceCenter_DeployableState_t *returnValue, krpc_SpaceCenter_Radiator_t instance)#
The current state of the radiator.
- Game Scenes:
Flight
Note
A fixed radiator is always
KRPC_SPACECENTER_DEPLOYABLESTATE_DEPLOYED.
-
krpc_error_t krpc_SpaceCenter_Radiator_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Radiator_t instance)#
Resource Converter#
-
type krpc_SpaceCenter_ResourceConverter_t#
A resource converter. Obtained by calling
krpc_SpaceCenter_Part_ResourceConverter().-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ResourceConverter_t instance)#
The part object for this converter.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Count(krpc_connection_t connection, int32_t *returnValue, krpc_SpaceCenter_ResourceConverter_t instance)#
The number of converters in the part.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Name(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_ResourceConverter_t instance, int32_t index)#
The name of the specified converter.
- Parameters:
index – Index of the converter.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Active(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ResourceConverter_t instance, int32_t index)#
True if the specified converter is active.
- Parameters:
index – Index of the converter.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Start(krpc_connection_t connection, krpc_SpaceCenter_ResourceConverter_t instance, int32_t index)#
Start the specified converter.
- Parameters:
index – Index of the converter.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Stop(krpc_connection_t connection, krpc_SpaceCenter_ResourceConverter_t instance, int32_t index)#
Stop the specified converter.
- Parameters:
index – Index of the converter.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_State(krpc_connection_t connection, krpc_SpaceCenter_ResourceConverterState_t *returnValue, krpc_SpaceCenter_ResourceConverter_t instance, int32_t index)#
The state of the specified converter.
- Parameters:
index – Index of the converter.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_StatusInfo(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_ResourceConverter_t instance, int32_t index)#
Status information for the specified converter. This is the full status message shown in the in-game UI.
- Parameters:
index – Index of the converter.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Inputs(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_SpaceCenter_ResourceConverter_t instance, int32_t index)#
List of the names of resources consumed by the specified converter.
- Parameters:
index – Index of the converter.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Outputs(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_SpaceCenter_ResourceConverter_t instance, int32_t index)#
List of the names of resources produced by the specified converter.
- Parameters:
index – Index of the converter.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_OptimumCoreTemperature(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceConverter_t instance)#
The core temperature at which the converter will operate with peak efficiency, in Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_CoreTemperature(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceConverter_t instance)#
The core temperature of the converter, in Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_ThermalEfficiency(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceConverter_t instance)#
The thermal efficiency of the converter, as a percentage of its maximum.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceConverter_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ResourceConverter_t instance)#
-
type krpc_SpaceCenter_ResourceConverterState_t#
The state of a resource converter. See
krpc_SpaceCenter_ResourceConverter_State().-
KRPC_SPACECENTER_RESOURCECONVERTERSTATE_RUNNING#
Converter is running.
-
KRPC_SPACECENTER_RESOURCECONVERTERSTATE_IDLE#
Converter is idle.
-
KRPC_SPACECENTER_RESOURCECONVERTERSTATE_MISSINGRESOURCE#
Converter is missing a required resource.
-
KRPC_SPACECENTER_RESOURCECONVERTERSTATE_STORAGEFULL#
No available storage for output resource.
-
KRPC_SPACECENTER_RESOURCECONVERTERSTATE_CAPACITY#
At preset resource capacity.
-
KRPC_SPACECENTER_RESOURCECONVERTERSTATE_UNKNOWN#
Unknown state. Possible with modified resource converters. In this case, check
krpc_SpaceCenter_ResourceConverter_StatusInfo()for more information.
-
KRPC_SPACECENTER_RESOURCECONVERTERSTATE_RUNNING#
Resource Harvester#
-
type krpc_SpaceCenter_ResourceHarvester_t#
A resource harvester (drill). Obtained by calling
krpc_SpaceCenter_Part_ResourceHarvester().-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
The part object for this harvester.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_State(krpc_connection_t connection, krpc_SpaceCenter_DeployableState_t *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
The deployment state of the harvester. Whether it is drilling is reported separately by
krpc_SpaceCenter_ResourceHarvester_Active().- Game Scenes:
Flight
Note
A harvester is never
KRPC_SPACECENTER_DEPLOYABLESTATE_BROKEN, as the game does not track damage for them.
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_set_Deployed(krpc_connection_t connection, krpc_SpaceCenter_ResourceHarvester_t instance, bool value)#
Whether the harvester is deployed.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_Active(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_set_Active(krpc_connection_t connection, krpc_SpaceCenter_ResourceHarvester_t instance, bool value)#
Whether the harvester is actively drilling.
- Game Scenes:
Flight
Note
A value set while the harvester is deploying is applied when the deploy completes, so it can be set immediately after setting
krpc_SpaceCenter_ResourceHarvester_Deployed()without waiting for the deploy animation. Setting it has no effect while the harvester is retracted or retracting.
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_ExtractionRate(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
The rate at which the drill is extracting ore, in units per second.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_ThermalEfficiency(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
The thermal efficiency of the drill, as a percentage of its maximum.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_CoreTemperature(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
The core temperature of the drill, in Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_OptimumCoreTemperature(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
The core temperature at which the drill will operate with peak efficiency, in Kelvin.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceHarvester_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ResourceHarvester_t instance)#
Reaction Wheel#
-
type krpc_SpaceCenter_ReactionWheel_t#
A reaction wheel. Obtained by calling
krpc_SpaceCenter_Part_ReactionWheel().-
krpc_error_t krpc_SpaceCenter_ReactionWheel_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ReactionWheel_t instance)#
The part object for this reaction wheel.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ReactionWheel_Active(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ReactionWheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_ReactionWheel_set_Active(krpc_connection_t connection, krpc_SpaceCenter_ReactionWheel_t instance, bool value)#
Whether the reaction wheel is active.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ReactionWheel_Broken(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ReactionWheel_t instance)#
Whether the reaction wheel is broken.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ReactionWheel_AvailableTorque(krpc_connection_t connection, krpc_SpaceCenter_AxisRange_t *returnValue, krpc_SpaceCenter_ReactionWheel_t instance)#
The available torque, in Newton meters, that can be produced by this reaction wheel, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
krpc_SpaceCenter_Vessel_ReferenceFrame(). Returns zero if the reaction wheel is inactive or broken.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ReactionWheel_MaxTorque(krpc_connection_t connection, krpc_SpaceCenter_AxisRange_t *returnValue, krpc_SpaceCenter_ReactionWheel_t instance)#
The maximum torque, in Newton meters, that can be produced by this reaction wheel, when it is active, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
krpc_SpaceCenter_Vessel_ReferenceFrame().- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ReactionWheel_AuthorityLimiter(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ReactionWheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_ReactionWheel_set_AuthorityLimiter(krpc_connection_t connection, krpc_SpaceCenter_ReactionWheel_t instance, float value)#
The authority limiter for the reaction wheel, as a percentage of maximum torque. A value between 0 and 1.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ReactionWheel_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ReactionWheel_t instance)#
Resource Drain#
-
type krpc_SpaceCenter_ResourceDrain_t#
A resource drain. Obtained by calling
krpc_SpaceCenter_Part_ResourceDrain().-
krpc_error_t krpc_SpaceCenter_ResourceDrain_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ResourceDrain_t instance)#
The part object for this resource drain.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_AvailableResources(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_ResourceDrain_t instance)#
List of available resources.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_SetResource(krpc_connection_t connection, krpc_SpaceCenter_ResourceDrain_t instance, krpc_SpaceCenter_Resource_t resource, bool enabled)#
Whether the given resource should be drained.
- Parameters:
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_CheckResource(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_ResourceDrain_t instance, krpc_SpaceCenter_Resource_t resource)#
Whether the provided resource is enabled for draining.
- Parameters:
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_DrainMode(krpc_connection_t connection, krpc_SpaceCenter_DrainMode_t *returnValue, krpc_SpaceCenter_ResourceDrain_t instance)#
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_set_DrainMode(krpc_connection_t connection, krpc_SpaceCenter_ResourceDrain_t instance, krpc_SpaceCenter_DrainMode_t value)#
The drain mode.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_MinRate(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceDrain_t instance)#
Minimum possible drain rate
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_MaxRate(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceDrain_t instance)#
Maximum possible drain rate.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_Rate(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_ResourceDrain_t instance)#
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_set_Rate(krpc_connection_t connection, krpc_SpaceCenter_ResourceDrain_t instance, float value)#
Current drain rate.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_Start(krpc_connection_t connection, krpc_SpaceCenter_ResourceDrain_t instance)#
Activates resource draining for all enabled parts.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_Stop(krpc_connection_t connection, krpc_SpaceCenter_ResourceDrain_t instance)#
Turns off resource draining.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_ResourceDrain_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_ResourceDrain_t instance)#
Robotic Controller#
-
type krpc_SpaceCenter_RoboticController_t#
A robotic controller. Obtained by calling
krpc_SpaceCenter_Part_RoboticController().-
krpc_error_t krpc_SpaceCenter_RoboticController_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticController_t instance)#
The part object for this controller.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RoboticController_Enabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticController_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticController_set_Enabled(krpc_connection_t connection, krpc_SpaceCenter_RoboticController_t instance, bool value)#
Whether the controller is enabled.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_Playing(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticController_t instance)#
Whether the controller’s sequence is currently playing.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_Position(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticController_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticController_set_Position(krpc_connection_t connection, krpc_SpaceCenter_RoboticController_t instance, float value)#
The current position along the sequence, in seconds.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_Length(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticController_t instance)#
The length of the sequence, in seconds.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_PlaySpeed(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticController_t instance)#
The speed at which the sequence is played back, as a multiple of normal speed.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_Play(krpc_connection_t connection, krpc_SpaceCenter_RoboticController_t instance)#
Start playing the controller’s sequence.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_Stop(krpc_connection_t connection, krpc_SpaceCenter_RoboticController_t instance)#
Stop playing the controller’s sequence.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_HasPart(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticController_t instance, krpc_SpaceCenter_Part_t part)#
Whether the controller has a part.
- Parameters:
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_Axes(krpc_connection_t connection, krpc_list_SpaceCenter_RoboticAxis_t *returnValue, krpc_SpaceCenter_RoboticController_t instance)#
The axes for the controller.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_AddAxis(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticController_t instance, krpc_SpaceCenter_Module_t module, const char *fieldName)#
Add an axis to the controller.
- Parameters:
module – The part module that the axis belongs to.
fieldName – The name of the axis field, as returned by
krpc_SpaceCenter_RoboticController_Axes().
- Returns:
Returns
trueif the axis is added successfully.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_AddKeyFrame(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticController_t instance, krpc_SpaceCenter_Module_t module, const char *fieldName, float time, float value)#
Add key frame value for controller axis.
- Parameters:
module – The part module that the axis belongs to.
fieldName – The name of the axis field, as returned by
krpc_SpaceCenter_RoboticController_Axes().time – The time of the key frame.
value – The value of the key frame.
- Returns:
Returns
trueif the key frame is added successfully.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_ClearAxis(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticController_t instance, krpc_SpaceCenter_Module_t module, const char *fieldName)#
Clear axis.
- Parameters:
module – The part module that the axis belongs to.
fieldName – The name of the axis field, as returned by
krpc_SpaceCenter_RoboticController_Axes().
- Returns:
Returns
trueif the axis is cleared successfully.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticController_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticController_t instance)#
-
type krpc_SpaceCenter_RoboticAxis_t#
An axis of a robotic controller.
Note
See
krpc_SpaceCenter_RoboticController_Axes().-
krpc_SpaceCenter_Module_t module#
The part module the axis belongs to.
-
char *field_name#
The name of the field the axis controls.
-
krpc_SpaceCenter_Module_t module#
Robotic Hinge#
-
type krpc_SpaceCenter_RoboticHinge_t#
A robotic hinge. Obtained by calling
krpc_SpaceCenter_Part_RoboticHinge().-
krpc_error_t krpc_SpaceCenter_RoboticHinge_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
The part object for this robotic hinge.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_TargetAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_set_TargetAngle(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t instance, float value)#
Target angle.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_CurrentAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
Current angle.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_MinAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_set_MinAngle(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t instance, float value)#
The minimum angle the hinge can move to, in degrees.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_MaxAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_set_MaxAngle(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t instance, float value)#
The maximum angle the hinge can move to, in degrees.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_Rate(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_set_Rate(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t instance, float value)#
Target movement rate in degrees per second.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_Damping(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_set_Damping(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t instance, float value)#
Damping percentage.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_Locked(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_set_Locked(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t instance, bool value)#
Lock movement.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_MotorEngaged(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_set_MotorEngaged(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t instance, bool value)#
Whether the motor is engaged.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_IsMoving(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
Whether the servo is currently moving.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_MoveHome(krpc_connection_t connection, krpc_SpaceCenter_RoboticHinge_t instance)#
Move hinge to its built position.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticHinge_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticHinge_t instance)#
Robotic Piston#
-
type krpc_SpaceCenter_RoboticPiston_t#
A robotic piston part. Obtained by calling
krpc_SpaceCenter_Part_RoboticPiston().-
krpc_error_t krpc_SpaceCenter_RoboticPiston_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
The part object for this robotic piston.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_TargetExtension(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_set_TargetExtension(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t instance, float value)#
Target extension of the piston.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_CurrentExtension(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
Current extension of the piston.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_MinExtension(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_set_MinExtension(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t instance, float value)#
The minimum extension of the piston, in meters.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_MaxExtension(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_set_MaxExtension(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t instance, float value)#
The maximum extension of the piston, in meters.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_Rate(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_set_Rate(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t instance, float value)#
Target movement rate in meters per second.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_Damping(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_set_Damping(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t instance, float value)#
Damping percentage.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_Locked(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_set_Locked(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t instance, bool value)#
Lock movement.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_MotorEngaged(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_set_MotorEngaged(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t instance, bool value)#
Whether the motor is engaged.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_IsMoving(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
Whether the servo is currently moving.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_MoveHome(krpc_connection_t connection, krpc_SpaceCenter_RoboticPiston_t instance)#
Move piston to its built position.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticPiston_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticPiston_t instance)#
Robotic Rotation#
-
type krpc_SpaceCenter_RoboticRotation_t#
A robotic rotation servo. Obtained by calling
krpc_SpaceCenter_Part_RoboticRotation().-
krpc_error_t krpc_SpaceCenter_RoboticRotation_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
The part object for this robotic rotation servo.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_TargetAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_set_TargetAngle(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance, float value)#
Target angle.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_CurrentAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
Current angle.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_MinAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_set_MinAngle(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance, float value)#
The minimum angle the servo can rotate to, in degrees.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_MaxAngle(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_set_MaxAngle(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance, float value)#
The maximum angle the servo can rotate to, in degrees.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_AllowFullRotation(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_set_AllowFullRotation(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance, bool value)#
Whether the servo is allowed to rotate freely through a full revolution, ignoring the angle limits.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_Rate(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_set_Rate(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance, float value)#
Target movement rate in degrees per second.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_Damping(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_set_Damping(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance, float value)#
Damping percentage.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_Locked(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_set_Locked(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance, bool value)#
Lock Movement
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_MotorEngaged(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_set_MotorEngaged(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance, bool value)#
Whether the motor is engaged.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_IsMoving(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
Whether the servo is currently moving.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_MoveHome(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotation_t instance)#
Move rotation servo to its built position.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotation_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticRotation_t instance)#
Robotic Rotor#
-
type krpc_SpaceCenter_RoboticRotor_t#
A robotic rotor. Obtained by calling
krpc_SpaceCenter_Part_RoboticRotor().-
krpc_error_t krpc_SpaceCenter_RoboticRotor_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
The part object for this robotic rotor.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_TargetRPM(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_set_TargetRPM(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotor_t instance, float value)#
Target RPM.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_CurrentRPM(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
Current RPM.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_Inverted(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_set_Inverted(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotor_t instance, bool value)#
Whether the rotor direction is inverted.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_TorqueLimit(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_set_TorqueLimit(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotor_t instance, float value)#
Torque limit percentage.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_MaxTorque(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_set_MaxTorque(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotor_t instance, float value)#
The maximum torque the rotor can generate, in kilonewtons.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_BrakePercentage(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_set_BrakePercentage(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotor_t instance, float value)#
The percentage of braking force applied to the rotor.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_Locked(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_set_Locked(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotor_t instance, bool value)#
Lock movement.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_MotorEngaged(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_set_MotorEngaged(krpc_connection_t connection, krpc_SpaceCenter_RoboticRotor_t instance, bool value)#
Whether the motor is engaged.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_IsMoving(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
Whether the rotor is currently moving.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RoboticRotor_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RoboticRotor_t instance)#
RCS#
-
type krpc_SpaceCenter_RCS_t#
An RCS block or thruster. Obtained by calling
krpc_SpaceCenter_Part_RCS().-
krpc_error_t krpc_SpaceCenter_RCS_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
The part object for this RCS.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_Active(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
Whether the RCS thrusters are active. An RCS thruster is inactive if the RCS action group is disabled (
krpc_SpaceCenter_Control_RCS()), the RCS thruster itself is not enabled (krpc_SpaceCenter_RCS_Enabled()), or it is covered by a fairing (krpc_SpaceCenter_Part_Shielded()) and cannot thrust while shielded.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_Enabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_Enabled(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, bool value)#
Whether the RCS thrusters are enabled.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_PitchEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_PitchEnabled(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, bool value)#
Whether the RCS thruster will fire when pitch control input is given.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_YawEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_YawEnabled(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, bool value)#
Whether the RCS thruster will fire when yaw control input is given.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_RollEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_RollEnabled(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, bool value)#
Whether the RCS thruster will fire when roll control input is given.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_ForwardEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_ForwardEnabled(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, bool value)#
Whether the RCS thruster will fire when pitch control input is given.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_UpEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_UpEnabled(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, bool value)#
Whether the RCS thruster will fire when yaw control input is given.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_RightEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_RightEnabled(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, bool value)#
Whether the RCS thruster will fire when roll control input is given.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_InputOverride(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_InputOverride(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, bool value)#
Whether the RCS control is being set directly, bypassing the vessel’s normal flight controls. When enabled, the rotation and translation demand is set by
krpc_SpaceCenter_RCS_RotationOverride()andkrpc_SpaceCenter_RCS_TranslationOverride()instead of the normal control inputs. The override is automatically released if the controlling client disconnects or the vessel changes. Precision mode leaves an overridden block at full thrust.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_RotationOverride(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_RotationOverride(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, const krpc_tuple_double_double_double_t *value)#
The rotation demand applied when
krpc_SpaceCenter_RCS_InputOverride()is enabled, in the pitch, roll and yaw axes. Each component is a normalized control input between -1 and 1.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_TranslationOverride(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_TranslationOverride(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, const krpc_tuple_double_double_double_t *value)#
The translation demand applied when
krpc_SpaceCenter_RCS_InputOverride()is enabled, in the right, up and forward axes. Each component is a normalized control input between -1 and 1.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_AvailableTorque(krpc_connection_t connection, krpc_SpaceCenter_AxisRange_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
The available torque, in Newton meters, that can be produced by this RCS, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
krpc_SpaceCenter_Vessel_ReferenceFrame(). Returns zero if RCS is disable.- Game Scenes:
Flight
Note
Precision mode weakens the block, and the available torque follows it. A block driven by
krpc_SpaceCenter_RCS_InputOverride()is exempt, sokrpc_SpaceCenter_RCS_OverrideWrench()can report the larger torque an override reaches.
-
krpc_error_t krpc_SpaceCenter_RCS_AvailableForce(krpc_connection_t connection, krpc_SpaceCenter_AxisRange_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
The available force, in Newtons, that can be produced by this RCS, in the positive and negative x, y and z axes of the vessel. These axes correspond to the coordinate axes of the
krpc_SpaceCenter_Vessel_ReferenceFrame(). Returns zero if RCS is disabled.- Game Scenes:
Flight
Note
Precision mode weakens the block, and the available force follows it. A block driven by
krpc_SpaceCenter_RCS_InputOverride()is exempt, sokrpc_SpaceCenter_RCS_OverrideWrench()can report the larger force an override reaches.
-
krpc_error_t krpc_SpaceCenter_RCS_Force(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
The force being applied by the RCS thrusters, in Newtons. The vector is in the vessel’s reference frame (
krpc_SpaceCenter_Vessel_ReferenceFrame()). Returns zero if the RCS is inactive.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_Torque(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
The torque being applied by the RCS thrusters about the vessel’s center of mass, in Newton meters. The vector is in the vessel’s reference frame (
krpc_SpaceCenter_Vessel_ReferenceFrame()). Returns zero if the RCS is inactive.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_OverrideWrench(krpc_connection_t connection, krpc_SpaceCenter_Wrench_t *returnValue, krpc_SpaceCenter_RCS_t instance, const krpc_tuple_double_double_double_t *rotation, const krpc_tuple_double_double_double_t *translation)#
The force and torque the given demands would produce, in Newtons and Newton meters.
- Parameters:
rotation – A rotation demand, as set by
krpc_SpaceCenter_RCS_RotationOverride().translation – A translation demand, as set by
krpc_SpaceCenter_RCS_TranslationOverride().
- Returns:
The force, and the torque about the vessel’s center of mass, in the vessel’s reference frame (
krpc_SpaceCenter_Vessel_ReferenceFrame()), or zero if the RCS is inactive.- Game Scenes:
Flight
Note
The demands do not have to be applied. The prediction leaves out full thrust, which
krpc_SpaceCenter_RCS_Force()andkrpc_SpaceCenter_RCS_Torque()include.
-
krpc_error_t krpc_SpaceCenter_RCS_AvailableThrust(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RCS_t instance)#
The amount of thrust, in Newtons, that would be produced by the thruster when activated. Returns zero if the thruster does not have any fuel. Takes the thrusters current
krpc_SpaceCenter_RCS_ThrustLimit()and atmospheric conditions into account.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_MaxThrust(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RCS_t instance)#
The maximum amount of thrust that can be produced by the RCS thrusters when active, in Newtons, with the
krpc_SpaceCenter_RCS_ThrustLimit()set to 100%. Takes atmospheric conditions into account.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_MaxVacuumThrust(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RCS_t instance)#
The maximum amount of thrust that can be produced by the RCS thrusters when active in a vacuum, in Newtons.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_ThrustLimit(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RCS_t instance)#
-
krpc_error_t krpc_SpaceCenter_RCS_set_ThrustLimit(krpc_connection_t connection, krpc_SpaceCenter_RCS_t instance, float value)#
The thrust limiter of the thruster. A value between 0 and 1.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_Thrusters(krpc_connection_t connection, krpc_list_object_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
A list of thrusters, one of each nozzel in the RCS part.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_SpecificImpulse(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RCS_t instance)#
The current specific impulse of the RCS, in seconds. Returns zero if the RCS is not active.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_VacuumSpecificImpulse(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RCS_t instance)#
The vacuum specific impulse of the RCS, in seconds.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_KerbinSeaLevelSpecificImpulse(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_RCS_t instance)#
The specific impulse of the RCS at sea level on Kerbin, in seconds.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_Propellants(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
The names of resources that the RCS consumes.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_RCS_PropellantRatios(krpc_connection_t connection, krpc_dictionary_string_float_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
The ratios of resources that the RCS consumes. A dictionary mapping resource names to the ratios at which they are consumed by the RCS.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_HasFuel(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_RCS_t instance)#
Whether the RCS has fuel available.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_RCS_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_RCS_t instance)#
Sensor#
-
type krpc_SpaceCenter_Sensor_t#
A sensor, such as a thermometer. Obtained by calling
krpc_SpaceCenter_Part_Sensor().-
krpc_error_t krpc_SpaceCenter_Sensor_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Sensor_t instance)#
The part object for this sensor.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_Sensor_Active(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Sensor_t instance)#
-
krpc_error_t krpc_SpaceCenter_Sensor_set_Active(krpc_connection_t connection, krpc_SpaceCenter_Sensor_t instance, bool value)#
Whether the sensor is active.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Sensor_Value(krpc_connection_t connection, char **returnValue, krpc_SpaceCenter_Sensor_t instance)#
The current value of the sensor.
- Game Scenes:
Flight
Note
This is the same readout string shown in the part’s right-click menu in-game, and is intended for display rather than for parsing. Both its units and the way it formats numbers follow the language the game is running in, so it is not stable across locales. For programmatic access to the underlying quantities, use
krpc_SpaceCenter_Part_Temperature()(temperature sensors),krpc_SpaceCenter_Flight_GForce()(accelerometers) orkrpc_SpaceCenter_Flight_StaticPressure()(barometers).
-
krpc_error_t krpc_SpaceCenter_Sensor_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Sensor_t instance)#
Solar Panel#
-
type krpc_SpaceCenter_SolarPanel_t#
A solar panel. Obtained by calling
krpc_SpaceCenter_Part_SolarPanel().-
krpc_error_t krpc_SpaceCenter_SolarPanel_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_SolarPanel_t instance)#
The part object for this solar panel.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_SolarPanel_Deployable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_SolarPanel_t instance)#
Whether the solar panel is deployable.
- Game Scenes:
Flight, Editor Vab, Editor Sph
-
krpc_error_t krpc_SpaceCenter_SolarPanel_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_SolarPanel_t instance)#
-
krpc_error_t krpc_SpaceCenter_SolarPanel_set_Deployed(krpc_connection_t connection, krpc_SpaceCenter_SolarPanel_t instance, bool value)#
Whether the solar panel is extended.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_SolarPanel_State(krpc_connection_t connection, krpc_SpaceCenter_DeployableState_t *returnValue, krpc_SpaceCenter_SolarPanel_t instance)#
The current state of the solar panel.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_SolarPanel_EnergyFlow(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_SolarPanel_t instance)#
The current amount of energy being generated by the solar panel, in units of charge per second.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_SolarPanel_SunExposure(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_SolarPanel_t instance)#
The current amount of sunlight that is incident on the solar panel, as a percentage. A value between 0 and 1.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_SolarPanel_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_SolarPanel_t instance)#
Thruster#
-
type krpc_SpaceCenter_Thruster_t#
The component of an
krpc_SpaceCenter_Engine_torkrpc_SpaceCenter_RCS_tpart that generates thrust. Can obtained by callingkrpc_SpaceCenter_Engine_Thrusters()orkrpc_SpaceCenter_RCS_Thrusters().Note
Engines can consist of multiple thrusters. For example, the S3 KS-25x4 “Mammoth” has four rocket nozzels, and so consists of four thrusters.
-
krpc_error_t krpc_SpaceCenter_Thruster_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Thruster_t instance)#
The
krpc_SpaceCenter_Thruster_Part()that contains this thruster.- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_Thrust(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Thruster_t instance)#
The thrust being produced by the thruster, in Newtons.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_ThrustPosition(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Thruster_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The position at which the thruster generates thrust, in the given reference frame. For gimballed engines, this takes into account the current rotation of the gimbal.
- Parameters:
referenceFrame – The reference frame that the returned position vector is in.
- Returns:
The position as a vector.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_ThrustDirection(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Thruster_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The direction of the force generated by the thruster, in the given reference frame. This is opposite to the direction in which the thruster expels propellant. For gimballed engines, this takes into account the current rotation of the gimbal.
- Parameters:
referenceFrame – The reference frame that the returned direction is in.
- Returns:
The direction as a unit vector.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_ThrustReferenceFrame(krpc_connection_t connection, krpc_SpaceCenter_ReferenceFrame_t *returnValue, krpc_SpaceCenter_Thruster_t instance)#
A reference frame that is fixed relative to the thruster and orientated with its thrust direction (
krpc_SpaceCenter_Thruster_ThrustDirection()). For gimballed engines, this takes into account the current rotation of the gimbal.The origin is at the position of thrust for this thruster (
krpc_SpaceCenter_Thruster_ThrustPosition()).The axes rotate with the thrust direction. This is the direction in which the thruster expels propellant, including any gimballing.
The y-axis points along the thrust direction.
The x-axis and z-axis are perpendicular to the thrust direction.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_Gimballed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Thruster_t instance)#
Whether the thruster is gimballed.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_GimbalPosition(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Thruster_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
Position around which the gimbal pivots.
- Parameters:
referenceFrame – The reference frame that the returned position vector is in.
- Returns:
The position as a vector.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_GimbalAngle(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Thruster_t instance)#
The current gimbal angle in the pitch, roll and yaw axes, in degrees.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_InitialThrustPosition(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Thruster_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The position at which the thruster generates thrust, when the engine is in its initial position (no gimballing), 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
Note
This position can move when the gimbal rotates. This is because the thrust position and gimbal position are not necessarily the same.
-
krpc_error_t krpc_SpaceCenter_Thruster_InitialThrustDirection(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_SpaceCenter_Thruster_t instance, krpc_SpaceCenter_ReferenceFrame_t referenceFrame)#
The direction of the force generated by the thruster, when the engine is in its initial position (no gimballing), in the given reference frame. This is opposite to the direction in which the thruster expels propellant.
- Parameters:
referenceFrame – The reference frame that the returned direction is in.
- Returns:
The direction as a unit vector.
- Game Scenes:
Flight
-
krpc_error_t krpc_SpaceCenter_Thruster_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Thruster_t instance)#
Wheel#
-
type krpc_SpaceCenter_Wheel_t#
A wheel. Includes landing gear and rover wheels. Obtained by calling
krpc_SpaceCenter_Part_Wheel(). Can be used to control the motors, steering and deployment of wheels, among other things.-
krpc_error_t krpc_SpaceCenter_Wheel_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Wheel_t instance)#
The part object for this wheel.
-
krpc_error_t krpc_SpaceCenter_Wheel_State(krpc_connection_t connection, krpc_SpaceCenter_DeployableState_t *returnValue, krpc_SpaceCenter_Wheel_t instance)#
The current state of the wheel.
-
krpc_error_t krpc_SpaceCenter_Wheel_Radius(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Radius of the wheel, in meters.
-
krpc_error_t krpc_SpaceCenter_Wheel_Grounded(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the wheel is touching the ground.
-
krpc_error_t krpc_SpaceCenter_Wheel_HasBrakes(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the wheel has brakes.
-
krpc_error_t krpc_SpaceCenter_Wheel_Brakes(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_Brakes(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, float value)#
The braking force, as a percentage of maximum, when the brakes are applied.
-
krpc_error_t krpc_SpaceCenter_Wheel_AutoFrictionControl(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_AutoFrictionControl(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, bool value)#
Whether automatic friction control is enabled.
-
krpc_error_t krpc_SpaceCenter_Wheel_ManualFrictionControl(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_ManualFrictionControl(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, float value)#
Manual friction control value. Only has an effect if automatic friction control is disabled. A value between 0 and 5 inclusive.
-
krpc_error_t krpc_SpaceCenter_Wheel_Deployable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the wheel is deployable.
-
krpc_error_t krpc_SpaceCenter_Wheel_Deployed(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_Deployed(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, bool value)#
Whether the wheel is deployed.
-
krpc_error_t krpc_SpaceCenter_Wheel_Powered(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the wheel is powered by a motor.
-
krpc_error_t krpc_SpaceCenter_Wheel_MotorEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_MotorEnabled(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, bool value)#
Whether the motor is enabled.
-
krpc_error_t krpc_SpaceCenter_Wheel_MotorInverted(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_MotorInverted(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, bool value)#
Whether the direction of the motor is inverted.
-
krpc_error_t krpc_SpaceCenter_Wheel_MotorState(krpc_connection_t connection, krpc_SpaceCenter_MotorState_t *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the direction of the motor is inverted.
-
krpc_error_t krpc_SpaceCenter_Wheel_MotorOutput(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
The output of the motor. This is the torque currently being generated, in Newton meters.
-
krpc_error_t krpc_SpaceCenter_Wheel_TractionControlEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_TractionControlEnabled(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, bool value)#
Whether automatic traction control is enabled. A wheel only has traction control if it is powered.
-
krpc_error_t krpc_SpaceCenter_Wheel_TractionControl(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_TractionControl(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, float value)#
Setting for the traction control. Only takes effect if the wheel has automatic traction control enabled. A value between 0 and 5 inclusive.
-
krpc_error_t krpc_SpaceCenter_Wheel_DriveLimiter(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_DriveLimiter(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, float value)#
Manual setting for the motor limiter. Only takes effect if the wheel has automatic traction control disabled. A value between 0 and 100 inclusive.
-
krpc_error_t krpc_SpaceCenter_Wheel_Steerable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the wheel has steering.
-
krpc_error_t krpc_SpaceCenter_Wheel_SteeringEnabled(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_SteeringEnabled(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, bool value)#
Whether the wheel steering is enabled.
-
krpc_error_t krpc_SpaceCenter_Wheel_SteeringInverted(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_SteeringInverted(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, bool value)#
Whether the wheel steering is inverted.
-
krpc_error_t krpc_SpaceCenter_Wheel_SteeringAngleAuto(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_SteeringAngleAuto(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, bool value)#
Whether the steering angle is automatically limited based on the vessel’s speed, reducing the maximum angle as the vessel moves faster. See also
krpc_SpaceCenter_Wheel_SteeringAngleLimit().
-
krpc_error_t krpc_SpaceCenter_Wheel_SteeringAngleLimit(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_SteeringAngleLimit(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, float value)#
The steering angle limit.
-
krpc_error_t krpc_SpaceCenter_Wheel_SteeringResponseTime(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
krpc_error_t krpc_SpaceCenter_Wheel_set_SteeringResponseTime(krpc_connection_t connection, krpc_SpaceCenter_Wheel_t instance, float value)#
Steering response time.
-
krpc_error_t krpc_SpaceCenter_Wheel_HasSuspension(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the wheel has suspension.
-
krpc_error_t krpc_SpaceCenter_Wheel_SuspensionSpringStrength(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Suspension spring strength, as set in the editor.
-
krpc_error_t krpc_SpaceCenter_Wheel_SuspensionDamperStrength(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Suspension damper strength, as set in the editor.
-
krpc_error_t krpc_SpaceCenter_Wheel_Broken(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the wheel is broken.
-
krpc_error_t krpc_SpaceCenter_Wheel_Repairable(krpc_connection_t connection, bool *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Whether the wheel is repairable.
-
krpc_error_t krpc_SpaceCenter_Wheel_Stress(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Current stress on the wheel.
-
krpc_error_t krpc_SpaceCenter_Wheel_StressTolerance(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Stress tolerance of the wheel.
-
krpc_error_t krpc_SpaceCenter_Wheel_StressPercentage(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Current stress on the wheel as a percentage of its stress tolerance.
-
krpc_error_t krpc_SpaceCenter_Wheel_Deflection(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Current deflection of the wheel.
-
krpc_error_t krpc_SpaceCenter_Wheel_Slip(krpc_connection_t connection, float *returnValue, krpc_SpaceCenter_Wheel_t instance)#
Current slip of the wheel.
-
krpc_error_t krpc_SpaceCenter_Wheel_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_SpaceCenter_Wheel_t instance)#
-
type krpc_SpaceCenter_MotorState_t#
The state of the motor on a powered wheel. See
krpc_SpaceCenter_Wheel_MotorState().-
KRPC_SPACECENTER_MOTORSTATE_IDLE#
The motor is idle.
-
KRPC_SPACECENTER_MOTORSTATE_RUNNING#
The motor is running.
-
KRPC_SPACECENTER_MOTORSTATE_DISABLED#
The motor is disabled.
-
KRPC_SPACECENTER_MOTORSTATE_INOPERABLE#
The motor is inoperable.
-
KRPC_SPACECENTER_MOTORSTATE_NOTENOUGHRESOURCES#
The motor does not have enough resources to run.
-
KRPC_SPACECENTER_MOTORSTATE_IDLE#
Trees of Parts#
Vessels in KSP are comprised of a number of parts, connected to one another in a
tree structure. An example vessel is shown in Figure 1, and the corresponding
tree of parts in Figure 2. The craft file for this example can also be
downloaded here.
Figure 1 – Example parts making up a vessel.#
Figure 2 – Tree of parts for the vessel in Figure 1. Arrows point from the parent part to the child part.#
Traversing the Tree#
The tree of parts can be traversed using the attributes krpc_SpaceCenter_Parts_Root(),
krpc_SpaceCenter_Part_Parent() and krpc_SpaceCenter_Part_Children().
The root of the tree is the same as the vessels root part (part number 1 in
the example above) and can be obtained by calling krpc_SpaceCenter_Parts_Root().
A parts children can be obtained by calling krpc_SpaceCenter_Part_Children().
If the part does not have any children, krpc_SpaceCenter_Part_Children()
returns an empty list. A parts parent can be obtained by calling
krpc_SpaceCenter_Part_Parent(). If the part does not have a parent
(as is the case for the root part), krpc_SpaceCenter_Part_Parent()
returns nullptr.
The following Cnano example uses these attributes to perform a depth-first traversal over all of the parts in a vessel:
#include <krpc_cnano.h>
#include <krpc_cnano/services/space_center.h>
int main() {
krpc_connection_t conn;
krpc_open(&conn, "COM0");
krpc_connect(conn, "");
krpc_SpaceCenter_Vessel_t vessel;
krpc_SpaceCenter_ActiveVessel(conn, &vessel);
krpc_SpaceCenter_Parts_t parts;
krpc_SpaceCenter_Vessel_Parts(conn, &parts, vessel);
krpc_SpaceCenter_Part_t root;
krpc_SpaceCenter_Parts_Root(conn, &root, parts);
typedef struct {
krpc_SpaceCenter_Part_t part;
int depth;
} StackEntry;
StackEntry stack[256];
int stackPtr = 0;
stack[stackPtr].part = root;
stack[stackPtr].depth = 0;
while (stackPtr >= 0) {
krpc_SpaceCenter_Part_t part = stack[stackPtr].part;
int depth = stack[stackPtr].depth;
stackPtr--; // Pop the stack
char * title = NULL;
krpc_SpaceCenter_Part_Title(conn, &title, part);
for (int i = 0; i < depth; i++)
printf(" ");
printf("%s\n", title);
krpc_list_object_t children = KRPC_NULL_LIST;
krpc_SpaceCenter_Part_Children(conn, &children, part);
for (size_t i = 0; i < children.size; i++) {
// Push onto the stack
stackPtr++;
stack[stackPtr].part = children.items[i];
stack[stackPtr].depth = depth+1;
}
}
}
When this code is execute using the craft file for the example vessel pictured above, the following is printed out:
Command Pod Mk1
TR-18A Stack Decoupler
FL-T400 Fuel Tank
LV-909 Liquid Fuel Engine
TR-18A Stack Decoupler
FL-T800 Fuel Tank
LV-909 Liquid Fuel Engine
TT-70 Radial Decoupler
FL-T400 Fuel Tank
TT18-A Launch Stability Enhancer
FTX-2 External Fuel Duct
LV-909 Liquid Fuel Engine
Aerodynamic Nose Cone
TT-70 Radial Decoupler
FL-T400 Fuel Tank
TT18-A Launch Stability Enhancer
FTX-2 External Fuel Duct
LV-909 Liquid Fuel Engine
Aerodynamic Nose Cone
LT-1 Landing Struts
LT-1 Landing Struts
Mk16 Parachute
Attachment Modes#
Parts can be attached to other parts either radially (on the side of the parent part) or axially (on the end of the parent part, to form a stack).
For example, in the vessel pictured above, the parachute (part 2) is axially connected to its parent (the command pod – part 1), and the landing leg (part 5) is radially connected to its parent (the fuel tank – part 4).
The root part of a vessel (for example the command pod – part 1) does not have a parent part, so does not have an attachment mode. However, the part is consider to be axially attached to nothing.
The following Cnano example does a depth-first traversal as before, but also prints out the attachment mode used by the part:
#include <krpc_cnano.h>
#include <krpc_cnano/services/space_center.h>
int main() {
krpc_connection_t conn;
krpc_open(&conn, "COM0");
krpc_connect(conn, "InfernalRobotics Example");
krpc_SpaceCenter_Vessel_t vessel;
krpc_SpaceCenter_ActiveVessel(conn, &vessel);
krpc_SpaceCenter_Parts_t parts;
krpc_SpaceCenter_Vessel_Parts(conn, &parts, vessel);
krpc_SpaceCenter_Part_t root;
krpc_SpaceCenter_Parts_Root(conn, &root, parts);
typedef struct {
krpc_SpaceCenter_Part_t part;
int depth;
} StackEntry;
StackEntry stack[256];
int stackPtr = 0;
stack[stackPtr].part = root;
stack[stackPtr].depth = 0;
while (stackPtr >= 0) {
krpc_SpaceCenter_Part_t part = stack[stackPtr].part;
int depth = stack[stackPtr].depth;
stackPtr--; // Pop the stack
bool axially_attached;
krpc_SpaceCenter_Part_AxiallyAttached(conn, &axially_attached, part);
const char * attach_mode = axially_attached ? "axial" : "radial";
char * title = NULL;
krpc_SpaceCenter_Part_Title(conn, &title, part);
for (int i = 0; i < depth; i++)
printf(" ");
printf("%s - %s\n", title, attach_mode);
krpc_list_object_t children = KRPC_NULL_LIST;
krpc_SpaceCenter_Part_Children(conn, &children, part);
for (size_t i = 0; i < children.size; i++) {
// Push onto the stack
stackPtr++;
stack[stackPtr].part = children.items[i];
stack[stackPtr].depth = depth+1;
}
}
}
When this code is execute using the craft file for the example vessel pictured above, the following is printed out:
Command Pod Mk1 - axial
TR-18A Stack Decoupler - axial
FL-T400 Fuel Tank - axial
LV-909 Liquid Fuel Engine - axial
TR-18A Stack Decoupler - axial
FL-T800 Fuel Tank - axial
LV-909 Liquid Fuel Engine - axial
TT-70 Radial Decoupler - radial
FL-T400 Fuel Tank - radial
TT18-A Launch Stability Enhancer - radial
FTX-2 External Fuel Duct - radial
LV-909 Liquid Fuel Engine - axial
Aerodynamic Nose Cone - axial
TT-70 Radial Decoupler - radial
FL-T400 Fuel Tank - radial
TT18-A Launch Stability Enhancer - radial
FTX-2 External Fuel Duct - radial
LV-909 Liquid Fuel Engine - axial
Aerodynamic Nose Cone - axial
LT-1 Landing Struts - radial
LT-1 Landing Struts - radial
Mk16 Parachute - axial
Fuel Lines#
Figure 5 – Fuel lines from the example in Figure 1. Fuel flows from the parts highlighted in green, into the part highlighted in blue.#
Figure 4 – A subset of the parts tree from Figure 2 above.#
Fuel lines are considered parts, and are included in the parts tree (for example, as pictured in Figure 4). However, the parts tree does not contain information about which parts fuel lines connect to. The parent part of a fuel line is the part from which it will take fuel (as shown in Figure 4) however the part that it will send fuel to is not represented in the parts tree.
Figure 5 shows the fuel lines from the example vessel pictured earlier. Fuel line part 15 (in red) takes fuel from a fuel tank (part 11 – in green) and feeds it into another fuel tank (part 9 – in blue). The fuel line is therefore a child of part 11, but its connection to part 9 is not represented in the tree.
The attributes krpc_SpaceCenter_Part_FuelLinesFrom() and
krpc_SpaceCenter_Part_FuelLinesTo() can be used to discover these
connections. In the example in Figure 5, when
krpc_SpaceCenter_Part_FuelLinesTo() is called on fuel tank part
11, it will return a list of parts containing just fuel tank part 9 (the blue
part). When krpc_SpaceCenter_Part_FuelLinesFrom() is called on
fuel tank part 9, it will return a list containing fuel tank parts 11 and 17
(the parts colored green).
Staging#
For vessel-level summaries (delta-v, thrust, fuel, and resources grouped per
stage), use the Stage class via
krpc_SpaceCenter_Vessel_Stages() and
krpc_SpaceCenter_Vessel_DecoupleStages().
Figure 6 – Example vessel from Figure 1 with a staging sequence.#
Each part has two staging numbers associated with it: the stage in which the
part is activated and the stage in which the part is decoupled. These values
can be obtained using krpc_SpaceCenter_Part_Stage() and
krpc_SpaceCenter_Part_DecoupleStage() respectively. For parts that
are not activated by staging, krpc_SpaceCenter_Part_Stage() returns
-1. For parts that are never decoupled,
krpc_SpaceCenter_Part_DecoupleStage() returns a value of -1.
Figure 6 shows an example staging sequence for a vessel. Figure 7 shows the stages in which each part of the vessel will be activated. Figure 8 shows the stages in which each part of the vessel will be decoupled.
Figure 7 – The stage in which each part is activated.#
Figure 8 – The stage in which each part is decoupled.#