Skip to content

Commit 6cf58af

Browse files
committed
Mavlink: update
1 parent a3f720a commit 6cf58af

File tree

7 files changed

+629
-184
lines changed

7 files changed

+629
-184
lines changed

ExtLibs/Mavlink/Mavlink.cs

Lines changed: 235 additions & 113 deletions
Large diffs are not rendered by default.

ExtLibs/Mavlink/mavlink.lua

Lines changed: 296 additions & 49 deletions
Large diffs are not rendered by default.

ExtLibs/Mavlink/message_definitions/ardupilotmega.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,7 @@
14901490
<field type="int32_t" name="lng" units="degE7">Longitude.</field>
14911491
</message>
14921492
<message id="165" name="HWSTATUS">
1493+
<deprecated since="2022-09" replaced_by="POWER_STATUS">POWER_STATUS+SYS_STATUS form a superset of the fields in this message.</deprecated>
14931494
<description>Status of key hardware.</description>
14941495
<field type="uint16_t" name="Vcc" units="mV">Board voltage.</field>
14951496
<field type="uint8_t" name="I2Cerr">I2C error count.</field>

ExtLibs/Mavlink/message_definitions/common.xml

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,6 +2288,29 @@
22882288
<description>64-bit floating-point</description>
22892289
</entry>
22902290
</enum>
2291+
<enum name="MAV_PARAM_ERROR">
2292+
<wip/>
2293+
<!-- This enum is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
2294+
<description>Parameter protocol error types (see PARAM_ERROR).</description>
2295+
<entry value="0" name="MAV_PARAM_ERROR_NO_ERROR">
2296+
<description>No error occurred (not expected in PARAM_ERROR but may be used in future implementations.</description>
2297+
</entry>
2298+
<entry value="1" name="MAV_PARAM_ERROR_DOES_NOT_EXIST">
2299+
<description>Parameter does not exist</description>
2300+
</entry>
2301+
<entry value="2" name="MAV_PARAM_ERROR_VALUE_OUT_OF_RANGE">
2302+
<description>Parameter value does not fit within accepted range</description>
2303+
</entry>
2304+
<entry value="3" name="MAV_PARAM_ERROR_PERMISSION_DENIED">
2305+
<description>Caller is not permitted to set the value of this parameter</description>
2306+
</entry>
2307+
<entry value="4" name="MAV_PARAM_ERROR_COMPONENT_NOT_FOUND">
2308+
<description>Unknown component specified</description>
2309+
</entry>
2310+
<entry value="5" name="MAV_PARAM_ERROR_READ_ONLY">
2311+
<description>Parameter is read-only</description>
2312+
</entry>
2313+
</enum>
22912314
<enum name="MAV_PARAM_EXT_TYPE">
22922315
<description>Specifies the datatype of a MAVLink extended parameter.</description>
22932316
<entry value="1" name="MAV_PARAM_EXT_TYPE_UINT8">
@@ -4340,7 +4363,7 @@
43404363
<field type="int16_t" name="temperature_press_diff" units="cdegC" invalid="0">Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC.</field>
43414364
</message>
43424365
<message id="30" name="ATTITUDE">
4343-
<description>The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right).</description>
4366+
<description>The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic).</description>
43444367
<field type="uint32_t" name="time_boot_ms" units="ms">Timestamp (time since system boot).</field>
43454368
<field type="float" name="roll" units="rad">Roll angle (-pi..+pi)</field>
43464369
<field type="float" name="pitch" units="rad">Pitch angle (-pi..+pi)</field>
@@ -4372,19 +4395,6 @@
43724395
<field type="float" name="vy" units="m/s">Y Speed</field>
43734396
<field type="float" name="vz" units="m/s">Z Speed</field>
43744397
</message>
4375-
<message id="33" name="GLOBAL_POSITION_INT">
4376-
<description>The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It
4377-
is designed as scaled integer message since the resolution of float is not sufficient.</description>
4378-
<field type="uint32_t" name="time_boot_ms" units="ms">Timestamp (time since system boot).</field>
4379-
<field type="int32_t" name="lat" units="degE7">Latitude, expressed</field>
4380-
<field type="int32_t" name="lon" units="degE7">Longitude, expressed</field>
4381-
<field type="int32_t" name="alt" units="mm">Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.</field>
4382-
<field type="int32_t" name="relative_alt" units="mm">Altitude above home</field>
4383-
<field type="int16_t" name="vx" units="cm/s">Ground X Speed (Latitude, positive north)</field>
4384-
<field type="int16_t" name="vy" units="cm/s">Ground Y Speed (Longitude, positive east)</field>
4385-
<field type="int16_t" name="vz" units="cm/s">Ground Z Speed (Altitude, positive down)</field>
4386-
<field type="uint16_t" name="hdg" units="cdeg" invalid="UINT16_MAX">Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX</field>
4387-
</message>
43884398
<message id="34" name="RC_CHANNELS_SCALED">
43894399
<description>The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to UINT16_MAX.</description>
43904400
<field type="uint32_t" name="time_boot_ms" units="ms">Timestamp (time since system boot).</field>
@@ -6364,6 +6374,17 @@
63646374
<field type="uint8_t" name="flight_state" enum="UTM_FLIGHT_STATE">Flight state</field>
63656375
<field type="uint8_t" name="flags" enum="UTM_DATA_AVAIL_FLAGS" display="bitmask">Bitwise OR combination of the data available flags.</field>
63666376
</message>
6377+
<message id="345" name="PARAM_ERROR">
6378+
<wip/>
6379+
<!-- This enum is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
6380+
<description>Parameter set/get error. Returned from a MAVLink node in response to an error in the parameter protocol, for example failing to set a parameter because it does not exist.
6381+
</description>
6382+
<field type="uint8_t" name="target_system">System ID</field>
6383+
<field type="uint8_t" name="target_component">Component ID</field>
6384+
<field type="char[16]" name="param_id">Parameter id. Terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string</field>
6385+
<field type="int16_t" name="param_index">Parameter index. Will be -1 if the param ID field should be used as an identifier (else the param id will be ignored)</field>
6386+
<field type="uint8_t" name="error" enum="MAV_PARAM_ERROR">Error being returned to client.</field>
6387+
</message>
63676388
<message id="350" name="DEBUG_FLOAT_ARRAY">
63686389
<description>Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code.</description>
63696390
<field type="uint64_t" name="time_usec" units="us">Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.</field>

