mavlink-mappings
Version:
MavLink message definitions
789 lines • 37.7 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.COMMANDS = exports.REGISTRY = exports.QshotDoConfigureCommand = exports.Storm32DoGimbalManagerSetupCommand = exports.Storm32DoGimbalManagerControlPitchyawCommand = exports.MlrsRadioLinkInformation = exports.MlrsRadioLinkStats = exports.FrskyPassthroughArray = exports.Storm32GimbalManagerCorrectRoll = exports.Storm32GimbalManagerControlPitchyaw = exports.Storm32GimbalManagerControl = exports.Storm32GimbalManagerStatus = exports.Storm32GimbalManagerInformation = exports.MlrsRadioLinkType = exports.MlrsRadioLinkStatsFlags = exports.MavCmd = exports.MavQshotMode = exports.MavStorm32GimbalManagerProfile = exports.MavStorm32GimbalManagerClient = exports.MavStorm32GimbalManagerFlags = exports.MavStorm32GimbalManagerCapFlags = exports.MavStorm32TunnelPayloadType = void 0;
const mavlink_1 = require("./mavlink");
const common_1 = require("./common");
/**
* MAV_STORM32_TUNNEL_PAYLOAD_TYPE
*/
var MavStorm32TunnelPayloadType;
(function (MavStorm32TunnelPayloadType) {
/**
* Registered for STorM32 gimbal controller. For communication with gimbal or camera.
*/
MavStorm32TunnelPayloadType[MavStorm32TunnelPayloadType["STORM32_CH1_IN"] = 200] = "STORM32_CH1_IN";
/**
* Registered for STorM32 gimbal controller. For communication with gimbal or camera.
*/
MavStorm32TunnelPayloadType[MavStorm32TunnelPayloadType["STORM32_CH1_OUT"] = 201] = "STORM32_CH1_OUT";
/**
* Registered for STorM32 gimbal controller. For communication with gimbal.
*/
MavStorm32TunnelPayloadType[MavStorm32TunnelPayloadType["STORM32_CH2_IN"] = 202] = "STORM32_CH2_IN";
/**
* Registered for STorM32 gimbal controller. For communication with gimbal.
*/
MavStorm32TunnelPayloadType[MavStorm32TunnelPayloadType["STORM32_CH2_OUT"] = 203] = "STORM32_CH2_OUT";
/**
* Registered for STorM32 gimbal controller. For communication with camera.
*/
MavStorm32TunnelPayloadType[MavStorm32TunnelPayloadType["STORM32_CH3_IN"] = 204] = "STORM32_CH3_IN";
/**
* Registered for STorM32 gimbal controller. For communication with camera.
*/
MavStorm32TunnelPayloadType[MavStorm32TunnelPayloadType["STORM32_CH3_OUT"] = 205] = "STORM32_CH3_OUT";
})(MavStorm32TunnelPayloadType = exports.MavStorm32TunnelPayloadType || (exports.MavStorm32TunnelPayloadType = {}));
/**
* Gimbal manager capability flags.
*/
var MavStorm32GimbalManagerCapFlags;
(function (MavStorm32GimbalManagerCapFlags) {
/**
* The gimbal manager supports several profiles.
*/
MavStorm32GimbalManagerCapFlags[MavStorm32GimbalManagerCapFlags["HAS_PROFILES"] = 1] = "HAS_PROFILES";
})(MavStorm32GimbalManagerCapFlags = exports.MavStorm32GimbalManagerCapFlags || (exports.MavStorm32GimbalManagerCapFlags = {}));
/**
* Flags for gimbal manager operation. Used for setting and reporting, unless specified otherwise. If a
* setting has been accepted by the gimbal manager is reported in the STORM32_GIMBAL_MANAGER_STATUS
* message.
*/
var MavStorm32GimbalManagerFlags;
(function (MavStorm32GimbalManagerFlags) {
/**
* Request to set RC input to active, or report RC input is active. Implies RC mixed. RC exclusive is
* achieved by setting all clients to inactive.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["RC_ACTIVE"] = 1] = "RC_ACTIVE";
/**
* Request to set onboard/companion computer client to active, or report this client is active.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["CLIENT_ONBOARD_ACTIVE"] = 2] = "CLIENT_ONBOARD_ACTIVE";
/**
* Request to set autopliot client to active, or report this client is active.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["CLIENT_AUTOPILOT_ACTIVE"] = 4] = "CLIENT_AUTOPILOT_ACTIVE";
/**
* Request to set GCS client to active, or report this client is active.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["CLIENT_GCS_ACTIVE"] = 8] = "CLIENT_GCS_ACTIVE";
/**
* Request to set camera client to active, or report this client is active.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["CLIENT_CAMERA_ACTIVE"] = 16] = "CLIENT_CAMERA_ACTIVE";
/**
* Request to set GCS2 client to active, or report this client is active.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["CLIENT_GCS2_ACTIVE"] = 32] = "CLIENT_GCS2_ACTIVE";
/**
* Request to set camera2 client to active, or report this client is active.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["CLIENT_CAMERA2_ACTIVE"] = 64] = "CLIENT_CAMERA2_ACTIVE";
/**
* Request to set custom client to active, or report this client is active.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["CLIENT_CUSTOM_ACTIVE"] = 128] = "CLIENT_CUSTOM_ACTIVE";
/**
* Request to set custom2 client to active, or report this client is active.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["CLIENT_CUSTOM2_ACTIVE"] = 256] = "CLIENT_CUSTOM2_ACTIVE";
/**
* Request supervision. This flag is only for setting, it is not reported.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["SET_SUPERVISON"] = 512] = "SET_SUPERVISON";
/**
* Release supervision. This flag is only for setting, it is not reported.
*/
MavStorm32GimbalManagerFlags[MavStorm32GimbalManagerFlags["SET_RELEASE"] = 1024] = "SET_RELEASE";
})(MavStorm32GimbalManagerFlags = exports.MavStorm32GimbalManagerFlags || (exports.MavStorm32GimbalManagerFlags = {}));
/**
* Gimbal manager client ID. In a prioritizing profile, the priorities are determined by the
* implementation; they could e.g. be custom1 > onboard > GCS > autopilot/camera > GCS2 > custom2.
*/
var MavStorm32GimbalManagerClient;
(function (MavStorm32GimbalManagerClient) {
/**
* For convenience.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["NONE"] = 0] = "NONE";
/**
* This is the onboard/companion computer client.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["ONBOARD"] = 1] = "ONBOARD";
/**
* This is the autopilot client.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["AUTOPILOT"] = 2] = "AUTOPILOT";
/**
* This is the GCS client.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["GCS"] = 3] = "GCS";
/**
* This is the camera client.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["CAMERA"] = 4] = "CAMERA";
/**
* This is the GCS2 client.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["GCS2"] = 5] = "GCS2";
/**
* This is the camera2 client.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["CAMERA2"] = 6] = "CAMERA2";
/**
* This is the custom client.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["CUSTOM"] = 7] = "CUSTOM";
/**
* This is the custom2 client.
*/
MavStorm32GimbalManagerClient[MavStorm32GimbalManagerClient["CUSTOM2"] = 8] = "CUSTOM2";
})(MavStorm32GimbalManagerClient = exports.MavStorm32GimbalManagerClient || (exports.MavStorm32GimbalManagerClient = {}));
/**
* Gimbal manager profiles. Only standard profiles are defined. Any implementation can define its own
* profile(s) in addition, and should use enum values > 16.
*/
var MavStorm32GimbalManagerProfile;
(function (MavStorm32GimbalManagerProfile) {
/**
* Default profile. Implementation specific.
*/
MavStorm32GimbalManagerProfile[MavStorm32GimbalManagerProfile["DEFAULT"] = 0] = "DEFAULT";
/**
* Not supported/deprecated.
*/
MavStorm32GimbalManagerProfile[MavStorm32GimbalManagerProfile["CUSTOM"] = 1] = "CUSTOM";
/**
* Profile with cooperative behavior.
*/
MavStorm32GimbalManagerProfile[MavStorm32GimbalManagerProfile["COOPERATIVE"] = 2] = "COOPERATIVE";
/**
* Profile with exclusive behavior.
*/
MavStorm32GimbalManagerProfile[MavStorm32GimbalManagerProfile["EXCLUSIVE"] = 3] = "EXCLUSIVE";
/**
* Profile with priority and cooperative behavior for equal priority.
*/
MavStorm32GimbalManagerProfile[MavStorm32GimbalManagerProfile["PRIORITY_COOPERATIVE"] = 4] = "PRIORITY_COOPERATIVE";
/**
* Profile with priority and exclusive behavior for equal priority.
*/
MavStorm32GimbalManagerProfile[MavStorm32GimbalManagerProfile["PRIORITY_EXCLUSIVE"] = 5] = "PRIORITY_EXCLUSIVE";
})(MavStorm32GimbalManagerProfile = exports.MavStorm32GimbalManagerProfile || (exports.MavStorm32GimbalManagerProfile = {}));
/**
* Enumeration of possible shot modes.
*/
var MavQshotMode;
(function (MavQshotMode) {
/**
* Undefined shot mode. Can be used to determine if qshots should be used or not.
*/
MavQshotMode[MavQshotMode["UNDEFINED"] = 0] = "UNDEFINED";
/**
* Start normal gimbal operation. Is usually used to return back from a shot.
*/
MavQshotMode[MavQshotMode["DEFAULT"] = 1] = "DEFAULT";
/**
* Load and keep safe gimbal position and stop stabilization.
*/
MavQshotMode[MavQshotMode["GIMBAL_RETRACT"] = 2] = "GIMBAL_RETRACT";
/**
* Load neutral gimbal position and keep it while stabilizing.
*/
MavQshotMode[MavQshotMode["GIMBAL_NEUTRAL"] = 3] = "GIMBAL_NEUTRAL";
/**
* Start mission with gimbal control.
*/
MavQshotMode[MavQshotMode["GIMBAL_MISSION"] = 4] = "GIMBAL_MISSION";
/**
* Start RC gimbal control.
*/
MavQshotMode[MavQshotMode["GIMBAL_RC_CONTROL"] = 5] = "GIMBAL_RC_CONTROL";
/**
* Start gimbal tracking the point specified by Lat, Lon, Alt.
*/
MavQshotMode[MavQshotMode["POI_TARGETING"] = 6] = "POI_TARGETING";
/**
* Start gimbal tracking the system with specified system ID.
*/
MavQshotMode[MavQshotMode["SYSID_TARGETING"] = 7] = "SYSID_TARGETING";
/**
* Start 2-point cable cam quick shot.
*/
MavQshotMode[MavQshotMode["CABLECAM_2POINT"] = 8] = "CABLECAM_2POINT";
/**
* Start gimbal tracking the home location.
*/
MavQshotMode[MavQshotMode["HOME_TARGETING"] = 9] = "HOME_TARGETING";
})(MavQshotMode = exports.MavQshotMode || (exports.MavQshotMode = {}));
/**
* MAV_CMD
*/
var MavCmd;
(function (MavCmd) {
/**
* Command to a gimbal manager to control the gimbal tilt and pan angles. It is possible to set
* combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get
* to this angle at a certain angular rate, or an angular rate only will result in continuous turning.
* NaN is to be used to signal unset. A gimbal device is never to react to this command.
* @param1 Pitch angle[deg] (min: -180, max: 180) Pitch/tilt angle (positive: tilt up). NaN to be ignored.
* @param2 Yaw angle[deg] (min: -180, max: 180) Yaw/pan angle (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.
* @param3 Pitch rate[deg/s] Pitch/tilt rate (positive: tilt up). NaN to be ignored.
* @param4 Yaw rate[deg/s] Yaw/pan rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.
* @param5 Gimbal device flags Gimbal device flags to be applied.
* @param6 Gimbal manager flags Gimbal manager flags to be applied.
* @param7 Gimbal ID and client Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. The client is copied into bits 8-15.
*/
MavCmd[MavCmd["STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW"] = 60002] = "STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW";
/**
* Command to configure a gimbal manager. A gimbal device is never to react to this command. The
* selected profile is reported in the STORM32_GIMBAL_MANAGER_STATUS message.
* @param1 Profile Gimbal manager profile (0 = default).
* @param7 Gimbal ID Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals.
*/
MavCmd[MavCmd["STORM32_DO_GIMBAL_MANAGER_SETUP"] = 60010] = "STORM32_DO_GIMBAL_MANAGER_SETUP";
/**
* Command to set the shot manager mode.
* @param1 Mode Set shot mode.
* @param2 Shot state or command Set shot state or command. The allowed values are specific to the selected shot mode.
*/
MavCmd[MavCmd["QSHOT_DO_CONFIGURE"] = 60020] = "QSHOT_DO_CONFIGURE";
})(MavCmd = exports.MavCmd || (exports.MavCmd = {}));
/**
* RADIO_LINK_STATS flags (bitmask). The RX_RECEIVE and TX_RECEIVE flags indicate from which antenna
* the received data are taken for processing. If a flag is set then the data received on antenna2 is
* processed, else the data received on antenna1 is used. The RX_TRANSMIT and TX_TRANSMIT flags specify
* which antenna are transmitting data. Both antenna 1 and antenna 2 transmit flags can be set
* simultaneously, e.g., in case of dual-band or dual-frequency systems. If neither flag is set then
* antenna 1 should be assumed.
*/
var MlrsRadioLinkStatsFlags;
(function (MlrsRadioLinkStatsFlags) {
/**
* Rssi values are in negative dBm. Values 1..254 corresponds to -1..-254 dBm. 0: no reception,
* UINT8_MAX: unknown.
*/
MlrsRadioLinkStatsFlags[MlrsRadioLinkStatsFlags["RSSI_DBM"] = 1] = "RSSI_DBM";
/**
* Rx receive antenna. When set the data received on antenna 2 are taken, else the data stems from
* antenna 1.
*/
MlrsRadioLinkStatsFlags[MlrsRadioLinkStatsFlags["RX_RECEIVE_ANTENNA2"] = 2] = "RX_RECEIVE_ANTENNA2";
/**
* Rx transmit antenna. Data are transmitted on antenna 1.
*/
MlrsRadioLinkStatsFlags[MlrsRadioLinkStatsFlags["RX_TRANSMIT_ANTENNA1"] = 4] = "RX_TRANSMIT_ANTENNA1";
/**
* Rx transmit antenna. Data are transmitted on antenna 2.
*/
MlrsRadioLinkStatsFlags[MlrsRadioLinkStatsFlags["RX_TRANSMIT_ANTENNA2"] = 8] = "RX_TRANSMIT_ANTENNA2";
/**
* Tx receive antenna. When set the data received on antenna 2 are taken, else the data stems from
* antenna 1.
*/
MlrsRadioLinkStatsFlags[MlrsRadioLinkStatsFlags["TX_RECEIVE_ANTENNA2"] = 16] = "TX_RECEIVE_ANTENNA2";
/**
* Tx transmit antenna. Data are transmitted on antenna 1.
*/
MlrsRadioLinkStatsFlags[MlrsRadioLinkStatsFlags["TX_TRANSMIT_ANTENNA1"] = 32] = "TX_TRANSMIT_ANTENNA1";
/**
* Tx transmit antenna. Data are transmitted on antenna 2.
*/
MlrsRadioLinkStatsFlags[MlrsRadioLinkStatsFlags["TX_TRANSMIT_ANTENNA2"] = 64] = "TX_TRANSMIT_ANTENNA2";
})(MlrsRadioLinkStatsFlags = exports.MlrsRadioLinkStatsFlags || (exports.MlrsRadioLinkStatsFlags = {}));
/**
* RADIO_LINK_TYPE enum.
*/
var MlrsRadioLinkType;
(function (MlrsRadioLinkType) {
/**
* Unknown radio link type.
*/
MlrsRadioLinkType[MlrsRadioLinkType["GENERIC"] = 0] = "GENERIC";
/**
* Radio link is HereLink.
*/
MlrsRadioLinkType[MlrsRadioLinkType["HERELINK"] = 1] = "HERELINK";
/**
* Radio link is Dragon Link.
*/
MlrsRadioLinkType[MlrsRadioLinkType["DRAGONLINK"] = 2] = "DRAGONLINK";
/**
* Radio link is RFD900.
*/
MlrsRadioLinkType[MlrsRadioLinkType["RFD900"] = 3] = "RFD900";
/**
* Radio link is Crossfire.
*/
MlrsRadioLinkType[MlrsRadioLinkType["CROSSFIRE"] = 4] = "CROSSFIRE";
/**
* Radio link is ExpressLRS.
*/
MlrsRadioLinkType[MlrsRadioLinkType["EXPRESSLRS"] = 5] = "EXPRESSLRS";
/**
* Radio link is mLRS.
*/
MlrsRadioLinkType[MlrsRadioLinkType["MLRS"] = 6] = "MLRS";
})(MlrsRadioLinkType = exports.MlrsRadioLinkType || (exports.MlrsRadioLinkType = {}));
/**
* Information about a gimbal manager. This message should be requested by a ground station using
* MAV_CMD_REQUEST_MESSAGE. It mirrors some fields of the GIMBAL_DEVICE_INFORMATION message, but not
* all. If the additional information is desired, also GIMBAL_DEVICE_INFORMATION should be requested.
*/
class Storm32GimbalManagerInformation extends mavlink_1.MavLinkData {
constructor() {
super();
this.gimbalId = 0;
this.deviceCapFlags = common_1.GimbalDeviceCapFlags[Object.keys(common_1.GimbalDeviceCapFlags)[0]];
this.managerCapFlags = MavStorm32GimbalManagerCapFlags[Object.keys(MavStorm32GimbalManagerCapFlags)[0]];
this.rollMin = 0;
this.rollMax = 0;
this.pitchMin = 0;
this.pitchMax = 0;
this.yawMin = 0;
this.yawMax = 0;
}
}
exports.Storm32GimbalManagerInformation = Storm32GimbalManagerInformation;
Storm32GimbalManagerInformation.MSG_ID = 60010;
Storm32GimbalManagerInformation.MSG_NAME = 'STORM32_GIMBAL_MANAGER_INFORMATION';
Storm32GimbalManagerInformation.PAYLOAD_LENGTH = 33;
Storm32GimbalManagerInformation.MAGIC_NUMBER = 208;
Storm32GimbalManagerInformation.FIELDS = [
new mavlink_1.MavLinkPacketField('device_cap_flags', 'deviceCapFlags', 0, false, 4, 'uint32_t', ''),
new mavlink_1.MavLinkPacketField('manager_cap_flags', 'managerCapFlags', 4, false, 4, 'uint32_t', ''),
new mavlink_1.MavLinkPacketField('roll_min', 'rollMin', 8, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('roll_max', 'rollMax', 12, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('pitch_min', 'pitchMin', 16, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('pitch_max', 'pitchMax', 20, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('yaw_min', 'yawMin', 24, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('yaw_max', 'yawMax', 28, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('gimbal_id', 'gimbalId', 32, false, 1, 'uint8_t', ''),
];
/**
* Message reporting the current status of a gimbal manager. This message should be broadcast at a low
* regular rate (e.g. 1 Hz, may be increase momentarily to e.g. 5 Hz for a period of 1 sec after a
* change).
*/
class Storm32GimbalManagerStatus extends mavlink_1.MavLinkData {
constructor() {
super();
this.gimbalId = 0;
this.supervisor = MavStorm32GimbalManagerClient[Object.keys(MavStorm32GimbalManagerClient)[0]];
this.deviceFlags = common_1.GimbalDeviceFlags[Object.keys(common_1.GimbalDeviceFlags)[0]];
this.managerFlags = MavStorm32GimbalManagerFlags[Object.keys(MavStorm32GimbalManagerFlags)[0]];
this.profile = MavStorm32GimbalManagerProfile[Object.keys(MavStorm32GimbalManagerProfile)[0]];
}
}
exports.Storm32GimbalManagerStatus = Storm32GimbalManagerStatus;
Storm32GimbalManagerStatus.MSG_ID = 60011;
Storm32GimbalManagerStatus.MSG_NAME = 'STORM32_GIMBAL_MANAGER_STATUS';
Storm32GimbalManagerStatus.PAYLOAD_LENGTH = 7;
Storm32GimbalManagerStatus.MAGIC_NUMBER = 183;
Storm32GimbalManagerStatus.FIELDS = [
new mavlink_1.MavLinkPacketField('device_flags', 'deviceFlags', 0, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('manager_flags', 'managerFlags', 2, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('gimbal_id', 'gimbalId', 4, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('supervisor', 'supervisor', 5, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('profile', 'profile', 6, false, 1, 'uint8_t', ''),
];
/**
* Message to a gimbal manager to control the gimbal attitude. Angles and rates can be set to NaN
* according to use case. A gimbal device is never to react to this message.
*/
class Storm32GimbalManagerControl extends mavlink_1.MavLinkData {
constructor() {
super();
this.targetSystem = 0;
this.targetComponent = 0;
this.gimbalId = 0;
this.client = MavStorm32GimbalManagerClient[Object.keys(MavStorm32GimbalManagerClient)[0]];
this.deviceFlags = common_1.GimbalDeviceFlags[Object.keys(common_1.GimbalDeviceFlags)[0]];
this.managerFlags = MavStorm32GimbalManagerFlags[Object.keys(MavStorm32GimbalManagerFlags)[0]];
this.q = [];
this.angularVelocityX = 0;
this.angularVelocityY = 0;
this.angularVelocityZ = 0;
}
}
exports.Storm32GimbalManagerControl = Storm32GimbalManagerControl;
Storm32GimbalManagerControl.MSG_ID = 60012;
Storm32GimbalManagerControl.MSG_NAME = 'STORM32_GIMBAL_MANAGER_CONTROL';
Storm32GimbalManagerControl.PAYLOAD_LENGTH = 36;
Storm32GimbalManagerControl.MAGIC_NUMBER = 99;
Storm32GimbalManagerControl.FIELDS = [
new mavlink_1.MavLinkPacketField('q', 'q', 0, false, 4, 'float[]', '', 4),
new mavlink_1.MavLinkPacketField('angular_velocity_x', 'angularVelocityX', 16, false, 4, 'float', 'rad/s'),
new mavlink_1.MavLinkPacketField('angular_velocity_y', 'angularVelocityY', 20, false, 4, 'float', 'rad/s'),
new mavlink_1.MavLinkPacketField('angular_velocity_z', 'angularVelocityZ', 24, false, 4, 'float', 'rad/s'),
new mavlink_1.MavLinkPacketField('device_flags', 'deviceFlags', 28, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('manager_flags', 'managerFlags', 30, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('target_system', 'targetSystem', 32, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('target_component', 'targetComponent', 33, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('gimbal_id', 'gimbalId', 34, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('client', 'client', 35, false, 1, 'uint8_t', ''),
];
/**
* Message to a gimbal manager to control the gimbal tilt and pan angles. Angles and rates can be set
* to NaN according to use case. A gimbal device is never to react to this message.
*/
class Storm32GimbalManagerControlPitchyaw extends mavlink_1.MavLinkData {
constructor() {
super();
this.targetSystem = 0;
this.targetComponent = 0;
this.gimbalId = 0;
this.client = MavStorm32GimbalManagerClient[Object.keys(MavStorm32GimbalManagerClient)[0]];
this.deviceFlags = common_1.GimbalDeviceFlags[Object.keys(common_1.GimbalDeviceFlags)[0]];
this.managerFlags = MavStorm32GimbalManagerFlags[Object.keys(MavStorm32GimbalManagerFlags)[0]];
this.pitch = 0;
this.yaw = 0;
this.pitchRate = 0;
this.yawRate = 0;
}
}
exports.Storm32GimbalManagerControlPitchyaw = Storm32GimbalManagerControlPitchyaw;
Storm32GimbalManagerControlPitchyaw.MSG_ID = 60013;
Storm32GimbalManagerControlPitchyaw.MSG_NAME = 'STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW';
Storm32GimbalManagerControlPitchyaw.PAYLOAD_LENGTH = 24;
Storm32GimbalManagerControlPitchyaw.MAGIC_NUMBER = 129;
Storm32GimbalManagerControlPitchyaw.FIELDS = [
new mavlink_1.MavLinkPacketField('pitch', 'pitch', 0, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('yaw', 'yaw', 4, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('pitch_rate', 'pitchRate', 8, false, 4, 'float', 'rad/s'),
new mavlink_1.MavLinkPacketField('yaw_rate', 'yawRate', 12, false, 4, 'float', 'rad/s'),
new mavlink_1.MavLinkPacketField('device_flags', 'deviceFlags', 16, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('manager_flags', 'managerFlags', 18, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('target_system', 'targetSystem', 20, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('target_component', 'targetComponent', 21, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('gimbal_id', 'gimbalId', 22, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('client', 'client', 23, false, 1, 'uint8_t', ''),
];
/**
* Message to a gimbal manager to correct the gimbal roll angle. This message is typically used to
* manually correct for a tilted horizon in operation. A gimbal device is never to react to this
* message.
*/
class Storm32GimbalManagerCorrectRoll extends mavlink_1.MavLinkData {
constructor() {
super();
this.targetSystem = 0;
this.targetComponent = 0;
this.gimbalId = 0;
this.client = MavStorm32GimbalManagerClient[Object.keys(MavStorm32GimbalManagerClient)[0]];
this.roll = 0;
}
}
exports.Storm32GimbalManagerCorrectRoll = Storm32GimbalManagerCorrectRoll;
Storm32GimbalManagerCorrectRoll.MSG_ID = 60014;
Storm32GimbalManagerCorrectRoll.MSG_NAME = 'STORM32_GIMBAL_MANAGER_CORRECT_ROLL';
Storm32GimbalManagerCorrectRoll.PAYLOAD_LENGTH = 8;
Storm32GimbalManagerCorrectRoll.MAGIC_NUMBER = 134;
Storm32GimbalManagerCorrectRoll.FIELDS = [
new mavlink_1.MavLinkPacketField('roll', 'roll', 0, false, 4, 'float', 'rad'),
new mavlink_1.MavLinkPacketField('target_system', 'targetSystem', 4, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('target_component', 'targetComponent', 5, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('gimbal_id', 'gimbalId', 6, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('client', 'client', 7, false, 1, 'uint8_t', ''),
];
/**
* Frsky SPort passthrough multi packet container.
*/
class FrskyPassthroughArray extends mavlink_1.MavLinkData {
constructor() {
super();
this.timeBootMs = 0;
this.count = 0;
this.packetBuf = [];
}
}
exports.FrskyPassthroughArray = FrskyPassthroughArray;
FrskyPassthroughArray.MSG_ID = 60040;
FrskyPassthroughArray.MSG_NAME = 'FRSKY_PASSTHROUGH_ARRAY';
FrskyPassthroughArray.PAYLOAD_LENGTH = 245;
FrskyPassthroughArray.MAGIC_NUMBER = 156;
FrskyPassthroughArray.FIELDS = [
new mavlink_1.MavLinkPacketField('time_boot_ms', 'timeBootMs', 0, false, 4, 'uint32_t', 'ms'),
new mavlink_1.MavLinkPacketField('count', 'count', 4, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('packet_buf', 'packetBuf', 5, false, 1, 'uint8_t[]', '', 240),
];
/**
* Radio link statistics for a MAVLink RC receiver or transmitter and other links. Tx: ground-side
* device, Rx: vehicle-side device. The message is normally emitted in regular time intervals upon each
* actual or expected reception of an over-the-air data packet on the link. A MAVLink RC receiver
* should emit it shortly after it emits a RADIO_RC_CHANNELS message (if it is emitting that message).
* Per default, rssi values are in MAVLink units: 0 represents weakest signal, 254 represents maximum
* signal, UINT8_MAX represents unknown. The RADIO_LINK_STATS_FLAGS_RSSI_DBM flag is set if the rssi
* units are negative dBm: 1..254 correspond to -1..-254 dBm, 0 represents no reception, UINT8_MAX
* represents unknown. The target_system field should normally be set to the system id of the system
* the link is connected to, typically the flight controller. The target_component field can normally
* be set to 0, so that all components of the system can receive the message. Note: The frequency
* fields are extensions to ensure that they are located at the end of the serialized payload and
* subject to MAVLink's trailing-zero trimming.
*/
class MlrsRadioLinkStats extends mavlink_1.MavLinkData {
constructor() {
super();
this.targetSystem = 0;
this.targetComponent = 0;
this.flags = MlrsRadioLinkStatsFlags[Object.keys(MlrsRadioLinkStatsFlags)[0]];
this.rxLQRc = 0;
this.rxLQSer = 0;
this.rxRssi1 = 0;
this.rxSnr1 = 0;
this.txLQSer = 0;
this.txRssi1 = 0;
this.txSnr1 = 0;
this.rxRssi2 = 0;
this.rxSnr2 = 0;
this.txRssi2 = 0;
this.txSnr2 = 0;
this.frequency1 = 0;
this.frequency2 = 0;
}
}
exports.MlrsRadioLinkStats = MlrsRadioLinkStats;
MlrsRadioLinkStats.MSG_ID = 60045;
MlrsRadioLinkStats.MSG_NAME = 'MLRS_RADIO_LINK_STATS';
MlrsRadioLinkStats.PAYLOAD_LENGTH = 23;
MlrsRadioLinkStats.MAGIC_NUMBER = 14;
MlrsRadioLinkStats.FIELDS = [
new mavlink_1.MavLinkPacketField('flags', 'flags', 0, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('target_system', 'targetSystem', 2, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('target_component', 'targetComponent', 3, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('rx_LQ_rc', 'rxLQRc', 4, false, 1, 'uint8_t', 'c%'),
new mavlink_1.MavLinkPacketField('rx_LQ_ser', 'rxLQSer', 5, false, 1, 'uint8_t', 'c%'),
new mavlink_1.MavLinkPacketField('rx_rssi1', 'rxRssi1', 6, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('rx_snr1', 'rxSnr1', 7, false, 1, 'int8_t', ''),
new mavlink_1.MavLinkPacketField('tx_LQ_ser', 'txLQSer', 8, false, 1, 'uint8_t', 'c%'),
new mavlink_1.MavLinkPacketField('tx_rssi1', 'txRssi1', 9, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('tx_snr1', 'txSnr1', 10, false, 1, 'int8_t', ''),
new mavlink_1.MavLinkPacketField('rx_rssi2', 'rxRssi2', 11, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('rx_snr2', 'rxSnr2', 12, false, 1, 'int8_t', ''),
new mavlink_1.MavLinkPacketField('tx_rssi2', 'txRssi2', 13, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('tx_snr2', 'txSnr2', 14, false, 1, 'int8_t', ''),
new mavlink_1.MavLinkPacketField('frequency1', 'frequency1', 15, true, 4, 'float', 'Hz'),
new mavlink_1.MavLinkPacketField('frequency2', 'frequency2', 19, true, 4, 'float', 'Hz'),
];
/**
* Radio link information. Tx: ground-side device, Rx: vehicle-side device. The values of the fields in
* this message do normally not or only slowly change with time, and for most times the message can be
* send at a low rate, like 0.2 Hz. If values change then the message should temporarily be send more
* often to inform the system about the changes. The target_system field should normally be set to the
* system id of the system the link is connected to, typically the flight controller. The
* target_component field can normally be set to 0, so that all components of the system can receive
* the message.
*/
class MlrsRadioLinkInformation extends mavlink_1.MavLinkData {
constructor() {
super();
this.targetSystem = 0;
this.targetComponent = 0;
this.type = MlrsRadioLinkType[Object.keys(MlrsRadioLinkType)[0]];
this.mode = 0;
this.txPower = 0;
this.rxPower = 0;
this.txFrameRate = 0;
this.rxFrameRate = 0;
this.modeStr = '';
this.bandStr = '';
this.txSerDataRate = 0;
this.rxSerDataRate = 0;
this.txReceiveSensitivity = 0;
this.rxReceiveSensitivity = 0;
}
}
exports.MlrsRadioLinkInformation = MlrsRadioLinkInformation;
MlrsRadioLinkInformation.MSG_ID = 60046;
MlrsRadioLinkInformation.MSG_NAME = 'MLRS_RADIO_LINK_INFORMATION';
MlrsRadioLinkInformation.PAYLOAD_LENGTH = 28;
MlrsRadioLinkInformation.MAGIC_NUMBER = 171;
MlrsRadioLinkInformation.FIELDS = [
new mavlink_1.MavLinkPacketField('tx_frame_rate', 'txFrameRate', 0, false, 2, 'uint16_t', 'Hz'),
new mavlink_1.MavLinkPacketField('rx_frame_rate', 'rxFrameRate', 2, false, 2, 'uint16_t', 'Hz'),
new mavlink_1.MavLinkPacketField('tx_ser_data_rate', 'txSerDataRate', 4, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('rx_ser_data_rate', 'rxSerDataRate', 6, false, 2, 'uint16_t', ''),
new mavlink_1.MavLinkPacketField('target_system', 'targetSystem', 8, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('target_component', 'targetComponent', 9, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('type', 'type', 10, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('mode', 'mode', 11, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('tx_power', 'txPower', 12, false, 1, 'int8_t', 'dBm'),
new mavlink_1.MavLinkPacketField('rx_power', 'rxPower', 13, false, 1, 'int8_t', 'dBm'),
new mavlink_1.MavLinkPacketField('mode_str', 'modeStr', 14, false, 1, 'char[]', '', 6),
new mavlink_1.MavLinkPacketField('band_str', 'bandStr', 20, false, 1, 'char[]', '', 6),
new mavlink_1.MavLinkPacketField('tx_receive_sensitivity', 'txReceiveSensitivity', 26, false, 1, 'uint8_t', ''),
new mavlink_1.MavLinkPacketField('rx_receive_sensitivity', 'rxReceiveSensitivity', 27, false, 1, 'uint8_t', ''),
];
const common_2 = require("./common");
/**
* Command to a gimbal manager to control the gimbal tilt and pan angles. It is possible to set
* combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get
* to this angle at a certain angular rate, or an angular rate only will result in continuous turning.
* NaN is to be used to signal unset. A gimbal device is never to react to this command.
*/
class Storm32DoGimbalManagerControlPitchyawCommand extends common_2.CommandLong {
constructor(targetSystem = 1, targetComponent = 1) {
super();
this.command = MavCmd.STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW;
this.targetSystem = targetSystem;
this.targetComponent = targetComponent;
}
/**
* Pitch/tilt angle (positive: tilt up). NaN to be ignored.
*
* @units deg
* @min: -180
* @max: 180
*/
get pitchAngle() {
return this._param1;
}
set pitchAngle(value) {
this._param1 = value;
}
/**
* Yaw/pan angle (positive: pan to the right). NaN to be ignored. The frame is determined by the
* GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.
*
* @units deg
* @min: -180
* @max: 180
*/
get yawAngle() {
return this._param2;
}
set yawAngle(value) {
this._param2 = value;
}
/**
* Pitch/tilt rate (positive: tilt up). NaN to be ignored.
*
* @units deg/s
*/
get pitchRate() {
return this._param3;
}
set pitchRate(value) {
this._param3 = value;
}
/**
* Yaw/pan rate (positive: pan to the right). NaN to be ignored. The frame is determined by the
* GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.
*
* @units deg/s
*/
get yawRate() {
return this._param4;
}
set yawRate(value) {
this._param4 = value;
}
/**
* Gimbal device flags to be applied.
*/
get gimbalDeviceFlags() {
return this._param5;
}
set gimbalDeviceFlags(value) {
this._param5 = value;
}
/**
* Gimbal manager flags to be applied.
*/
get gimbalManagerFlags() {
return this._param6;
}
set gimbalManagerFlags(value) {
this._param6 = value;
}
/**
* Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all
* gimbals). Send command multiple times for more than one but not all gimbals. The client is copied
* into bits 8-15.
*/
get gimbalIdAndClient() {
return this._param7;
}
set gimbalIdAndClient(value) {
this._param7 = value;
}
}
exports.Storm32DoGimbalManagerControlPitchyawCommand = Storm32DoGimbalManagerControlPitchyawCommand;
/**
* Command to configure a gimbal manager. A gimbal device is never to react to this command. The
* selected profile is reported in the STORM32_GIMBAL_MANAGER_STATUS message.
*/
class Storm32DoGimbalManagerSetupCommand extends common_2.CommandLong {
constructor(targetSystem = 1, targetComponent = 1) {
super();
this.command = MavCmd.STORM32_DO_GIMBAL_MANAGER_SETUP;
this.targetSystem = targetSystem;
this.targetComponent = targetComponent;
}
/**
* Gimbal manager profile (0 = default).
*/
get profile() {
return this._param1;
}
set profile(value) {
this._param1 = value;
}
/**
* Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all
* gimbals). Send command multiple times for more than one but not all gimbals.
*/
get gimbalId() {
return this._param7;
}
set gimbalId(value) {
this._param7 = value;
}
}
exports.Storm32DoGimbalManagerSetupCommand = Storm32DoGimbalManagerSetupCommand;
/**
* Command to set the shot manager mode.
*/
class QshotDoConfigureCommand extends common_2.CommandLong {
constructor(targetSystem = 1, targetComponent = 1) {
super();
this.command = MavCmd.QSHOT_DO_CONFIGURE;
this.targetSystem = targetSystem;
this.targetComponent = targetComponent;
}
/**
* Set shot mode.
*/
get mode() {
return this._param1;
}
set mode(value) {
this._param1 = value;
}
/**
* Set shot state or command. The allowed values are specific to the selected shot mode.
*/
get shotStateOrCommand() {
return this._param2;
}
set shotStateOrCommand(value) {
this._param2 = value;
}
}
exports.QshotDoConfigureCommand = QshotDoConfigureCommand;
exports.REGISTRY = {
60010: Storm32GimbalManagerInformation,
60011: Storm32GimbalManagerStatus,
60012: Storm32GimbalManagerControl,
60013: Storm32GimbalManagerControlPitchyaw,
60014: Storm32GimbalManagerCorrectRoll,
60040: FrskyPassthroughArray,
60045: MlrsRadioLinkStats,
60046: MlrsRadioLinkInformation,
};
exports.COMMANDS = {
[MavCmd.STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW]: Storm32DoGimbalManagerControlPitchyawCommand,
[MavCmd.STORM32_DO_GIMBAL_MANAGER_SETUP]: Storm32DoGimbalManagerSetupCommand,
[MavCmd.QSHOT_DO_CONFIGURE]: QshotDoConfigureCommand,
};
//# sourceMappingURL=storm32.js.map