GOAL: Stream GLOBAL_POSITION_INT & ATTITUDE messages to the ground station to be displayed on Mission Planner.
TM Will:
Drone to Ground Station Communication via RFD 900 Radio
RX
Receive raw MAVLink bytes from the ground station.
TX
Transmit raw MAVLink bytes from the ground station.
Encode & Decode Raw MAVLink Data
Encode
Into Mavlink bytes to send to Mission Planner transmitted via RFD 900
Decode
Decode raw Mavlink bytes received from Mission Planner, received via RFD 900.
Ingest Drone State Data (Lat, Lng, Velocity, Pitch, etc) via C++ references
Should these references be passed at TM instantiation?
Is there a finite list of drone state data TM will be ingesting?
Sample rate?
TM will communicate with other managers via [UNDEFINED COMMUNICATION MEDIUM]: Maybe for TM, this should go in M3?
ROS LCM?
Byte Streams?
MQTT Style?
TM will have an input/output testing strategy
?
Thread 1 (translateToMavlinkThread)
/** * @brief This thread is responsible for taking the bytes from the GSC.DMAReceiveBuffer and * converting them to Mavlink messages/triggering the callbacks associated with each mavlink * message. */ void translateToMavlinkThread() { while (true) { MT.bytesToMavlinkMsg(GSC.DMAReceiveBuffer); vTaskDelay(pdMS_TO_TICKS(10)); // Adjust the delay as necessary } }
Thread 2 (mavlinkToBytesThread)
/** * @brief This thread is responsible for taking data from other managers and converting * them to mavlink bytes, then putting them into GSC.lowPriorityTransmitBuffer. */ void mavlinkToBytesThread() { while (true) { // START: fill GSC.lowPriorityTransmitBuffer with data to transmit // END: fill GSC.lowPriorityTransmitBuffer with data to transmit vTaskDelay(pdMS_TO_TICKS(10)); // Adjust the delay as necessary } }
DMA
If the received buffer has space dump bytes into it otherwise disregard the received data
Timer Based Interrupt
Timer Interrupt 1 (GeneralTransmission)
Every 500 ms empty transmit buffer
Time Interrupt 2 ()
Every 1000 ms encode Heartbeat, GPS, Time, Attitude (most important data), and send it off via RFD 900
Add Comment