ExtLibs/Mavlink/message_definitions/development.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,17 @@
128128
<!-- * the data payload of mavlink commands (as used in the COMMAND_INT and COMMAND_LONG messages) -->
129129
<!-- ALL the entries in the MAV_CMD enum have a maximum of 7 parameters -->
130130
<enum name="MAV_CMD">
131+
<entry value="36" name="MAV_CMD_NAV_ARC_WAYPOINT" hasLocation="true" isDestination="true">
132+
<!-- This message is work-in-progress it can therefore change, and should NOT be used in stable production environments -->
133+
<description>Circular arc path waypoint.
134+
This defines the end/exit point and angle (param1) of an arc path from the previous waypoint. A position is required before this command to define the start of the arc (e.g. current position, a MAV_CMD_NAV_WAYPOINT, or a MAV_CMD_NAV_ARC_WAYPOINT).
135+
The resulting path is a circular arc in the NE frame, with the difference in height being defined by the difference in waypoint altitudes.
136+
</description>
137+
<param index="1" label="Arc Angle" units="deg" minValue="-359" maxValue="359" increment="1">The angle in degrees from the starting position to the exit position of the arc in the NE frame. Positive values are CW arcs and negative values are CCW arcs.</param>
138+
<param index="5" label="Latitude">Latitude</param>
139+
<param index="6" label="Longitude">Longitude</param>
140+
<param index="7" label="Altitude" units="m">Altitude</param>
141+
</entry>
131142
<entry value="610" name="MAV_CMD_DO_SET_SYS_CMP_ID" hasLocation="false" isDestination="false">
132143
<description>
133144
Set system and component id.
@@ -178,6 +189,13 @@
178189
<param index="6" reserved="true" default="0"/>
179190
<param index="7" reserved="true" default="NaN"/>
180191
</entry>
192+
<entry value="5005" name="MAV_CMD_NAV_FENCE_HOME_CIRCLE_INCLUSION" hasLocation="false" isDestination="false">
193+
<wip/>
194+
<!-- This message is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
195+
<description>Circular fence area centered on home. The vehicle must stay inside this area. If home is moved, the fence moves.</description>
196+
<param index="1" label="Radius" units="m">Radius.</param>
197+
<param index="2" label="Inclusion Group" minValue="0" increment="1">Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group. Ignored when sent as a command.</param>
198+
</entry>
181199
</enum>
182200
<enum name="GPS_SYSTEM_ERROR_FLAGS" bitmask="true">
183201
<description>Flags indicating errors in a GPS receiver.</description>

