Kerbal Simpit Message Types

Constants for inbound and outbound message IDs.

Enums

enum CommonPackets

Common packets.

These packet types are used for both inbound and outbound messages.

Values:

enumerator SYNC_MESSAGE

Sync message. Used for handshaking.

enumerator ECHO_REQ_MESSAGE

Echo request. Either end can send this, and an echo response is expected.

enumerator ECHO_RESP_MESSAGE

Echo response. Sent in reply to an echo request.

enum OutboundPackets

Outbound packets.

IDs for packets that go from the game to devices.

Values:

enumerator LF_MESSAGE

Liquid fuel in the vessel.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator LF_STAGE_MESSAGE

Liquid fuel in the current stage.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator OX_MESSAGE

Oxidizer in the vessel.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator OX_STAGE_MESSAGE

Oxidizer in the current stage.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator SF_MESSAGE

Solid fuel in the vessel.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator SF_STAGE_MESSAGE

Solid fuel in the current stage.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator XENON_GAS_MESSAGE

Xenon gas in the vessel.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator XENON_GAS_STAGE_MESSAGE

Xenon Gas in the current stage.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator MONO_MESSAGE

Monoprollent in the vessel.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator EVA_MESSAGE

EVA propellant.

Only available for Kerbals on EVA. Messages on this channel contain a resourceMessage.

enumerator ELECTRIC_MESSAGE

Electic Charge in the vessel.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator ORE_MESSAGE

Ore in the vessel.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator AB_MESSAGE

Ablator in the vessel.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator AB_STAGE_MESSAGE

Ablator in the current stage.

Messages on this channel contain a resourceMessage. Need ARP to work.

enumerator TACLS_RESOURCE_MESSAGE

TAC Life Support ressources.

Messages on this channel contain a TACLSRessourceMessage. Need ARP and TACLS to work.

enumerator TACLS_WASTE_MESSAGE

TAC Life Support waste ressources.

Messages on this channel contain a TACLSWasteMessage. Need ARP and TACLS to work.

enumerator CUSTOM_RESOURCE_1_MESSAGE

Custom ressources.

Specific ressource to use to be set in the configuration file. Messages on this channel contain a CustomResourceMessage. Need ARP and Community Resource Pack to work.

enumerator CUSTOM_RESOURCE_2_MESSAGE

Custom ressources.

Specific ressource to use to be set in the configuration file. Messages on this channel contain a CustomResourceMessage. Need ARP and Community Resource Pack to work.

enumerator ALTITUDE_MESSAGE

Sea level and surface altitude.

Messages on this channel contain an altitudeMessage.

enumerator VELOCITY_MESSAGE

Vessel velocity.

Messages on this channel contain a velocityMessage.

enumerator AIRSPEED_MESSAGE

Information about airspeed.

This channel delivers messages containing indicated airspeed and mach number for the active vessel. Messages on this channel contain a airspeedMessage.

enumerator APSIDES_MESSAGE

Apoapsis and periapsis.

Messages on this channel contain an apsidesMessage.

enumerator APSIDESTIME_MESSAGE

Time to the next apoapsis and periapsis.

Messages on this channel contain an apsidesTimeMessage.

enumerator MANEUVER_MESSAGE

Data about the planned maneuvers.

Messages on this channel contain an maneuverMessage.

enumerator SAS_MODE_INFO_MESSAGE

Data about the current SAS mode.

Messages on this channel contain a SASInfoMessage.

enumerator ORBIT_MESSAGE

Data about the current orbit.

Messages on this channel contain an orbitInfoMessage.

enumerator ROTATION_DATA_MESSAGE

Data about the vessel’s rotation (including velocities).

This is an output, not be confused with rotationMessage, an input from joysticks. Messages on this channel contain an vesselPointingMessage. This value was renamed in v2.2 from ROTATION_DATA.

enumerator ROTATION_CMD_MESSAGE

Rotation command after applying Simpit command.

If not Simpit command is applied, this can be set by the SAS for instance. Messages on this channel contain an rotationMessage, with the mask field unused.

enumerator TRANSLATION_CMD_MESSAGE

Translation command after applying Simpit command.

Messages on this channel contain an translationMessage, with the mask field unused.

enumerator WHEEL_CMD_MESSAGE

Wheel command after applying Simpit command.

Messages on this channel contain an wheelMessage, with the mask field unused.

enumerator THROTTLE_CMD_MESSAGE

Throttle command after applying Simpit command.

This can be used for instance to control a motorized throttle. Messages on this channel contain an throttleMessage (i.e. a single 16-bit integer).

