UNPKG

mavlink-mappings

Version:
272 lines (271 loc) 8.32 kB
import { uint64_t, uint32_t, uint16_t, uint8_t, int32_t, int16_t } from './types'; import { MavLinkPacketRegistry, MavLinkPacketField, MavLinkData } from './mavlink'; /** * Enum used to indicate true or false (also: success or failure, enabled or disabled, active or * inactive). */ export declare enum MavBool { /** * False. */ 'FALSE' = 0, /** * True. */ 'TRUE' = 1 } /** * Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this * capability. */ export declare enum MavProtocolCapability { /** * Autopilot supports the MISSION_ITEM float message type. Note that MISSION_ITEM is deprecated, and * autopilots should use MISSION_ITEM_INT instead. */ 'MISSION_FLOAT' = 1, /** * Autopilot supports the new param float message type. */ 'PARAM_FLOAT' = 2, /** * Autopilot supports MISSION_ITEM_INT scaled integer message type. Note that this flag must always be * set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than * MISSION_ITEM, which is deprecated). */ 'MISSION_INT' = 4, /** * Autopilot supports COMMAND_INT scaled integer message type. */ 'COMMAND_INT' = 8, /** * Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: * https://mavlink.io/en/services/parameter.html#parameter-encoding. Note that either this flag or * MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported. */ 'PARAM_ENCODE_BYTEWISE' = 16, /** * Autopilot supports the File Transfer Protocol v1: https://mavlink.io/en/services/ftp.html. */ 'FTP' = 32, /** * Autopilot supports commanding attitude offboard. */ 'SET_ATTITUDE_TARGET' = 64, /** * Autopilot supports commanding position and velocity targets in local NED frame. */ 'SET_POSITION_TARGET_LOCAL_NED' = 128, /** * Autopilot supports commanding position and velocity targets in global scaled integers. */ 'SET_POSITION_TARGET_GLOBAL_INT' = 256, /** * Autopilot supports terrain protocol / data handling. */ 'TERRAIN' = 512, /** * Reserved for future use. */ 'RESERVED3' = 1024, /** * Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination). */ 'FLIGHT_TERMINATION' = 2048, /** * Autopilot supports onboard compass calibration. */ 'COMPASS_CALIBRATION' = 4096, /** * Autopilot supports MAVLink version 2. */ 'MAVLINK2' = 8192, /** * Autopilot supports mission fence protocol. */ 'MISSION_FENCE' = 16384, /** * Autopilot supports mission rally point protocol. */ 'MISSION_RALLY' = 32768, /** * Reserved for future use. */ 'RESERVED2' = 65536, /** * Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: * https://mavlink.io/en/services/parameter.html#parameter-encoding. Note that either this flag or * MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported. */ 'PARAM_ENCODE_C_CAST' = 131072, /** * This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other * messages can be requested. */ 'COMPONENT_IMPLEMENTS_GIMBAL_MANAGER' = 262144, /** * Component supports locking control to a particular GCS independent of its system (via * MAV_CMD_REQUEST_OPERATOR_CONTROL). */ 'COMPONENT_ACCEPTS_GCS_CONTROL' = 524288, /** * Autopilot has a connected gripper. MAVLink Grippers would set MAV_TYPE_GRIPPER instead. */ 'GRIPPER' = 1048576 } /** * These values define the type of firmware release. These values indicate the first version or release * of this type. For example the first alpha release would be 64, the second would be 65. */ export declare enum FirmwareVersionType { /** * development release */ 'DEV' = 0, /** * alpha release */ 'ALPHA' = 64, /** * beta release */ 'BETA' = 128, /** * release candidate */ 'RC' = 192, /** * official stable release */ 'OFFICIAL' = 255 } /** * The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame * (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not * sufficient. */ export declare class GlobalPositionInt extends MavLinkData { static MSG_ID: number; static MSG_NAME: string; static PAYLOAD_LENGTH: number; static MAGIC_NUMBER: number; static FIELDS: MavLinkPacketField[]; constructor(); /** * Timestamp (time since system boot). * Units: ms */ timeBootMs: uint32_t; /** * Latitude, expressed * Units: degE7 */ lat: int32_t; /** * Longitude, expressed * Units: degE7 */ lon: int32_t; /** * Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. * Units: mm */ alt: int32_t; /** * Altitude above home * Units: mm */ relativeAlt: int32_t; /** * Ground X Speed (Latitude, positive north) * Units: cm/s */ vx: int16_t; /** * Ground Y Speed (Longitude, positive east) * Units: cm/s */ vy: int16_t; /** * Ground Z Speed (Altitude, positive down) * Units: cm/s */ vz: int16_t; /** * Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX * Units: cdeg */ hdg: uint16_t; } /** * Version and capability of autopilot software. This should be emitted in response to a request with * MAV_CMD_REQUEST_MESSAGE. */ export declare class AutopilotVersion extends MavLinkData { static MSG_ID: number; static MSG_NAME: string; static PAYLOAD_LENGTH: number; static MAGIC_NUMBER: number; static FIELDS: MavLinkPacketField[]; constructor(); /** * Bitmap of capabilities */ capabilities: MavProtocolCapability; /** * Firmware version number. The field must be encoded as 4 bytes, where each byte (shown from MSB to * LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE). */ flightSwVersion: uint32_t; /** * Middleware version number */ middlewareSwVersion: uint32_t; /** * Operating system version number */ osSwVersion: uint32_t; /** * HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field * specify a board type from an enumeration stored at * https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt and with extensive additions at * https://github.com/ArduPilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt */ boardVersion: uint32_t; /** * Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, * but should allow to identify the commit using the main version number even for very large code * bases. */ flightCustomVersion: uint8_t[]; /** * Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, * but should allow to identify the commit using the main version number even for very large code * bases. */ middlewareCustomVersion: uint8_t[]; /** * Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, * but should allow to identify the commit using the main version number even for very large code * bases. */ osCustomVersion: uint8_t[]; /** * ID of the board vendor */ vendorId: uint16_t; /** * ID of the product */ productId: uint16_t; /** * UID if provided by hardware (see uid2) */ uid: uint64_t; /** * UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, * otherwise use uid) */ uid2: uint8_t[]; } export declare const REGISTRY: MavLinkPacketRegistry;