ExtLibs/Mavlink/message_definitions/minimal.xml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,27 @@
200200
<entry value="42" name="MAV_TYPE_WINCH">
201201
<description>Winch</description>
202202
</entry>
203+
<entry value="43" name="MAV_TYPE_GENERIC_MULTIROTOR">
204+
<description>Generic multirotor that does not fit into a specific type or whose type is unknown</description>
205+
</entry>
206+
<entry value="44" name="MAV_TYPE_ILLUMINATOR">
207+
<description>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).</description>
208+
</entry>
209+
<entry value="45" name="MAV_TYPE_SPACECRAFT_ORBITER">
210+
<description>Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification.</description>
211+
</entry>
212+
<entry value="46" name="MAV_TYPE_GROUND_QUADRUPED">
213+
<description>A generic four-legged ground vehicle (e.g., a robot dog).</description>
214+
</entry>
215+
<entry value="47" name="MAV_TYPE_VTOL_GYRODYNE">
216+
<description>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</description>
217+
</entry>
218+
<entry value="48" name="MAV_TYPE_GRIPPER">
219+
<description>Gripper</description>
220+
</entry>
203221
</enum>
204222
<enum name="MAV_MODE_FLAG" bitmask="true">
205-
<description>These flags encode the MAV mode.</description>
223+
<description>These flags encode the MAV mode, see MAV_MODE enum for useful combinations.</description>
206224
<entry value="128" name="MAV_MODE_FLAG_SAFETY_ARMED">
207225
<description>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.</description>
208226
</entry>
@@ -272,16 +290,16 @@
272290
<description>System is active and might be already airborne. Motors are engaged.</description>
273291
</entry>
274292
<entry value="5" name="MAV_STATE_CRITICAL">
275-
<description>System is in a non-normal flight mode. It can however still navigate.</description>
293+
<description>System is in a non-normal flight mode (failsafe). It can however still navigate.</description>
276294
</entry>
277295
<entry value="6" name="MAV_STATE_EMERGENCY">
278-
<description>System is in a non-normal flight mode. It lost control over parts or over the whole airframe. It is in mayday and going down.</description>
296+
<description>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.</description>
279297
</entry>
280298
<entry value="7" name="MAV_STATE_POWEROFF">
281299
<description>System just initialized its power-down sequence, will shut down now.</description>
282300
</entry>
283301
<entry value="8" name="MAV_STATE_FLIGHT_TERMINATION">
284-
<description>System is terminating itself.</description>
302+
<description>System is terminating itself (failsafe or commanded).</description>
285303
</entry>
286304
</enum>
287305
<enum name="MAV_COMPONENT">
@@ -605,6 +623,9 @@
605623
<entry value="161" name="MAV_COMP_ID_PARACHUTE">
606624
<description>Parachute component.</description>
607625
</entry>
626+
<entry value="169" name="MAV_COMP_ID_WINCH">
627+
<description>Winch component.</description>
628+
</entry>
608629
<entry value="171" name="MAV_COMP_ID_GIMBAL2">
609630
<description>Gimbal #2.</description>
610631
</entry>
@@ -689,9 +710,12 @@
689710
<entry value="242" name="MAV_COMP_ID_TUNNEL_NODE">
690711
<description>Component handling TUNNEL messages (e.g. vendor specific GUI of a component).</description>
691712
</entry>
713+
<entry value="243" name="MAV_COMP_ID_ILLUMINATOR">
714+
<description>Illuminator</description>
715+
</entry>
692716
<entry value="250" name="MAV_COMP_ID_SYSTEM_CONTROL">
693-
<deprecated since="2018-11" replaced_by="MAV_COMP_ID_ALL">System control does not require a separate component ID.</deprecated>
694-
<description>Component for handling system messages (e.g. to ARM, takeoff, etc.).</description>
717+
<deprecated since="2018-11" replaced_by="MAV_COMP_ID_ALL">System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id.</deprecated>
718+
<description>Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.).</description>
695719
</entry>
696720
</enum>
697721
</enums>
@@ -700,7 +724,7 @@
700724
<description>The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html</description>
701725
<field type="uint8_t" name="type" enum="MAV_TYPE">Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type.</field>
702726
<field type="uint8_t" name="autopilot" enum="MAV_AUTOPILOT">Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers.</field>
703-
<field type="uint8_t" name="base_mode" enum="MAV_MODE_FLAG" display="bitmask">System mode bitmap.</field>
727+
<field type="uint8_t" name="base_mode" enum="MAV_MODE_FLAG">System mode bitmap.</field>
704728
<field type="uint32_t" name="custom_mode">A bitfield for use for autopilot-specific flags</field>
705729
<field type="uint8_t" name="system_status" enum="MAV_STATE">System status flag.</field>
706730
<field type="uint8_t_mavlink_version" name="mavlink_version">MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version</field>