enumerator ACTIONSTATUS_MESSAGE

Action groups.

Messages on this channel contain a single byte representing the currently active action groups. A given action group can be checked by performing a bitwise AND with the message. For example:

if (msg[0] & SAS_ACTION) {
    // code to execute if SAS is active
}

Possible action groups are:

  • STAGE_ACTION

  • GEAR_ACTION

  • LIGHT_ACTION

  • RCS_ACTION

  • SAS_ACTION

  • BRAKES_ACTION

  • ABORT_ACTION

enumerator DELTAV_MESSAGE

Amount of deltaV of the current vessel in the current situation.

Messages on this channel contain an deltaVMessage.

enumerator DELTAVENV_MESSAGE

Amount of deltaV of the current vessel in different situations (Atmospheric sea level and in vacuum).

Messages on this channel contain an deltaVEnvMessage.

enumerator BURNTIME_MESSAGE

Amount of burn time of the current vessel.

Messages on this channel contain an burnTimeMessage.

enumerator CAGSTATUS_MESSAGE

Current status of all the custom action groups.

Messages on this channel contains a cagStatusMessage. This cagStatusMessage has a is_action_activated method taking the action ground number as an argumetnt.

enumerator TEMP_LIMIT_MESSAGE

Current maximum temperature of the any vessel part.

This message contains the maximum percentage value of the temperature of any part of the vessel. It contains a percentage for both core and skin temperature. The two maximum percentage can come from different parts. Messages on this channel contain an tempLimitMessage.

enumerator TARGETINFO_MESSAGE

Information about targetted object.

This channel delivers messages about the object targetted by the active vessel. Messages on this channel contain a targetInfoMessage.

enumerator SOI_MESSAGE

Name of current Sphere of Influence.

This channel delivers an ASCII string containing the name of the body the active vessel is currently orbiting. Note that this is always the English name, regardless of the language the game is currently set to.

enumerator SCENE_CHANGE_MESSAGE

Scene change packets are sent by the plugin when entering or leaving the flight scene.

This message has a single byte : 0 when a flight is ready, 1 when exiting a flight scene.

enumerator FLIGHT_STATUS_MESSAGE

Information about the current flight (warp speed, status, crew, com).

Messages on this channel contain a flightStatusMessage.

enumerator ATMO_CONDITIONS_MESSAGE

Information about the current atmospheric conditions.

Messages on this channel contain a atmoConditionsMessage.

enumerator VESSEL_NAME_MESSAGE

Current name of the vessel.

Messages on this channel contain a table of size 32 max (name is truncated) and only ascii characters are used.

enumerator VESSEL_CHANGE_MESSAGE

Vessel Change packets are sent when the current vessel change Messages on this channel contain a single byte indicating the origin of the change : 1 for vessel switching 2 for docking 3 for undocking.

enum InboundPackets

Inbound packets.

These packet types are used for packets going from devices to the game.

Values:

enumerator CLOSE_SERIAL
enumerator REGISTER_MESSAGE

Register to receive messages on a given channel.

enumerator DEREGISTER_MESSAGE

Deregister, indicate that no further messages for the given channel should be sent.

enumerator REQUEST_MESSAGE

Request a new message to be sent on this channel (used for channel that only send message on request).

If requested on the channel 0, it will trigger a new message on all subscribed channels. May not work on all channels.

enumerator CAGACTIVATE_MESSAGE

Activate the given Custom Action Group(s).

enumerator CAGDEACTIVATE_MESSAGE

Deactivate the given Custom Action Group(s).

enumerator CAGTOGGLE_MESSAGE

Toggle the given Custom Action Group(s) (Active CAGs will deactivate, inactive CAGs will activate).

enumerator AGACTIVATE_MESSAGE

Activate the given standard Action Group(s).

Note that every request to activate the Stage action group will result in the next stage being activated. For all other action groups, multiple activate requests will have no effect.

enumerator AGDEACTIVATE_MESSAGE

Deactivate the given standard Action Group(s).

enumerator AGTOGGLE_MESSAGE

Toggle the given standard Action Group(s).

enumerator ROTATION_MESSAGE

Send vessel rotation commands.

If set and not 0, those command will supersede SAS command. The SAS will appear not the work when the jostick is in use. If this is the case for you, make sure you are sending 0 command to KSP on all used axis.

enumerator TRANSLATION_MESSAGE

Send vessel translation commands.

enumerator WHEEL_MESSAGE

Send wheel steering/throttle commands.

enumerator THROTTLE_MESSAGE

Send vessel throttle commands.

enumerator SAS_MODE_MESSAGE

