Mission
The mission subprotocols allow the GCS to read and update the stored mission on the UAV.
Mission Read
The mission read subprotocol allows the GCS to read the mission from the UAV, either initiated by the Operator or when a connection is established.
Messages
MISSION_READ_REQUESTMISSION_ITEM_COUNTMISSION_ITEM_READ_REQUESTMISSION_ITEMMISSION_ITEM_INVALID
Sequence
sequenceDiagram
participant GCS
participant UAV
loop n
GCS->>UAV: MISSION_READ_REQUEST
GCS->>GCS: Start timeout
alt success
UAV-->>GCS: MISSION_ITEM_COUNT
loop item_count
GCS->>UAV: MISSION_ITEM_READ_REQUEST
GCS->>GCS: Start timeout
alt success
UAV->>GCS: MISSION_ITEM<br />/MISSION_ITEM_INVALID
else failure
GCS->>GCS: Timeout expires
end
end
else failure
GCS->>GCS: Timeout expires
end
end
- When the GCS wants to read the stored mission from the UAV, it sends a
MISSION_READ_REQUESTto the UAV. - The GCS starts a timeout of a fixed duration.
- If the UAV responds with a
MISSION_ITEM_COUNTmessage before the timeout expires, the operation moves ahead. - If the timeout expires before the UAV can send a response, the GCS retries the operation upto
ntimes before the operation is considered a failure, the error is reported and the UAV continues operations. - If the UAV responded in time, the GCS sends
MISSION_ITEM_READ_REQUESTmessages to fetch the waypoints one by one. - The GCS starts a timeout of a fixed duration.
- For each
MISSION_ITEM_READ_REQUEST, if the UAV responds with aMISSION_ITEMmessage, the operation moves ahead. If the UAV instead responds with aMISSION_ITEM_INVALIDmessage (indicating that a corner does not exist for the request index), the operation is cancelled. - If the timeout expires before the UAV can send a response, the entire operation is cancelled.
Notes
- The mission in-use by the GCS is not updated before the entire set of waypoints is received from the UAV. If the operation fails midway, the error is reported and the previous mission continues to be displayed.
- If reading a single waypoint fails, the entire operation is cancelled (this is not obvious from the nested loop structure).
- The transmission of the waypoint count and individual waypoints are kept stateless for easy error handling and recovery -
- If the UAV does not respond with the count/GCS does not receive the count, the GCS retries the operation without affecting the subprotocol state of the UAV, since the count is sent exclusively as a response to the
MISSION_READ_REQUESTmessage. - If the UAV does not respond with a specific waypoint/GCS does not receive the corner, the GCS retries the operation without affecting the subprotocol state of the UAV, since each waypoint is sent exclusively as a response to the
MISSION_ITEM_READ_REQUESTmessage. - A failure at any stage is immediately made known to the Operator by the GCS so that operations can be ceased, without leaving the UAV in an invalid state.
- If the UAV does not respond with the count/GCS does not receive the count, the GCS retries the operation without affecting the subprotocol state of the UAV, since the count is sent exclusively as a response to the
Mission Write
Messages
MISSION_WRITE_REQUESTMISSION_WRITE_REQUEST_NACKMISSION_ITEM_READ_REQUESTMISSION_ITEM
Sequence
sequenceDiagram
participant GCS
participant UAV
loop n
GCS->>UAV: MISSION_WRITE_REQUEST
GCS->>GCS: Start timeout
alt sucess
loop item_count
UAV->>GCS: MISSION_ITEM_READ_REQUEST
UAV->>UAV: Start timeout
alt success
GCS-->>UAV: MISSION_ITEM
else failure
UAV->>UAV: Timeout expires
end
end
else cancelled
UAV-->>GCS: MISSION_WRITE_REQUEST_NACK
else failure
GCS->>GCS: Timeout expires
end
end
- When the GCS wants to update the stored mission on the UAV, it sends a
MISSION_WRITE_REQUESTmessage (includes the number of waypoints) to the UAV. - The GCS starts a timeout of a fixed duration.
- If the UAV responds with a
MISSION_ITEM_READ_REQUESTmessage before the timeout expires, the operation moves ahead. - If the timout expires before the UAV can send a response, the GCS retries the operation upto
ntimes, before it is considered a failure. - Each time after the UAV responds with a
MISSION_ITEM_READ_REQUEST, it starts a timeout. - If the GCS responds with a
MISSION_ITEMmessage before the timeout expires, the operation is moves ahead. - If the timeout expires before GCS can send a response, the entire operation is cancelled.
Notes
- The mission in-use by the UAV is not updated before the entire set of corners is received from the GCS. If the operation fails midway, the error is reported and the previous geofence continues to be displayed.
- If reading a single waypoint fails, the entire operation is cancelled (this is not obvious from the nested loop structure).