ExtLibs/Mavlink/message_definitions/standard.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<description>Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability.</description>
1818
<entry value="1" name="MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT">
1919
<description>Autopilot supports the MISSION_ITEM float message type.
20-
Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead.
20+
Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_ITEM_INT instead.
2121
</description>
2222
</entry>
2323
<entry value="2" name="MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT">
@@ -112,6 +112,18 @@
112112
</enums>
113113
<messages>
114114
<!-- also includes minimal.xml messages -->
115+
<message id="33" name="GLOBAL_POSITION_INT">
116+
<description>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.</description>
117+
<field type="uint32_t" name="time_boot_ms" units="ms">Timestamp (time since system boot).</field>
118+
<field type="int32_t" name="lat" units="degE7">Latitude, expressed</field>
119+
<field type="int32_t" name="lon" units="degE7">Longitude, expressed</field>
120+
<field type="int32_t" name="alt" units="mm">Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.</field>
121+
<field type="int32_t" name="relative_alt" units="mm">Altitude above home</field>
122+
<field type="int16_t" name="vx" units="cm/s">Ground X Speed (Latitude, positive north)</field>
123+
<field type="int16_t" name="vy" units="cm/s">Ground Y Speed (Longitude, positive east)</field>
124+
<field type="int16_t" name="vz" units="cm/s">Ground Z Speed (Altitude, positive down)</field>
125+
<field type="uint16_t" name="hdg" units="cdeg" invalid="UINT16_MAX">Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX</field>
126+
</message>
115127
<message id="148" name="AUTOPILOT_VERSION">
116128
<description>Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE.</description>
117129
<field type="uint64_t" name="capabilities" enum="MAV_PROTOCOL_CAPABILITY">Bitmap of capabilities</field>

0 commit comments

Comments
 (0)