Send SAS mode commands.

The payload should be a single byte, possible SAS modes are listed in the AutopilotMode enum.

enumerator CAMERA_CONTROL_MODE
enumerator CAMERA_ROTATION_MESSAGE
enumerator TIMEWARP_MESSAGE

Send a timewarp commands.

This is to change the game speed. The payload should be a single byte, possible commands are listed in the Timewarp enum.

enumerator TIMEWARP_TO_MESSAGE

Send a timewarp TO commands.

This is to timewarp to a given time. The message (see timewarpToMessage struct) contains a single byte for the specific point to aim (periapsis, maneuver node, etc.) and a delay in seconds with respect to this point. This allow to timewarp 1h before the next morning, 30s before periapsis or 1 min before the start of the burn of the next maneuver.

enumerator CUSTOM_LOG

Send a custom log message.

The message will be printed in the KSP log. The options are defined in the CustomLogStatus enum. The message should not be more than 31 char.

enumerator KEYBOARD_EMULATOR

Send a message to emulate a key press.

The message contains a key modifyer and a key code. The key code indicate which key to press. It is taken from the file named VirtualKeyCode in the folder KerbalSimpit. For instance :

  • 0x4D for ‘m’ to open the map

  • 0x74 for ‘F5’ to quicksave The modifier is used to emulate key press while holding keys such as CTRL, SHIFT, etc This channel only works on Windows, not on Mac or Linux.

Another alternative is to use the keyboard.h library, which works on all operating systems (Windows, Linux, Mac), but needs a specific Arduino board (based on ATmega32U4 such as the Due or Leonardo). See the KerbalSimpitTranslationForShipAndEVADemo example for instance.

enumerator CUSTOM_AXIS_MESSAGE

Send a message to control the custom axis.

enumerator NAVBALLMODE_MESSAGE

Send a message to cycle the NavBall mode to the next mode.

enum ActionGroupIndexes

Action Group Indexes These are used to mask out elements of an ACTIONSTATUS_MESSAGE.

Values:

enumerator STAGE_ACTION

Bitmask for the Stage action group.

enumerator GEAR_ACTION

Bitmask for the Gear action group.

enumerator LIGHT_ACTION

Bitmask for the Light action group.

enumerator RCS_ACTION

Bitmask for the RCS action group.

enumerator SAS_ACTION

Bitmask for the SAS action group.

enumerator BRAKES_ACTION

Bitmask for the Brakes action group.

enumerator ABORT_ACTION

Bitmask for the Abort action group.

enum Timewarp

Timewarp command These are used for a TIMEWARP_MESSAGE.

Values:

enumerator TIMEWARP_X1

Set Timewarp to x1.

enumerator TIMEWARP_X5

Set Timewarp to x5 (no effect in atmosphere).

enumerator TIMEWARP_X10

Set Timewarp to x10 (no effect in atmosphere).

enumerator TIMEWARP_X50

Set Timewarp to x50 (no effect in atmosphere).

enumerator TIMEWARP_X100

Set Timewarp to x100 (no effect in atmosphere).

enumerator TIMEWARP_X1000

Set Timewarp to x1000 (no effect in atmosphere).

enumerator TIMEWARP_X10000

Set Timewarp to x10000 (no effect in atmosphere).

enumerator TIMEWARP_X100000

Set Timewarp to x100000 (no effect in atmosphere).

enumerator TIMEWARP_X1_PHYSICAL

Set Timewarp to x1 in atmosphere (no effect out of atmosphere).

enumerator TIMEWARP_X2_PHYSICAL

Set Timewarp to x2 in atmosphere (no effect out of atmosphere).

enumerator TIMEWARP_X3_PHYSICAL

Set Timewarp to x3 in atmosphere (no effect out of atmosphere).

enumerator TIMEWARP_X4_PHYSICAL

Set Timewarp to x4 in atmosphere (no effect out of atmosphere).

enumerator TIMEWARP_UP

Set Timewarp the next rate available.

enumerator TIMEWARP_DOWN

Set Timewarp the previous rate available.

enumerator TIMEWARP_CANCEL_AUTOWARP

Cancel the current auto-timewarp and reset it to x1.

enum TimewarpTo

Timewarp command These are used for a TIMEWARP_TO_MESSAGE in a timewarpToMessage struct.

Values:

enumerator TIMEWARP_TO_NOW

Warp to now, used to add a delay to the given time.

enumerator TIMEWARP_TO_NEXT_MANEUVER

Warp to the next maneuver node.

enumerator TIMEWARP_TO_NEXT_BURN

Warp to the start of the burn of the next maneuver, estiming the burntime using KSP estimations.

