PID Gains
The PID gains subprotocols allow the GCS to read and update the PID gains for the various controllers used by the UAV.
PID Gains Read
The PID gains read subprotocol allows the GCS to read the PID gains used by the UAV in one of its controllers, either initiated by the Operator or when a connection is established.
Messages
PID_GAINS_READ_REQUESTPID_GAINS
Sequence
sequenceDiagram
participant GCS
participant UAV
loop n
GCS->>UAV: PID_GAINS_READ_REQUEST
GCS->>GCS: Start timeout
alt success
UAV-->>GCS: PID_GAINS
else failure
GCS->>GCS: Timeout expires
end
end
- If the GCS wants to read the stored PID gains of a specific controller from the UAV (including when a connection is established), it sends a
PID_GAINS_READ_REQUESTmessage to the UAV. - The GCS starts a timeout of a fixed duration.
- If the UAV responds with a
PID_GAINSmessage before the timeout expires, the operation is considered a successful. - If the timeout expires before the UAV can respond, the GCS retries the operation upto
ntimes before the operation is considered a failure, the error is reported and the UAV continues operations.
PID Gains Write
The PID gains write subprotocol allows the GCS to update the PID gains used by the UAV in one of its controllers.
Messages
PID_GAINS_WRITE_REQUESTPID_GAINS_WRITE_REQUEST_ACK
Sequence
sequenceDiagram
participant GCS
participant UAV
loop n
GCS->>UAV: PID_GAINS_WRITE_REQUEST
GCS->>GCS: Start timeout
alt success
loop n
UAV-->>GCS: PID_GAINS_READ_REQUEST
UAV->>UAV: Start timeout
alt success
loop n
GCS->>UAV: PID_GAINS
GCS->>GCS: Start timeout
alt success
UAV-->>GCS: PID_GAINS_ACK
else cancelled
UAV-->GCS: PID_GAINS_NACK
else failure
GCS->>GCS: Timeout expired
end
end
else failure
end
end
else cancelled
UAV->>GCS: PID_GAINS_WRITE_REQUEST_NACK
else failure
GCS->>GCS: Timeout expires
end
end
- If the GCS wants to update the stored PID gains of a specific controller from the UAV, it sends a
PID_GAINS_WRITE_REQUESTmessage to the UAV (includes the new PID gains). - The GCS starts a timeout of a fixed duration.
- If the UAV responds with a
PID_GAINS_WRITE_REQUEST_ACKmessage before the timeout expires, the operation is considered successful. - 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.