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:

SYNC_MESSAGE = 0

Sync message. Used for handshaking.

ECHO_REQ_MESSAGE = 1

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

ECHO_RESP_MESSAGE = 2

Echo response. Sent in reply to an echo request.

enum OutboundPackets

Outbound packets.

IDs for packets that go from the game to devices.

Values:

SCENE_CHANGE_MESSAGE = 3

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

ALTITUDE_MESSAGE = 8

Sea level and surface altitude.

Messages on this channel contain an altitudeMessage.

APSIDES_MESSAGE = 9

Apoapsis and periapsis.

Messages on this channel contain an apsidesMessage.

LF_MESSAGE = 10

Liquid fuel in the vessel.

Messages on this channel contain a resourceMessage.

LF_STAGE_MESSAGE = 11

Liquid fuel in the current stage.

Messages on this channel contain a resourceMessage.

OX_MESSAGE = 12

Oxidizer in the vessel.

Messages on this channel contain a resourceMessage.

OX_STAGE_MESSAGE = 13

Oxidizer in the current stage.

Messages on this channel contain a resourceMessage.

SF_MESSAGE = 14

Solid fuel in the vessel.

Messages on this channel contain a resourceMessage.

SF_STAGE_MESSAGE = 15

Solid fuel in the current stage.

Messages on this channel contain a resourceMessage.

MONO_MESSAGE = 16

Monoprollent in the vessel.

Messages on this channel contain a resourceMessage.

ELECTRIC_MESSAGE = 17

Electic Charge in the vessel.

Messages on this channel contain a resourceMessage.

EVA_MESSAGE = 18

EVA propellant.

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

ORE_MESSAGE = 19

Ore in the vessel.

Messages on this channel contain a resourceMessage.

AB_MESSAGE = 20

Ablator in the vessel.

Messages on this channel contain a resourceMessage.

AB_STAGE_MESSAGE = 21

Ablator in the current stage.

Messages on this channel contain a resourceMessage.

VELOCITY_MESSAGE = 22

Vessel velocity.

Messages on this channel contain a velocityMessage.

ACTIONSTATUS_MESSAGE = 23

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 & 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

APSIDESTIME_MESSAGE = 24

Time to the next apoapsis and periapsis.

Messages on this channel contain an apsidesTimeMessage.

TARGETINFO_MESSAGE = 25

Information about targetted object.

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

SOI_MESSAGE = 26

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.

AIRSPEED_MESSAGE = 27

Information about airspeed.

This channel delivers messages containing indicated airspeed and mach number for the active vessel.

enum InboundPackets

Inbound packets.

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

Values:

REGISTER_MESSAGE = 8

Register to receive messages on a given channel.

DEREGISTER_MESSAGE = 9

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

CAGACTIVATE_MESSAGE = 10

Activate the given Custom Action Group(s).

CAGDEACTIVATE_MESSAGE = 11

Deactivate the given Custom Action Group(s).

CAGTOGGLE_MESSAGE = 12

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

AGACTIVATE_MESSAGE = 13

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.

AGDEACTIVATE_MESSAGE = 14

Deactivate the given standard Action Group(s).

AGTOGGLE_MESSAGE = 15

Toggle the given standard Action Group(s).

ROTATION_MESSAGE = 16

Send vessel rotation commands.

TRANSLATION_MESSAGE = 17

Send vessel translation commands.

WHEEL_MESSAGE = 18

Send wheel steering/throttle commands.

THROTTLE_MESSAGE = 19

Send vessel throttle commands.

SAS_MODE_MESSAGE = 20

Send SAS mode commands.

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

enum ActionGroupIndexes

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

Values:

STAGE_ACTION = 1

Bitmask for the Stage action group.

GEAR_ACTION = 2

Bitmask for the Gear action group.

LIGHT_ACTION = 4

Bitmask for the Light action group.

RCS_ACTION = 8

Bitmask for the RCS action group.

SAS_ACTION = 16

Bitmask for the SAS action group.

BRAKES_ACTION = 32

Bitmask for the Brakes action group.

ABORT_ACTION = 64

Bitmask for the Abort action group.

enum RotationAxes

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

Values:

PITCH_ROT = 1

Bitmask for the pitch axis.

ROLL_ROT = 2

Bitmask for the roll axis.

YAW_ROT = 4

Bitmask for thw yaw axis.

enum TranslationAxes

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

Values:

X_TRANS = 1

Bitmask for the X axis.

Y_TRANS = 2

Bitmask for the Y axis.

Z_TRANS = 4

Bitmask for the Z axis.

enum AutopilotMode

Autopilot Mode The possible Autopilot (SAS) modes.

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

Values:

AP_STABILITYASSIST = 1
AP_PROGRADE = 2
AP_RETROGRADE = 3
AP_NORMAL = 4
AP_ANTINORMAL = 5
AP_RADIALIN = 6
AP_RADIALOUT = 7
AP_TARGET = 8
AP_ANTITARGET = 9
AP_MANEUVER = 10

This documentation was build using ArduinoDocs.