Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Drone to Ground Station Communication via RFD 900 Radio

    1. RX

      1. Receive raw MAVLink bytes from the ground station.

    2. TX

      1. Transmit raw MAVLink bytes from the ground station.

  2. Encode & Decode Raw MAVLink Data

    1. Encode

      1. Into Mavlink bytes to send to Mission Planner transmitted via RFD 900

    2. Decode

      1. Decode raw Mavlink bytes received from Mission Planner, received via RFD 900.

  3. Ingest Drone State Data (Lat, Lng, Velocity, Pitch, etc) via C++ references

    1. Should these references be passed at TM instantiation?

    2. Is there a finite list of drone state data TM will be ingesting?

    3. Sample rate?

  4. TM will communicate with other managers via [UNDEFINED COMMUNICATION MEDIUM]: Maybe for TM, this should go in M3?

    1. ROS LCM?

    2. Byte Streams?

    3. MQTT Style?

  5. TM will have an input/output testing strategy

    1. ?

Thread 1 (translateToMavlinkThread)

  • Parse messages in the receive buffer (which is also the circular DMA buffer)

Code Block
languagecpp
/**
 * @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)

  • Encode messages and add to transmit buffer

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