Command Pipeline
Author: Tavina Chen | Last Major Update: Tavina on 8/27/2026 | Contact: taffykat (Discord)
Patient Location
Section titled “Patient Location”
- Telemetry manager recieves Telemetry
- Telemetry manager checks Telemetry for message flag 2, indicating the patient has been found
- The Patient Location Manager uses the send_command() method to send the patient location to every vehicle
- Telemetry Manager checks the Telemetry of each vehicle for an acknowledgement of the PatientLocation command
- Once a vehicle has acknowledged the command, it is removed from the set.
- The Patient Location Manager will retry up to 10 times to send the PatientLocation command
- On the GCS Desktop, the telemetry is consumed and processed to display the statuses “Located” and “Secured”
Heartbeat
Section titled “Heartbeat”Method 1: GCS App Impl (Currently Partically Working)
Section titled “Method 1: GCS App Impl (Currently Partically Working)”
- On the GCS Desktop, the telemetry is consumed and processed to update the connection status
- The VehicleHeartbeat keeps track of when a telemetry packet was last recieved from a vehicle.
- If the time exceeds the timeout, it is updated to display a “Disconnected” status
- If a vehicle was disconnected and there is telemetry being recieved, it is updated to display a “Connected” status
Method 2: SI Repo Impl (Currently broken/not used?)
Section titled “Method 2: SI Repo Impl (Currently broken/not used?)”
- Each vehicle has their own Heartbeat Manger
- It sends the Heartbeat command with the calculated status every second
- This status is updated in the telemetry before publishing it to the RabbitMQ telemetry queue
- The GCS App State Manager consumes the telemetry which is then emited to the UI and logged in the database
In the case of Disconnection
Section titled “In the case of Disconnection”- The Heartbeat Manager will send out 10 consecutive Disconnected Heartbeat statuses to the vehicle before shutting down. These are considered the reconnection attempts
- It will publish the last known telemetry packet data of that vehicle with the Disconnected status to the RabbitMQ telemetry queue
Why send Heartbeat(status)?
Section titled “Why send Heartbeat(status)?”Sending the Heartbeat is a way of “pinging” the vehicle to check if the connection is working.
Sending the status (bi-directionally) aims to solve cases where the vehicle thinks it is connected but isn’t and vice versa. It also allows the vehicles to differentiate between regular heartbeats and a reconnection attempt.
Otherwise, it is sending telemetry into the void without feedback.
Other Commands
Section titled “Other Commands”
- The user presses a UI button (Emergency Stop, Start Mission) which updates the GCS App State Manager
- The State Manager publishes a command into a unique, temporary, RabbitMQ queue
- This queue will manage the timeout of the command
- The Command Manager consumes the command from the queue
- The command gets encoded and sent to the vehicle through the GCS Xbee
- Telemetry Manager checks the Telemetry for an acknowledgement of the command
- Once the command is acknowledged, a RabbitMQ ack is sent back to the same unique queue
- If the queue expires without an ack, a toast notification will appear on the UI alerting the operator that the command failed to send