@aircast-4g/mavlink
Version:
TypeScript type generator for MAVLink dialects
614 lines (612 loc) • 78.5 kB
JavaScript
// @aircast-4g/mavlink - Dialect bundle
// Generated from TypeScript sources
// Auto-generated TypeScript enums for standard dialect
// Micro air vehicle / autopilot classes. This identifies the individual model.
var MAV_AUTOPILOTEnum;
(function (MAV_AUTOPILOTEnum) {
// Generic autopilot, full support for everything
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_GENERIC"] = 0] = "MAV_AUTOPILOT_GENERIC";
// Reserved for future use.
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_RESERVED"] = 1] = "MAV_AUTOPILOT_RESERVED";
// SLUGS autopilot, http://slugsuav.soe.ucsc.edu
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_SLUGS"] = 2] = "MAV_AUTOPILOT_SLUGS";
// ArduPilot - Plane/Copter/Rover/Sub/Tracker, https://ardupilot.org
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_ARDUPILOTMEGA"] = 3] = "MAV_AUTOPILOT_ARDUPILOTMEGA";
// OpenPilot, http://openpilot.org
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_OPENPILOT"] = 4] = "MAV_AUTOPILOT_OPENPILOT";
// Generic autopilot only supporting simple waypoints
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY"] = 5] = "MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY";
// Generic autopilot supporting waypoints and other simple navigation commands
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY"] = 6] = "MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY";
// Generic autopilot supporting the full mission command set
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_GENERIC_MISSION_FULL"] = 7] = "MAV_AUTOPILOT_GENERIC_MISSION_FULL";
// No valid autopilot, e.g. a GCS or other MAVLink component
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_INVALID"] = 8] = "MAV_AUTOPILOT_INVALID";
// PPZ UAV - http://nongnu.org/paparazzi
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_PPZ"] = 9] = "MAV_AUTOPILOT_PPZ";
// UAV Dev Board
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_UDB"] = 10] = "MAV_AUTOPILOT_UDB";
// FlexiPilot
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_FP"] = 11] = "MAV_AUTOPILOT_FP";
// PX4 Autopilot - http://px4.io/
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_PX4"] = 12] = "MAV_AUTOPILOT_PX4";
// SMACCMPilot - http://smaccmpilot.org
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_SMACCMPILOT"] = 13] = "MAV_AUTOPILOT_SMACCMPILOT";
// AutoQuad -- http://autoquad.org
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_AUTOQUAD"] = 14] = "MAV_AUTOPILOT_AUTOQUAD";
// Armazila -- http://armazila.com
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_ARMAZILA"] = 15] = "MAV_AUTOPILOT_ARMAZILA";
// Aerob -- http://aerob.ru
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_AEROB"] = 16] = "MAV_AUTOPILOT_AEROB";
// ASLUAV autopilot -- http://www.asl.ethz.ch
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_ASLUAV"] = 17] = "MAV_AUTOPILOT_ASLUAV";
// SmartAP Autopilot - http://sky-drones.com
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_SMARTAP"] = 18] = "MAV_AUTOPILOT_SMARTAP";
// AirRails - http://uaventure.com
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_AIRRAILS"] = 19] = "MAV_AUTOPILOT_AIRRAILS";
// Fusion Reflex - https://fusion.engineering
MAV_AUTOPILOTEnum[MAV_AUTOPILOTEnum["MAV_AUTOPILOT_REFLEX"] = 20] = "MAV_AUTOPILOT_REFLEX";
})(MAV_AUTOPILOTEnum || (MAV_AUTOPILOTEnum = {}));
// MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA).
var MAV_TYPEEnum;
(function (MAV_TYPEEnum) {
// Generic micro air vehicle
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_GENERIC"] = 0] = "MAV_TYPE_GENERIC";
// Fixed wing aircraft.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_FIXED_WING"] = 1] = "MAV_TYPE_FIXED_WING";
// Quadrotor
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_QUADROTOR"] = 2] = "MAV_TYPE_QUADROTOR";
// Coaxial helicopter
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_COAXIAL"] = 3] = "MAV_TYPE_COAXIAL";
// Normal helicopter with tail rotor.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_HELICOPTER"] = 4] = "MAV_TYPE_HELICOPTER";
// Ground installation
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_ANTENNA_TRACKER"] = 5] = "MAV_TYPE_ANTENNA_TRACKER";
// Operator control unit / ground control station
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_GCS"] = 6] = "MAV_TYPE_GCS";
// Airship, controlled
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_AIRSHIP"] = 7] = "MAV_TYPE_AIRSHIP";
// Free balloon, uncontrolled
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_FREE_BALLOON"] = 8] = "MAV_TYPE_FREE_BALLOON";
// Rocket
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_ROCKET"] = 9] = "MAV_TYPE_ROCKET";
// Ground rover
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_GROUND_ROVER"] = 10] = "MAV_TYPE_GROUND_ROVER";
// Surface vessel, boat, ship
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_SURFACE_BOAT"] = 11] = "MAV_TYPE_SURFACE_BOAT";
// Submarine
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_SUBMARINE"] = 12] = "MAV_TYPE_SUBMARINE";
// Hexarotor
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_HEXAROTOR"] = 13] = "MAV_TYPE_HEXAROTOR";
// Octorotor
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_OCTOROTOR"] = 14] = "MAV_TYPE_OCTOROTOR";
// Tricopter
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_TRICOPTER"] = 15] = "MAV_TYPE_TRICOPTER";
// Flapping wing
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_FLAPPING_WING"] = 16] = "MAV_TYPE_FLAPPING_WING";
// Kite
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_KITE"] = 17] = "MAV_TYPE_KITE";
// Onboard companion controller
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_ONBOARD_CONTROLLER"] = 18] = "MAV_TYPE_ONBOARD_CONTROLLER";
// Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_VTOL_TAILSITTER_DUOROTOR"] = 19] = "MAV_TYPE_VTOL_TAILSITTER_DUOROTOR";
// Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_VTOL_TAILSITTER_QUADROTOR"] = 20] = "MAV_TYPE_VTOL_TAILSITTER_QUADROTOR";
// Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_VTOL_TILTROTOR"] = 21] = "MAV_TYPE_VTOL_TILTROTOR";
// VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_VTOL_FIXEDROTOR"] = 22] = "MAV_TYPE_VTOL_FIXEDROTOR";
// Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_VTOL_TAILSITTER"] = 23] = "MAV_TYPE_VTOL_TAILSITTER";
// Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_VTOL_TILTWING"] = 24] = "MAV_TYPE_VTOL_TILTWING";
// VTOL reserved 5
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_VTOL_RESERVED5"] = 25] = "MAV_TYPE_VTOL_RESERVED5";
// Gimbal
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_GIMBAL"] = 26] = "MAV_TYPE_GIMBAL";
// ADSB system
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_ADSB"] = 27] = "MAV_TYPE_ADSB";
// Steerable, nonrigid airfoil
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_PARAFOIL"] = 28] = "MAV_TYPE_PARAFOIL";
// Dodecarotor
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_DODECAROTOR"] = 29] = "MAV_TYPE_DODECAROTOR";
// Camera
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_CAMERA"] = 30] = "MAV_TYPE_CAMERA";
// Charging station
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_CHARGING_STATION"] = 31] = "MAV_TYPE_CHARGING_STATION";
// FLARM collision avoidance system
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_FLARM"] = 32] = "MAV_TYPE_FLARM";
// Servo
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_SERVO"] = 33] = "MAV_TYPE_SERVO";
// Open Drone ID. See https://mavlink.io/en/services/opendroneid.html.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_ODID"] = 34] = "MAV_TYPE_ODID";
// Decarotor
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_DECAROTOR"] = 35] = "MAV_TYPE_DECAROTOR";
// Battery
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_BATTERY"] = 36] = "MAV_TYPE_BATTERY";
// Parachute
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_PARACHUTE"] = 37] = "MAV_TYPE_PARACHUTE";
// Log
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_LOG"] = 38] = "MAV_TYPE_LOG";
// OSD
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_OSD"] = 39] = "MAV_TYPE_OSD";
// IMU
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_IMU"] = 40] = "MAV_TYPE_IMU";
// GPS
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_GPS"] = 41] = "MAV_TYPE_GPS";
// Winch
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_WINCH"] = 42] = "MAV_TYPE_WINCH";
// Generic multirotor that does not fit into a specific type or whose type is unknown
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_GENERIC_MULTIROTOR"] = 43] = "MAV_TYPE_GENERIC_MULTIROTOR";
// Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light).
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_ILLUMINATOR"] = 44] = "MAV_TYPE_ILLUMINATOR";
// Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification.
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_SPACECRAFT_ORBITER"] = 45] = "MAV_TYPE_SPACECRAFT_ORBITER";
// A generic four-legged ground vehicle (e.g., a robot dog).
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_GROUND_QUADRUPED"] = 46] = "MAV_TYPE_GROUND_QUADRUPED";
// VTOL hybrid of helicopter and autogyro. It has a main rotor for lift and separate propellers for forward flight. The rotor must be powered for hover but can autorotate in cruise flight. See: https://en.wikipedia.org/wiki/Gyrodyne
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_VTOL_GYRODYNE"] = 47] = "MAV_TYPE_VTOL_GYRODYNE";
// Gripper
MAV_TYPEEnum[MAV_TYPEEnum["MAV_TYPE_GRIPPER"] = 48] = "MAV_TYPE_GRIPPER";
})(MAV_TYPEEnum || (MAV_TYPEEnum = {}));
// These flags encode the MAV mode, see MAV_MODE enum for useful combinations.
var MAV_MODE_FLAGEnum;
(function (MAV_MODE_FLAGEnum) {
// 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state.
MAV_MODE_FLAGEnum[MAV_MODE_FLAGEnum["MAV_MODE_FLAG_SAFETY_ARMED"] = 128] = "MAV_MODE_FLAG_SAFETY_ARMED";
// 0b01000000 remote control input is enabled.
MAV_MODE_FLAGEnum[MAV_MODE_FLAGEnum["MAV_MODE_FLAG_MANUAL_INPUT_ENABLED"] = 64] = "MAV_MODE_FLAG_MANUAL_INPUT_ENABLED";
// 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational.
MAV_MODE_FLAGEnum[MAV_MODE_FLAGEnum["MAV_MODE_FLAG_HIL_ENABLED"] = 32] = "MAV_MODE_FLAG_HIL_ENABLED";
// 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around.
MAV_MODE_FLAGEnum[MAV_MODE_FLAGEnum["MAV_MODE_FLAG_STABILIZE_ENABLED"] = 16] = "MAV_MODE_FLAG_STABILIZE_ENABLED";
// 0b00001000 guided mode enabled, system flies waypoints / mission items.
MAV_MODE_FLAGEnum[MAV_MODE_FLAGEnum["MAV_MODE_FLAG_GUIDED_ENABLED"] = 8] = "MAV_MODE_FLAG_GUIDED_ENABLED";
// 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation.
MAV_MODE_FLAGEnum[MAV_MODE_FLAGEnum["MAV_MODE_FLAG_AUTO_ENABLED"] = 4] = "MAV_MODE_FLAG_AUTO_ENABLED";
// 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations.
MAV_MODE_FLAGEnum[MAV_MODE_FLAGEnum["MAV_MODE_FLAG_TEST_ENABLED"] = 2] = "MAV_MODE_FLAG_TEST_ENABLED";
// 0b00000001 system-specific custom mode is enabled. When using this flag to enable a custom mode all other flags should be ignored.
MAV_MODE_FLAGEnum[MAV_MODE_FLAGEnum["MAV_MODE_FLAG_CUSTOM_MODE_ENABLED"] = 1] = "MAV_MODE_FLAG_CUSTOM_MODE_ENABLED";
})(MAV_MODE_FLAGEnum || (MAV_MODE_FLAGEnum = {}));
// These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not.
var MAV_MODE_FLAG_DECODE_POSITIONEnum;
(function (MAV_MODE_FLAG_DECODE_POSITIONEnum) {
// First bit: 10000000
MAV_MODE_FLAG_DECODE_POSITIONEnum[MAV_MODE_FLAG_DECODE_POSITIONEnum["MAV_MODE_FLAG_DECODE_POSITION_SAFETY"] = 128] = "MAV_MODE_FLAG_DECODE_POSITION_SAFETY";
// Second bit: 01000000
MAV_MODE_FLAG_DECODE_POSITIONEnum[MAV_MODE_FLAG_DECODE_POSITIONEnum["MAV_MODE_FLAG_DECODE_POSITION_MANUAL"] = 64] = "MAV_MODE_FLAG_DECODE_POSITION_MANUAL";
// Third bit: 00100000
MAV_MODE_FLAG_DECODE_POSITIONEnum[MAV_MODE_FLAG_DECODE_POSITIONEnum["MAV_MODE_FLAG_DECODE_POSITION_HIL"] = 32] = "MAV_MODE_FLAG_DECODE_POSITION_HIL";
// Fourth bit: 00010000
MAV_MODE_FLAG_DECODE_POSITIONEnum[MAV_MODE_FLAG_DECODE_POSITIONEnum["MAV_MODE_FLAG_DECODE_POSITION_STABILIZE"] = 16] = "MAV_MODE_FLAG_DECODE_POSITION_STABILIZE";
// Fifth bit: 00001000
MAV_MODE_FLAG_DECODE_POSITIONEnum[MAV_MODE_FLAG_DECODE_POSITIONEnum["MAV_MODE_FLAG_DECODE_POSITION_GUIDED"] = 8] = "MAV_MODE_FLAG_DECODE_POSITION_GUIDED";
// Sixth bit: 00000100
MAV_MODE_FLAG_DECODE_POSITIONEnum[MAV_MODE_FLAG_DECODE_POSITIONEnum["MAV_MODE_FLAG_DECODE_POSITION_AUTO"] = 4] = "MAV_MODE_FLAG_DECODE_POSITION_AUTO";
// Seventh bit: 00000010
MAV_MODE_FLAG_DECODE_POSITIONEnum[MAV_MODE_FLAG_DECODE_POSITIONEnum["MAV_MODE_FLAG_DECODE_POSITION_TEST"] = 2] = "MAV_MODE_FLAG_DECODE_POSITION_TEST";
// Eighth bit: 00000001
MAV_MODE_FLAG_DECODE_POSITIONEnum[MAV_MODE_FLAG_DECODE_POSITIONEnum["MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE"] = 1] = "MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE";
})(MAV_MODE_FLAG_DECODE_POSITIONEnum || (MAV_MODE_FLAG_DECODE_POSITIONEnum = {}));
var MAV_STATEEnum;
(function (MAV_STATEEnum) {
// Uninitialized system, state is unknown.
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_UNINIT"] = 0] = "MAV_STATE_UNINIT";
// System is booting up.
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_BOOT"] = 1] = "MAV_STATE_BOOT";
// System is calibrating and not flight-ready.
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_CALIBRATING"] = 2] = "MAV_STATE_CALIBRATING";
// System is grounded and on standby. It can be launched any time.
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_STANDBY"] = 3] = "MAV_STATE_STANDBY";
// System is active and might be already airborne. Motors are engaged.
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_ACTIVE"] = 4] = "MAV_STATE_ACTIVE";
// System is in a non-normal flight mode (failsafe). It can however still navigate.
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_CRITICAL"] = 5] = "MAV_STATE_CRITICAL";
// System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down.
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_EMERGENCY"] = 6] = "MAV_STATE_EMERGENCY";
// System just initialized its power-down sequence, will shut down now.
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_POWEROFF"] = 7] = "MAV_STATE_POWEROFF";
// System is terminating itself (failsafe or commanded).
MAV_STATEEnum[MAV_STATEEnum["MAV_STATE_FLIGHT_TERMINATION"] = 8] = "MAV_STATE_FLIGHT_TERMINATION";
})(MAV_STATEEnum || (MAV_STATEEnum = {}));
// Legacy component ID values for particular types of hardware/software that might make up a MAVLink system (autopilot, cameras, servos, avoidance systems etc.).
// Components are not required or expected to use IDs with names that correspond to their type or function, but may choose to do so.
// Using an ID that matches the type may slightly reduce the chances of component id clashes, as, for historical reasons, it is less likely to be used by some other type of component.
// System integration will still need to ensure that all components have unique IDs.
// Component IDs are used for addressing messages to a particular component within a system.
// A component can use any unique ID between 1 and 255 (MAV_COMP_ID_ALL value is the broadcast address, used to send to all components).
// Historically component ID were also used for identifying the type of component.
// New code must not use component IDs to infer the component type, but instead check the MAV_TYPE in the HEARTBEAT message!
var MAV_COMPONENTEnum;
(function (MAV_COMPONENTEnum) {
// Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ALL"] = 0] = "MAV_COMP_ID_ALL";
// System flight controller component ("autopilot"). Only one autopilot is expected in a particular system.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_AUTOPILOT1"] = 1] = "MAV_COMP_ID_AUTOPILOT1";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER1"] = 25] = "MAV_COMP_ID_USER1";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER2"] = 26] = "MAV_COMP_ID_USER2";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER3"] = 27] = "MAV_COMP_ID_USER3";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER4"] = 28] = "MAV_COMP_ID_USER4";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER5"] = 29] = "MAV_COMP_ID_USER5";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER6"] = 30] = "MAV_COMP_ID_USER6";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER7"] = 31] = "MAV_COMP_ID_USER7";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER8"] = 32] = "MAV_COMP_ID_USER8";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER9"] = 33] = "MAV_COMP_ID_USER9";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER10"] = 34] = "MAV_COMP_ID_USER10";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER11"] = 35] = "MAV_COMP_ID_USER11";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER12"] = 36] = "MAV_COMP_ID_USER12";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER13"] = 37] = "MAV_COMP_ID_USER13";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER14"] = 38] = "MAV_COMP_ID_USER14";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER15"] = 39] = "MAV_COMP_ID_USER15";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER16"] = 40] = "MAV_COMP_ID_USER16";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER17"] = 41] = "MAV_COMP_ID_USER17";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER18"] = 42] = "MAV_COMP_ID_USER18";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER19"] = 43] = "MAV_COMP_ID_USER19";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER20"] = 44] = "MAV_COMP_ID_USER20";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER21"] = 45] = "MAV_COMP_ID_USER21";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER22"] = 46] = "MAV_COMP_ID_USER22";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER23"] = 47] = "MAV_COMP_ID_USER23";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER24"] = 48] = "MAV_COMP_ID_USER24";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER25"] = 49] = "MAV_COMP_ID_USER25";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER26"] = 50] = "MAV_COMP_ID_USER26";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER27"] = 51] = "MAV_COMP_ID_USER27";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER28"] = 52] = "MAV_COMP_ID_USER28";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER29"] = 53] = "MAV_COMP_ID_USER29";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER30"] = 54] = "MAV_COMP_ID_USER30";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER31"] = 55] = "MAV_COMP_ID_USER31";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER32"] = 56] = "MAV_COMP_ID_USER32";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER33"] = 57] = "MAV_COMP_ID_USER33";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER34"] = 58] = "MAV_COMP_ID_USER34";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER35"] = 59] = "MAV_COMP_ID_USER35";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER36"] = 60] = "MAV_COMP_ID_USER36";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER37"] = 61] = "MAV_COMP_ID_USER37";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER38"] = 62] = "MAV_COMP_ID_USER38";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER39"] = 63] = "MAV_COMP_ID_USER39";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER40"] = 64] = "MAV_COMP_ID_USER40";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER41"] = 65] = "MAV_COMP_ID_USER41";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER42"] = 66] = "MAV_COMP_ID_USER42";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER43"] = 67] = "MAV_COMP_ID_USER43";
// Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_TELEMETRY_RADIO"] = 68] = "MAV_COMP_ID_TELEMETRY_RADIO";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER45"] = 69] = "MAV_COMP_ID_USER45";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER46"] = 70] = "MAV_COMP_ID_USER46";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER47"] = 71] = "MAV_COMP_ID_USER47";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER48"] = 72] = "MAV_COMP_ID_USER48";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER49"] = 73] = "MAV_COMP_ID_USER49";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER50"] = 74] = "MAV_COMP_ID_USER50";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER51"] = 75] = "MAV_COMP_ID_USER51";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER52"] = 76] = "MAV_COMP_ID_USER52";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER53"] = 77] = "MAV_COMP_ID_USER53";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER54"] = 78] = "MAV_COMP_ID_USER54";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER55"] = 79] = "MAV_COMP_ID_USER55";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER56"] = 80] = "MAV_COMP_ID_USER56";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER57"] = 81] = "MAV_COMP_ID_USER57";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER58"] = 82] = "MAV_COMP_ID_USER58";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER59"] = 83] = "MAV_COMP_ID_USER59";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER60"] = 84] = "MAV_COMP_ID_USER60";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER61"] = 85] = "MAV_COMP_ID_USER61";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER62"] = 86] = "MAV_COMP_ID_USER62";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER63"] = 87] = "MAV_COMP_ID_USER63";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER64"] = 88] = "MAV_COMP_ID_USER64";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER65"] = 89] = "MAV_COMP_ID_USER65";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER66"] = 90] = "MAV_COMP_ID_USER66";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER67"] = 91] = "MAV_COMP_ID_USER67";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER68"] = 92] = "MAV_COMP_ID_USER68";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER69"] = 93] = "MAV_COMP_ID_USER69";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER70"] = 94] = "MAV_COMP_ID_USER70";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER71"] = 95] = "MAV_COMP_ID_USER71";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER72"] = 96] = "MAV_COMP_ID_USER72";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER73"] = 97] = "MAV_COMP_ID_USER73";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER74"] = 98] = "MAV_COMP_ID_USER74";
// Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_USER75"] = 99] = "MAV_COMP_ID_USER75";
// Camera #1.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_CAMERA"] = 100] = "MAV_COMP_ID_CAMERA";
// Camera #2.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_CAMERA2"] = 101] = "MAV_COMP_ID_CAMERA2";
// Camera #3.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_CAMERA3"] = 102] = "MAV_COMP_ID_CAMERA3";
// Camera #4.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_CAMERA4"] = 103] = "MAV_COMP_ID_CAMERA4";
// Camera #5.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_CAMERA5"] = 104] = "MAV_COMP_ID_CAMERA5";
// Camera #6.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_CAMERA6"] = 105] = "MAV_COMP_ID_CAMERA6";
// Servo #1.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO1"] = 140] = "MAV_COMP_ID_SERVO1";
// Servo #2.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO2"] = 141] = "MAV_COMP_ID_SERVO2";
// Servo #3.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO3"] = 142] = "MAV_COMP_ID_SERVO3";
// Servo #4.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO4"] = 143] = "MAV_COMP_ID_SERVO4";
// Servo #5.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO5"] = 144] = "MAV_COMP_ID_SERVO5";
// Servo #6.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO6"] = 145] = "MAV_COMP_ID_SERVO6";
// Servo #7.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO7"] = 146] = "MAV_COMP_ID_SERVO7";
// Servo #8.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO8"] = 147] = "MAV_COMP_ID_SERVO8";
// Servo #9.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO9"] = 148] = "MAV_COMP_ID_SERVO9";
// Servo #10.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO10"] = 149] = "MAV_COMP_ID_SERVO10";
// Servo #11.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO11"] = 150] = "MAV_COMP_ID_SERVO11";
// Servo #12.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO12"] = 151] = "MAV_COMP_ID_SERVO12";
// Servo #13.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO13"] = 152] = "MAV_COMP_ID_SERVO13";
// Servo #14.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SERVO14"] = 153] = "MAV_COMP_ID_SERVO14";
// Gimbal #1.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_GIMBAL"] = 154] = "MAV_COMP_ID_GIMBAL";
// Logging component.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_LOG"] = 155] = "MAV_COMP_ID_LOG";
// Automatic Dependent Surveillance-Broadcast (ADS-B) component.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ADSB"] = 156] = "MAV_COMP_ID_ADSB";
// On Screen Display (OSD) devices for video links.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_OSD"] = 157] = "MAV_COMP_ID_OSD";
// Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_PERIPHERAL"] = 158] = "MAV_COMP_ID_PERIPHERAL";
// Gimbal ID for QX1.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_QX1_GIMBAL"] = 159] = "MAV_COMP_ID_QX1_GIMBAL";
// FLARM collision alert component.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_FLARM"] = 160] = "MAV_COMP_ID_FLARM";
// Parachute component.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_PARACHUTE"] = 161] = "MAV_COMP_ID_PARACHUTE";
// Winch component.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_WINCH"] = 169] = "MAV_COMP_ID_WINCH";
// Gimbal #2.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_GIMBAL2"] = 171] = "MAV_COMP_ID_GIMBAL2";
// Gimbal #3.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_GIMBAL3"] = 172] = "MAV_COMP_ID_GIMBAL3";
// Gimbal #4
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_GIMBAL4"] = 173] = "MAV_COMP_ID_GIMBAL4";
// Gimbal #5.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_GIMBAL5"] = 174] = "MAV_COMP_ID_GIMBAL5";
// Gimbal #6.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_GIMBAL6"] = 175] = "MAV_COMP_ID_GIMBAL6";
// Battery #1.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_BATTERY"] = 180] = "MAV_COMP_ID_BATTERY";
// Battery #2.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_BATTERY2"] = 181] = "MAV_COMP_ID_BATTERY2";
// CAN over MAVLink client.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_MAVCAN"] = 189] = "MAV_COMP_ID_MAVCAN";
// Component that can generate/supply a mission flight plan (e.g. GCS or developer API).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_MISSIONPLANNER"] = 190] = "MAV_COMP_ID_MISSIONPLANNER";
// Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ONBOARD_COMPUTER"] = 191] = "MAV_COMP_ID_ONBOARD_COMPUTER";
// Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ONBOARD_COMPUTER2"] = 192] = "MAV_COMP_ID_ONBOARD_COMPUTER2";
// Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ONBOARD_COMPUTER3"] = 193] = "MAV_COMP_ID_ONBOARD_COMPUTER3";
// Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ONBOARD_COMPUTER4"] = 194] = "MAV_COMP_ID_ONBOARD_COMPUTER4";
// Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_PATHPLANNER"] = 195] = "MAV_COMP_ID_PATHPLANNER";
// Component that plans a collision free path between two points.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_OBSTACLE_AVOIDANCE"] = 196] = "MAV_COMP_ID_OBSTACLE_AVOIDANCE";
// Component that provides position estimates using VIO techniques.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY"] = 197] = "MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY";
// Component that manages pairing of vehicle and GCS.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_PAIRING_MANAGER"] = 198] = "MAV_COMP_ID_PAIRING_MANAGER";
// Inertial Measurement Unit (IMU) #1.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_IMU"] = 200] = "MAV_COMP_ID_IMU";
// Inertial Measurement Unit (IMU) #2.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_IMU_2"] = 201] = "MAV_COMP_ID_IMU_2";
// Inertial Measurement Unit (IMU) #3.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_IMU_3"] = 202] = "MAV_COMP_ID_IMU_3";
// GPS #1.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_GPS"] = 220] = "MAV_COMP_ID_GPS";
// GPS #2.
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_GPS2"] = 221] = "MAV_COMP_ID_GPS2";
// Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ODID_TXRX_1"] = 236] = "MAV_COMP_ID_ODID_TXRX_1";
// Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ODID_TXRX_2"] = 237] = "MAV_COMP_ID_ODID_TXRX_2";
// Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ODID_TXRX_3"] = 238] = "MAV_COMP_ID_ODID_TXRX_3";
// Component to bridge MAVLink to UDP (i.e. from a UART).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_UDP_BRIDGE"] = 240] = "MAV_COMP_ID_UDP_BRIDGE";
// Component to bridge to UART (i.e. from UDP).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_UART_BRIDGE"] = 241] = "MAV_COMP_ID_UART_BRIDGE";
// Component handling TUNNEL messages (e.g. vendor specific GUI of a component).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_TUNNEL_NODE"] = 242] = "MAV_COMP_ID_TUNNEL_NODE";
// Illuminator
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_ILLUMINATOR"] = 243] = "MAV_COMP_ID_ILLUMINATOR";
// Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.).
MAV_COMPONENTEnum[MAV_COMPONENTEnum["MAV_COMP_ID_SYSTEM_CONTROL"] = 250] = "MAV_COMP_ID_SYSTEM_CONTROL";
})(MAV_COMPONENTEnum || (MAV_COMPONENTEnum = {}));
// Enum used to indicate true or false (also: success or failure, enabled or disabled, active or inactive).
var MAV_BOOLEnum;
(function (MAV_BOOLEnum) {
// False.
MAV_BOOLEnum[MAV_BOOLEnum["MAV_BOOL_FALSE"] = 0] = "MAV_BOOL_FALSE";
// True.
MAV_BOOLEnum[MAV_BOOLEnum["MAV_BOOL_TRUE"] = 1] = "MAV_BOOL_TRUE";
})(MAV_BOOLEnum || (MAV_BOOLEnum = {}));
// Auto-generated TypeScript message interfaces for standard dialect
// Type guard functions
function isHeartbeat(msg) {
return msg.message_name === 'HEARTBEAT';
}
function isProtocolVersion(msg) {
return msg.message_name === 'PROTOCOL_VERSION';
}
// Auto-generated decoder and parser for standard dialect
// Generated from MAVLink XML definitions
// Embedded MAVLink CRC implementation
const CRC_EXTRA = {
0: 50,
300: 0
};
class MAVLinkCRC {
static calculate(data, crcExtra) {
let crc = 0xffff;
// Process all message bytes using MCRF4XX algorithm
for (let i = 0; i < data.length; i++) {
let tmp = data[i] ^ (crc & 0xff);
tmp = (tmp ^ (tmp << 4)) & 0xff;
crc = ((crc >> 8) ^ (tmp << 8) ^ (tmp << 3) ^ (tmp >> 4)) & 0xffff;
}
// Add CRC_EXTRA byte using the same algorithm
let tmp = crcExtra ^ (crc & 0xff);
tmp = (tmp ^ (tmp << 4)) & 0xff;
crc = ((crc >> 8) ^ (tmp << 8) ^ (tmp << 3) ^ (tmp >> 4)) & 0xffff;
return crc;
}
static validate(data, messageId, receivedChecksum) {
const crcExtra = CRC_EXTRA[messageId];
if (crcExtra === undefined) {
return false;
}
const calculatedChecksum = this.calculate(data, crcExtra);
return calculatedChecksum === receivedChecksum;
}
}
// Base dialect parser class
class DialectParser {
constructor(dialectName) {
this.messageDefinitions = new Map();
this.buffer = new Uint8Array(0);
this.dialectName = dialectName;
}
parseBytes(data) {
const results = [];
if (!data || data.length === 0) {
return results;
}
// Append new data to buffer
const newBuffer = new Uint8Array(this.buffer.length + data.length);
newBuffer.set(this.buffer);
newBuffer.set(data, this.buffer.length);
this.buffer = newBuffer;
let offset = 0;
// Parse MAVLink frames from buffer
while (offset < this.buffer.length) {
const frameResult = this.tryParseFrame(this.buffer.slice(offset));
if (frameResult.frame) {
const message = this.decode(frameResult.frame);
results.push(message);
offset += frameResult.bytesConsumed;
}
else if (frameResult.bytesConsumed > 0) {
// Skip invalid bytes
offset += frameResult.bytesConsumed;
}
else {
// Not enough data for a complete frame
break;
}
}
// Keep remaining data in buffer
this.buffer = this.buffer.slice(offset);
return results;
}
tryParseFrame(data) {
if (data.length < 8) {
return { bytesConsumed: 0 };
}
let offset = 0;
// Find magic byte
while (offset < data.length && data[offset] !== 0xFE && data[offset] !== 0xFD) {
offset++;
}
if (offset === data.length) {
return { bytesConsumed: data.length };
}
const magic = data[offset];
const isV2 = magic === 0xFD;
if (data.length - offset < (isV2 ? 12 : 8)) {
return { bytesConsumed: offset };
}
let frameOffset = offset;
const frame = { magic };
frameOffset++;
frame.length = data[frameOffset++];
if (isV2) {
frame.incompatible_flags = data[frameOffset++];
frame.compatible_flags = data[frameOffset++];
}
frame.sequence = data[frameOffset++];
frame.system_id = data[frameOffset++];
frame.component_id = data[frameOffset++];
frame.message_id = data[frameOffset++];
if (isV2 && data.length - frameOffset >= 2) {
frame.me