You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/messages/development.md
+43-21Lines changed: 43 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,12 +267,24 @@ type | `uint8_t` | | [LANDING_TARGET_TYPE](#LANDING_TARGET_TYPE) | Type of targe
267
267
268
268
<spanclass="warning">**WORK IN PROGRESS**: Do not use in stable production environments (it may change).</span>
269
269
270
-
Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using [MAV_CMD_REQUEST_OPERATOR_CONTROL](#MAV_CMD_REQUEST_OPERATOR_CONTROL).
270
+
Information about GCS(s) in control of this MAV.
271
+
272
+
This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change.
273
+
Components in the system should only accept "state changing commands/messages" from any system id in `gcs_main` or `gcs_secondary`.
274
+
275
+
- In single-owner mode there is a single GCS that can send "state changing commands/messages" listed in `gcs_main` (`gcs_secondary` must be set to all-zero).
276
+
- In multi-owner mode, all GCS with ids in `gcs_main` and `gcs_secondary` can send "state changing commands/messages".
277
+
However `gcs_main` is the only GCS that can perform "special controlled operations" such as manual control.
278
+
- Control over ownership of the `gcs_main` role is requested using [MAV_CMD_REQUEST_OPERATOR_CONTROL](#MAV_CMD_REQUEST_OPERATOR_CONTROL).
279
+
- GCS in `gcs_secondary` are set by the flight stack (cannot be set by this mechanism).
280
+
It should only include IDs for connected GCS.
281
+
If more than 11 GCS are in control and visible, the flight stack will at most be able to publish 11.
271
282
272
283
Field Name | Type | Values | Description
273
284
--- | --- | --- | ---
274
-
sysid_in_control | `uint8_t` | | System ID of GCS MAVLink component in control (0: no GCS in control).
275
-
flags | `uint8_t` | [GCS_CONTROL_STATUS_FLAGS](#GCS_CONTROL_STATUS_FLAGS) | Control status. For example, whether takeover is allowed, and whether this message instance defines the default controlling GCS for the whole system.
285
+
flags | `uint8_t` | [GCS_CONTROL_STATUS_FLAGS](#GCS_CONTROL_STATUS_FLAGS) | Control status. For example, whether takeover of the `gcs_main` role is allowed, and whether this [CONTROL_STATUS](#CONTROL_STATUS) instance defines the default controlling GCS for the whole system.
286
+
gcs_main | `uint8_t` | invalid:0 | System ID of GCS in control. 0: no GCS in control.
287
+
gcs_secondary | `uint8_t[10]` | invalid:[0,] | System IDs from which the system can recieve state-changing commands/messages in multi-control mode. All values should be zero for single-ower mode.
<aid='GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER'></a>1 | [GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER](#GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER) | If set, this [CONTROL_STATUS](#CONTROL_STATUS) publishes the controlling GCS for the whole system.If unset, the [CONTROL_STATUS](#CONTROL_STATUS) indicates the controlling GCS for just the component emitting the message.Note that to request control of the system a GCS should send [MAV_CMD_REQUEST_OPERATOR_CONTROL](#MAV_CMD_REQUEST_OPERATOR_CONTROL) to the component emitting [CONTROL_STATUS](#CONTROL_STATUS) with this flag set.
369
+
<aid='GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER'></a>1 | [GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER](#GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER) | If set, this [CONTROL_STATUS](#CONTROL_STATUS) publishes the controlling GCS(s) of the whole system.<br>If unset, the [CONTROL_STATUS](#CONTROL_STATUS) indicates the controlling GCS(s) for just the component emitting the message.<br>Note that to request control of the system a GCS should send [MAV_CMD_REQUEST_OPERATOR_CONTROL](#MAV_CMD_REQUEST_OPERATOR_CONTROL) to the component emitting [CONTROL_STATUS](#CONTROL_STATUS) with this flag set.
358
370
<aid='GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED'></a>2 | [GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED](#GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED) | Takeover allowed (requests for control will be granted). If not set requests for control will be rejected, but the controlling GCS will be notified (and may release control or allow takeover).
<spanclass="warning">**WORK IN PROGRESS**: Do not use in stable production environments (it may change).</span>
690
702
691
-
Request GCS control of a system (or of a specific component in a system).
703
+
Request exclusive control of a system or special system feature by a GCS.
704
+
692
705
706
+
The operator control protocol supports two modes:
707
+
- In single-owner mode there is a single GCS "owner" that can send state changing operations to the whole system, and this command can be used to request takeover of that ownership role.
708
+
- In multi-owner mode the flight stack allows multiple GCS to be "owners" and send (most) state changing operations (which GCS those are is implementation-dependent, and not controlled by this protocol).
709
+
However only one GCS owner can control manual input of the vehicle: this command can be used to request takeover of that ownership role.
693
710
694
-
A controlled system should only accept MAVLink commands and command-like messages that are sent by its controlling GCS, or from other components with the same system id.
695
-
Commands from other systems should be rejected with [MAV_RESULT_FAILED](#MAV_RESULT_FAILED) (except for this command, which may be acknowledged with [MAV_RESULT_ACCEPTED](#MAV_RESULT_ACCEPTED) if control is granted).
696
-
Command-like messages should be ignored (or rejected if that is supported by their associated protocol).
711
+
A controlled system should only accept MAVLink operations that change the state of the vehicle, such as commands and command-like messages, which are sent by its controlling GCS(s) (or from other components in its own system/with the same system id, such as a companion computer).
712
+
Commands to control the vehicle from other systems should be rejected with [MAV_RESULT_NOT_IN_CONTROL](#MAV_RESULT_NOT_IN_CONTROL) (except for this command, which may be acknowledged with [MAV_RESULT_ACCEPTED](#MAV_RESULT_ACCEPTED) if control is granted).
713
+
Messages and commands that don't control or change vehicle movement or functionality, such as telemetry requests, may still be send from (and to) a controlled system.
697
714
698
715
GCS control of the whole system is managed via a single component that we will refer to here as the "system manager component".
699
716
This component streams the [CONTROL_STATUS](#CONTROL_STATUS) message and sets the [GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER](#GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER) flag.
700
-
Other components in the system should monitor for the [CONTROL_STATUS](#CONTROL_STATUS) message with this flag, and set their controlling GCS to match its published system id.
717
+
Other components in the system should monitor for the [CONTROL_STATUS](#CONTROL_STATUS) message with this flag, and set their controlling GCS(s) to match its published system id(s).
701
718
A GCS that wants to control the system should also monitor for the same message and flag, and address the [MAV_CMD_REQUEST_OPERATOR_CONTROL](#MAV_CMD_REQUEST_OPERATOR_CONTROL) to its component id.
702
719
Note that integrators are required to ensure that there is only one system manager component in the system (i.e. one component emitting the message with [GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER](#GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER) set).
703
720
704
721
The [MAV_CMD_REQUEST_OPERATOR_CONTROL](#MAV_CMD_REQUEST_OPERATOR_CONTROL) command is sent by a GCS to the system manager component to request or release control of a system, specifying whether subsequent takeover requests from another GCS are automatically granted, or require permission.
722
+
The command may request control for a single GCS system ID or a range of GCS system IDs: the sender of the command must have a system id that is in the requested range.
705
723
706
-
The system manager component should grant control to the GCS if the system does not require takeover permission (or is uncontrolled) and ACK the request with [MAV_RESULT_ACCEPTED](#MAV_RESULT_ACCEPTED).
707
-
The system manager component should then stream [CONTROL_STATUS](#CONTROL_STATUS) indicating its controlling system: all other components with the same system id should monitor this message and set their own controlling GCS to match that of the system manager component.
724
+
The system manager component should grant control to the requested GCS(s) if the system does not require takeover permission (or is uncontrolled) and ACK the request with [MAV_RESULT_ACCEPTED](#MAV_RESULT_ACCEPTED).
725
+
The system manager component should then stream [CONTROL_STATUS](#CONTROL_STATUS) indicating its controlling system(s): all other components in the system (with the same system id) should monitor this message and set their own controlling GCS(s) to match that of the system manager component.
708
726
709
-
If the system manager component cannot grant control (because takeover requires permission), the request should be rejected with [MAV_RESULT_FAILED](#MAV_RESULT_FAILED).
710
-
The system manager component should then send this same command to the current owning GCS in order to notify of the request.
711
-
The owning GCS would ACK with [MAV_RESULT_ACCEPTED](#MAV_RESULT_ACCEPTED), and might choose to release control of the vehicle, or re-request control with the takeover bit set to allow permission.
712
-
In case it choses to re-request control with takeover bit set to allow permission, requester GCS will only have 10 seconds to get control, otherwise owning GCS will re-request control with takeover bit set to disallow permission, and requester GCS will need repeat the request if still interested in getting control.
727
+
If the system manager component cannot grant control because takeover requires permission, the request should be rejected with [MAV_RESULT_FAILED](#MAV_RESULT_FAILED).
728
+
The system manager component should then send this same command to the owning GCS with the lowest system ID that has a heartbeat, in order to notify of the request.
729
+
That owning GCS must ACK with [MAV_RESULT_ACCEPTED](#MAV_RESULT_ACCEPTED), and may choose to release control of the vehicle, or re-request control with the takeover bit set to allow permission.
730
+
In case it choses to re-request control with takeover bit set to allow permission, the requester GCS will only have 10 seconds to get control, otherwise owning GCS will re-request control with takeover bit set to disallow permission, and requester GCS will need repeat the request if still interested in getting control.
713
731
Note that the pilots of both GCS should coordinate safe handover offline.
714
732
715
-
Note that in most systems the only controlled component will be the "system manager component", and that will be the autopilot.
733
+
While any owning GCS are connected the system should consider itself connected to a GCS, and still owned by all GCS (even those that are not connected).
734
+
If all owning GCS are disconnected the vehicle should GCS loss failsafe, and broadcast a [CONTROL_STATUS](#CONTROL_STATUS) indicating that it has no owner(s).
735
+
In simultaneous-owner scenarios this allows an owner to disconnect and reconnect without the vehicle failsafing, provided at least one owner is connected.
736
+
737
+
Note that in most systems the only controlled component will be the "system manager component", and that will be the autopilot (although it could be a companion computer).
716
738
However separate GCS control of a particular component is also permitted, if supported by the component.
717
739
In this case the GCS will address [MAV_CMD_REQUEST_OPERATOR_CONTROL](#MAV_CMD_REQUEST_OPERATOR_CONTROL) to the specific component it wants to control.
718
740
The component will then stream [CONTROL_STATUS](#CONTROL_STATUS) for its controlling GCS (it must not set [GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER](#GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER)).
@@ -721,11 +743,11 @@ The flow is otherwise the same as for requesting control over the whole system.
721
743
722
744
Param (Label) | Description | Values | Units
723
745
--- | --- | --- | ---
724
-
1 (Sysid requesting control) | System ID of GCS requesting control. 0 when command sent from GCS to autopilot (autopilot determines requesting GCS sysid from message header). Sysid of GCS requesting control when command sent by autopilot to controlling GCS. | |
3 (Allow takeover) | Enable automatic granting of ownership on request (by default reject request and notify current owner). 0: Ask current owner and reject request, 1: Allow automatic takeover. | |
727
-
4 (Request timeout) | Timeout in seconds before a request to a GCS to allow takeover is assumed to be rejected. This is used to display the timeout graphically on requester and GCS in control. | min: 3 max: 60 | s
2 (Allow takeover) | Enable automatic granting of ownership on request (by default reject request and notify current owner). 0: Ask current owner and reject request, 1: Allow automatic takeover. | |
748
+
3 (Request timeout) | Timeout in seconds before a request to a GCS to allow takeover is assumed to be rejected. This is used to display the timeout graphically on requester and GCS in control. | min: 3 max: 60 | s
749
+
4 (GCS Sysid) | System ID of GCS requesting control. For a range of GCS in control, this the minimum id (and the sender system ID may be anywhere in the range). | |
750
+
5 (GCS Sysid (upper range)) | Upper range of controlling GCS system IDs. 0 for single-GCS control. If non-zero the sender system ID may be anywhere in the range). | |
Copy file name to clipboardExpand all lines: en/messages/dialects.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,20 +17,20 @@ Dialects are not managed by this project!
17
17
18
18
The dialect definitions are:
19
19
20
-
-[uAvionix.xml](uAvionix.md)
21
-
-[cubepilot.xml](cubepilot.md)
22
20
-[ASLUAV.xml](ASLUAV.md)
23
-
-[paparazzi.xml](paparazzi.md)
24
-
-[stemstudios.xml](stemstudios.md)
21
+
-[uAvionix.xml](uAvionix.md)
25
22
-[ualberta.xml](ualberta.md)
26
-
-[ardupilotmega.xml](ardupilotmega.md)
27
23
-[AVSSUAS.xml](AVSSUAS.md)
28
-
-[storm32.xml](storm32.md)
29
-
-[marsh.xml](marsh.md)
24
+
-[csAirLink.xml](csAirLink.md)
30
25
-[matrixpilot.xml](matrixpilot.md)
31
26
-[icarous.xml](icarous.md)
27
+
-[ardupilotmega.xml](ardupilotmega.md)
28
+
-[marsh.xml](marsh.md)
29
+
-[paparazzi.xml](paparazzi.md)
30
+
-[cubepilot.xml](cubepilot.md)
31
+
-[stemstudios.xml](stemstudios.md)
32
+
-[storm32.xml](storm32.md)
32
33
-[loweheiser.xml](loweheiser.md)
33
-
-[csAirLink.xml](csAirLink.md)
34
34
35
35
Note that dialects may `include`[MAVLink-Standard Definitions](index.md) or other dialects.
36
36
Up to 5 levels of XML file nesting are allowed - see `MAXIMUM_INCLUDE_FILE_NESTING` in [mavgen.py](https://github.com/ArduPilot/pymavlink/blob/master/generator/mavgen.py#L44).
0 commit comments