It is recommended to add a delay to account for the needed rotation.

enumerator TIMEWARP_TO_NEXT_SOI

Warp to the next SOI change.

enumerator TIMEWARP_TO_APOAPSIS

Warp to the apoapsis.

enumerator TIMEWARP_TO_PERIAPSIS

Warp to the periapsis.

enumerator TIMEWARP_TO_NEXT_MORNING

Warp to the next morning.

enum CustomLogStatus

Values:

enumerator VERBOSE_ONLY

If set, the message will only be put in the KSP log is the Simpit mod is in verbose mode.

enumerator PRINT_TO_SCREEN

If set, the message will also be displayed to the user (and not only in the log)

enumerator NO_HEADER

If set, the message will not be prefixed with ‘Simpit :’.

enum KeyboardEmulatorModifier

Values:

enumerator SHIFT_MOD

If set, emulate the use of Shift.

enumerator CTRL_MOD

If set, emulate the use of CTRL.

enumerator ALT_MOD

If set, emulate the use of ALT.

enumerator KEY_DOWN_MOD

If set, emulate only the key down.

enumerator KEY_UP_MOD

If set, emulate only the key up.

enum RotationAxes

Rotation Axes These are used to indicate which axes in a ROTATION_MESSAGE or CAMERA_ROTATION_MESSAGE are active.

Values:

enumerator PITCH_ROT

Bitmask for the pitch axis.

enumerator ROLL_ROT

Bitmask for the roll axis.

enumerator YAW_ROT

Bitmask for the yaw axis.

enumerator ZOOM_ROT

Bitmask for the zoom axis.

Added here purely for camera control.

enum TranslationAxes

Translation Axes These are used to indicate which axes in a TRANSLATION_MESSAGE are active.

Values:

enumerator X_TRANS

Bitmask for the X axis.

enumerator Y_TRANS

Bitmask for the Y axis.

enumerator Z_TRANS

Bitmask for the Z axis.

enum WheelAxes

Translation Axes These are used to indicate which axes in a WHEEL_MESSAGE are active.

Values:

enumerator STEER_WHEEL

Bitmask for the steer.

enumerator THROTTLE_WHEEL

Bitmask for the throttle.

enum AutopilotMode

Autopilot Mode The possible Autopilot (SAS) modes.

This enum corresponds with VesselPilot.AutopilotMode in the KSP API.

Values:

enumerator AP_STABILITYASSIST
enumerator AP_PROGRADE
enumerator AP_RETROGRADE
enumerator AP_NORMAL
enumerator AP_ANTINORMAL
enumerator AP_RADIALIN
enumerator AP_RADIALOUT
enumerator AP_TARGET
enumerator AP_ANTITARGET
enumerator AP_MANEUVER
enum CameraControlMode

Camera Mode The possible camera mode control options.

Values:

enumerator CAMERA_MODE_FLIGHT
enumerator FLIGHT_CAMERA_AUTO
enumerator FLIGHT_CAMERA_FREE
enumerator FLIGHT_CAMERA_ORBITAL
enumerator FLIGHT_CAMERA_CHASE
enumerator FLIGHT_CAMERA_LOCKED
enumerator CAMERA_NEXT
enumerator CAMERA_PREVIOUS
enumerator CAMERA_NEXT_MODE
enumerator CAMERA_PREVIOUS_MODE
enum FligthStatusFlags

Flags used for the FlightStatus message.

Values:

enumerator FLIGHT_IN_FLIGHT

True if the game is currently in the flight screen.

enumerator FLIGHT_IS_EVA

True if the current flight is an EVA.

enumerator FLIGHT_IS_RECOVERABLE

True if the current vesset is recoverable.

enumerator FLIGHT_IS_ATMO_TW

True if the current Timewarp mode is for atmosphere (i.e.

physical timewarp).

enumerator FLIGHT_CONTROL_LEVEL_0

2 bits used to code the Control Level.

Use the helper function of flightStatusMessage to parse it.

enumerator FLIGHT_CONTROL_LEVEL_1

2 bits used to code the Control Level.

Use the helper function of flightStatusMessage to parse it.

enumerator FLIGHT_HAS_TARGET

True if a target is set currently.

enum AtmoConditionsFlags

Flags used for the atmoConditionsMessage message.

Values:

enumerator HAS_ATMOSPHERE

True if the current body has an atmosphere.

enumerator HAS_OXYGEN

True if the current body has oxygen in its atmosphere.

enumerator IS_IN_ATMOSPHERE

True if the current vesset is atmosphere.


This documentation was build using ArduinoDocs.