Kerbal Simpit Compound Messages¶
Structs for compound message types.
Functions
-
template<typename MsgType>
MsgType parseMessage(byte msg[])¶ Parse a message of type MsgType.
Use it as ‘altitudeMessage myMsg = parseMessage<altitudeMessage>(msg);’
- Parameters:
msg – The byte array of the message body.
- Returns:
MsgType A formatted MsgType struct.
-
cagStatusMessage parseCAGStatusMessage(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing status of all the CAG.
- Parameters:
msg – The byte array of the message body.
- Returns:
cagStatusMessage A formatted cagStatusMessage struct.
-
SASInfoMessage parseSASInfoMessage(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing status of the SAS.
- Parameters:
msg – The byte array of the message body.
- Returns:
SASInfoMessage A formatted SASInfoMessage struct.
-
altitudeMessage parseAltitude(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing Altitude data.
- Parameters:
msg – The byte array of the message body.
- Returns:
altitudeMessage A formatted altitudeMessage struct.
-
apsidesMessage parseApsides(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing Apsides data.
- Returns:
apsidesMessage A formatted apsidesMessage struct.
-
orbitInfoMessage parseOrbitInfo(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing orbital information.
- Returns:
orbitInfoMessage A formatted orbitInfoMessage struct.
-
apsidesTimeMessage parseApsidesTime(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing Apsides Time data.
- Returns:
apsidesTimeMessage A formatted apsidesTimeMessage struct.
-
resourceMessage parseResource(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message countaining Resource data.
- Returns:
resourceMessage A formatted resourceMessage struct.
-
TACLSResourceMessage parseTACLSResource(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message countaining TACLSResourceMessage data.
- Returns:
TACLSResourceMessage A formatted TACLSResourceMessage struct.
-
TACLSWasteMessage parseTACLSWaste(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message countaining TACLSWasteMessage data.
- Returns:
TACLSWasteMessage A formatted TACLSWasteMessage struct.
-
CustomResourceMessage parseCustomResource(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message countaining CustomResourceMessage data.
- Returns:
CustomResourceMessage A formatted CustomResourceMessage struct.
-
velocityMessage parseVelocity(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing Velocity data.
- Returns:
velocityMessage A formatted velocityMessage struct.
-
vesselPointingMessage parseRotation(byte msg[])¶
Parse a message containing Rotation data.
- Returns:
vesselPointingMessage a formatted vesselPointingMessage struct.
-
targetMessage parseTarget(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing Target data.
- Returns:
targetMessage A formatted targetMessage struct.
-
airspeedMessage parseAirspeed(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing Airspeed data.
- Returns:
airspeedMessage a formatted airspeedMessage struct.
-
maneuverMessage parseManeuver(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing Maneuver data.
- Returns:
maneuverMessage a formatted maneuverMessage struct.
-
deltaVMessage parseDeltaV(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing DeltaV data.
- Returns:
deltaVMessage a formatted deltaVMessage struct.
-
deltaVEnvMessage parseDeltaVEnv(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing DeltaVEnv data.
- Returns:
deltaVEnvMessage a formatted deltaVEnvMessage struct.
-
burnTimeMessage parseBurnTime(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing BurnTime data.
- Returns:
burnTimeMessage a formatted burnTimeMessage struct.
-
tempLimitMessage parseTempLimitMessage(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing tempLimitMessage data.
- Returns:
tempLimitMessage a formatted tempLimitMessage struct.
-
flightStatusMessage parseFlightStatusMessage(byte msg[])¶
DEPRECATED.
Use parseMessage instead. Parse a message containing flightStatusMessage data.
- Returns:
flightStatusMessage a formatted flightStatusMessage struct.
-
struct cagStatusMessage¶
- #include <PayloadStructs.h>
An Altitude message.
Public Functions
-
inline bool is_action_activated(byte i)¶
Public Members
-
byte status[32]¶
List of all the action status organised by bytes.
Read them with the is_action_activated method.
-
inline bool is_action_activated(byte i)¶
-
struct SASInfoMessage¶
- #include <PayloadStructs.h>
An SAS info message to reprsent the current SAS state.
Public Members
-
byte currentSASMode¶
Current SAS mode.
SAS modes are listed in the AutopilotMode enum. 255 is used to indicate a disabled SAS.
-
int16_t SASModeAvailability¶
bitmask for the availability of each SAS mode.
If a mode is not available, a SAS_MODE_MESSAGE setting this mode will be ignored. The corresponing bitmask can be obtained with
1 << AP_RADIALINfor the radial in direction for instance, taking values from the AutopilotMode enum.
-
byte currentSASMode¶
-
struct altitudeMessage¶
- #include <PayloadStructs.h>
An Altitude message.
-
struct apsidesMessage¶
- #include <PayloadStructs.h>
An Apsides message.
-
struct apsidesTimeMessage¶
- #include <PayloadStructs.h>
An Apsides Time message.
-
struct orbitInfoMessage¶
- #include <PayloadStructs.h>
An message containing orbital information.
Public Members
-
float eccentricity¶
Current vessel’s orbital eccentricity.
-
float semiMajorAxis¶
Current vessel’s orbital semi major axis.
-
float inclination¶
Current vessel’s orbital inclination.
-
float longAscendingNode¶
Current vessel’s orbital longitude of ascending node.
-
float argPeriapsis¶
Current vessel’s orbital argument of periapsis.
-
float trueAnomaly¶
Current vessel’s orbital true anomaly.
-
float meanAnomaly¶
Current vessel’s orbital mean anomaly.
-
float period¶
Current vessel’s orbital period.
-
float eccentricity¶
-
struct flightStatusMessage¶
- #include <PayloadStructs.h>
An message containing information about the current flight.
Public Functions
-
inline bool isInFlight()¶
-
inline bool isInEVA()¶
-
inline bool isRecoverable()¶
-
inline bool isInAtmoTW()¶
-
inline byte getControlLevel()¶
Returns the current control level.
0 for no control, 1 for partially unmanned, 2 for partially manned, 3 for full control.
-
inline bool hasTarget()¶
Public Members
-
byte flightStatusFlags¶
Different booleans as defined by FligthStatusFlags.
You can access them with the helper funtions.
-
byte vesselSituation¶
Current situation of the vessel, as defined by the Vessel.Situations enum in the KSP API (1 for Landed, 8 for flying, etc.).
-
byte currentTWIndex¶
Current TW index.
-
byte crewCapacity¶
Current vessel crew total capacity.
-
byte crewCount¶
Current vessel crew count.
-
byte commNetSignalStrenghPercentage¶
Current vessel commNet signal strengh (in percentage).
0 when CommNet is not used
-
byte currentStage¶
Current stage of the vessel (also the total number of stage remaining).
Decreased by one at each staging. Caped at 255 by Simpit.
-
byte vesselType¶
Current type of the vessel (e.g.
0 for debris, 5 for rover, 3 for probe, 7 for ship, etc.) as indicated in https://www.kerbalspaceprogram.com/api/_vessel_8cs.html#afa39c7ec7cc0926b332fcd2d77425edb
-
inline bool isInFlight()¶
-
struct atmoConditionsMessage¶
- #include <PayloadStructs.h>
An message containing information about the current atmospheric conditions.
Public Functions
-
inline bool hasAtmosphere()¶
-
inline bool hasOxygen()¶
-
inline bool isVesselInAtmosphere()¶
Public Members
-
byte atmoCharacteristics¶
Different booleans as defined by AtmoConditionsFlags.
You can access them with the helper funtions.
-
float airDensity¶
Current density in the current atmosphere where the current vessel is.
Only defined if in atmosphere.
-
float temperature¶
Current temperature in the current atmosphere where the current vessel is.
Only defined if in atmosphere.
-
float pressure¶
Current pressure in the current atmosphere where the current vessel is.
Only defined if in atmosphere.
-
inline bool hasAtmosphere()¶
-
struct resourceMessage¶
- #include <PayloadStructs.h>
A Resource message.
All resource messages use this struct for sending data.
-
struct TACLSResourceMessage¶
- #include <PayloadStructs.h>
A Resource message for TACLS ressources.
Public Members
-
float currentFood¶
Current resource level for food.
-
float maxFood¶
Maximum capacity of food.
-
float currentWater¶
Current resource level for water.
-
float maxWater¶
Maximum capacity of water.
-
float currentOxygen¶
Current resource level for oxygen.
-
float maxOxygen¶
Maximum capacity of oxygen.
-
float currentFood¶
-
struct TACLSWasteMessage¶
- #include <PayloadStructs.h>
A Resource message for TACLS ressources.
Public Members
-
float currentWaste¶
Current resource level for waste.
-
float maxWaste¶
Maximum capacity of waste.
-
float currentLiquidWaste¶
Current resource level for liquid waste.
-
float maxLiquidWaste¶
Maximum capacity of liquid waste.
-
float currentCO2¶
Current resource level for CO2.
-
float maxCO2¶
Maximum capacity of CO2.
-
float currentWaste¶
-
struct CustomResourceMessage¶
- #include <PayloadStructs.h>
A Resource message for custom ressources.
The resources must be set in the configuration file.
Public Members
-
float currentResource1¶
Current resource level resource 1.
-
float maxResource1¶
Maximum capacity of resource 1.
-
float currentResource2¶
Current resource level resource 2.
-
float maxResource2¶
Maximum capacity of resource 2.
-
float currentResource3¶
Current resource level resource 3.
-
float maxResource3¶
Maximum capacity of resource 3.
-
float currentResource4¶
Current resource level resource 4.
-
float maxResource4¶
Maximum capacity of resource 4.
-
float currentResource1¶
-
struct velocityMessage¶
- #include <PayloadStructs.h>
A Velocity message.
-
struct targetMessage¶
- #include <PayloadStructs.h>
A Target information message.
-
struct airspeedMessage¶
- #include <PayloadStructs.h>
An Airspeed information message.
-
struct maneuverMessage¶
- #include <PayloadStructs.h>
A maneuver information message.
Public Members
-
float timeToNextManeuver¶
Time to the next planned maneuver.
-
float deltaVNextManeuver¶
Delta to the next planned maneuver.
-
float durationNextManeuver¶
Duration of the burn for the next planned maneuver.
-
float deltaVTotal¶
DeltaV of all the planned maneuvers.
-
float headingNextManeuver¶
Heading of the next maneuver.
-
float pitchNextManeuver¶
Pitch of the next maneuver.
-
float timeToNextManeuver¶
-
struct vesselPointingMessage¶
- #include <PayloadStructs.h>
A vessel orientation information message, including velocity orientation.
Public Members
-
float heading¶
Heading of the vessel (between 0 and 360, as indicated in the navball.
90 when pointing east, 180 when pointing south).
-
float pitch¶
Pitch angle of the vessel (between -90 and +90.
0 for an horizontal craft, +90 when pointing up, -90 when pointing down).
-
float roll¶
Roll angle of the vessel (between -180 and +180.
0 for a plane on the runway, ready to takeoff).
-
float orbitalVelocityHeading¶
Heading of the orbital velocity.
-
float orbitalVelocityPitch¶
Pitch of the orbital velocity.
-
float surfaceVelocityHeading¶
Heading of the surface velocity.
-
float surfaceVelocityPitch¶
Pitch of the surface velocity.
-
float heading¶
-
struct deltaVMessage¶
- #include <PayloadStructs.h>
A deltaV information message.
-
struct deltaVEnvMessage¶
- #include <PayloadStructs.h>
A deltaV information message in different environments.
-
struct burnTimeMessage¶
- #include <PayloadStructs.h>
A burn time information message.
-
struct tempLimitMessage¶
- #include <PayloadStructs.h>
A temperator limit message.
-
struct rotationMessage¶
- #include <PayloadStructs.h>
A vessel rotation message, only used to send commands to KSP.
This struct contains information about vessel rotation commands.
-
struct translationMessage¶
- #include <PayloadStructs.h>
A vessel translation message.
This struct contains information about vessel translation commands.
Public Functions
-
translationMessage()¶
-
void setX(int16_t x)¶
-
void setY(int16_t y)¶
-
void setZ(int16_t z)¶
-
void setXYZ(int16_t x, int16_t y, int16_t z)¶
Public Members
-
int16_t X¶
Translation along the X axis.
-
int16_t Y¶
Translation along the Y axis.
-
int16_t Z¶
Translation along the Z axis.
-
byte mask¶
The mask indicates which elements are intentionally set.
Unset elements should be ignored. It should be one or more of:
1: X (X_TRANS)
2: Y (Y_TRANS)
4: Z (Z_TRANS)
-
translationMessage()¶
-
struct customAxisMessage¶
- #include <PayloadStructs.h>
A vessel custom axis message.
This struct contains information about custom axis commands.
Public Functions
-
customAxisMessage()¶
-
void setCustom1(int16_t val)¶
-
void setCustom2(int16_t val)¶
-
void setCustom3(int16_t val)¶
-
void setCustom4(int16_t val)¶
-
void setAllCustom(int16_t custom1, int16_t custom2, int16_t custom3, int16_t custom4)¶
Public Members
-
int16_t custom1¶
Value for the custom1 axis.
-
int16_t custom2¶
Value for the custom2 axis.
-
int16_t custom3¶
Value for the custom3 axis.
-
int16_t custom4¶
Value for the custom4 axis.
-
byte mask¶
The mask indicates which elements are intentionally set.
Unset elements should be ignored. It should be one or more of:
1: Custom1
2: Custom2
4: Custom3
8: Custom4
-
customAxisMessage()¶
-
struct wheelMessage¶
- #include <PayloadStructs.h>
A wheel control message.
This struct contains information about wheel steering and throttle.
-
struct throttleMessage¶
- #include <PayloadStructs.h>
A throttle control message.
This struct contains information about throttle.
Public Members
-
int16_t throttle¶
Throttle.
-
int16_t throttle¶
-
struct timewarpMessage¶
- #include <PayloadStructs.h>
A timewarp message.
This struct contains a single timewarp command, defined in the Timewarp enum.
Public Members
-
byte command¶
Command in the Timewarp enum.
-
byte command¶
-
struct timewarpToMessage¶
- #include <PayloadStructs.h>
A timewarp TO message.
This struct contains a single timewarp command, defined in the Timewarp enum.
Public Functions
-
timewarpToMessage(byte instant, float delay)¶
-
timewarpToMessage(byte instant, float delay)¶
-
struct cameraRotationMessage¶
- #include <PayloadStructs.h>
A camera mode message.
This struct contains information about the camera mode.
-
struct keyboardEmulatorMessage¶
- #include <PayloadStructs.h>
A keyboard emulator message.
This struct contains information about the keypress to emulate.
This documentation was build using ArduinoDocs.