Ground station telemetry

This page details the requirements of the app that runs on the groundstation and communicates with the aircraft over radio link.

 

Inputs/Outputs

 

For every PIGO struct sent out, a POGI struct will be received, so in some sense, the app will always be operating in both sending and receiving mode.

TX mode:

  • Inputs

    • CV program’s output

      • It was agreed that the CV program would output data to a file in the form of a json struct. That Json struct should be specified in this document. It is a subset of the PIGO struct, however.

    • Pilot’s flightpath instructions

      • A pilot on the ground should be able to load, modify or delete a flightpath into the aircraft. This involves loading in some arbitrary number of GPS waypoints and a series of operations and options. (Talk to Dhruv about this). This will likely be done by loading in a file, but that has not yet been set in stone

  • Outputs

    • A PIGO struct

      • The plane-in-ground-out data that contains all the required information and gets sent over serial to the Xbee.

RX mode:

  • Inputs

    • A POGI struct

      • The struct sent down from the airplane that contains info to be passed to the CV program and info to be passed to the pilot on the ground (printf is fine).

    • Outputs

      • CV’s struct

        • You can write the entire POGI struct into a Json file and let the CV program sort out what they need.

      • Pilot info

        • Print out a few of the fields that could be of use (which fields to print will be specified later).

 

Program Guts

Once data is collected, the only thing the program needs to do before sending that data out is to either encode it into mavlink format (in transmission mode) or decode it from mavlink format (in receiving mode). The good news is that Gordon and Jingting are working on doing exactly that on the aircraft side of things and it should look identical (save for the population/depopulation of data) on the ground side. Mavlink takes care of checksums and acks and delivering missing packets and all this sortof stuff, I would suggest you meet with Jingting and Gordon to understand exactly how.

 

Considerations

An important consideration is that you will be communicating with a real time program (on the aircraft) that sends data at a fixed interval (likely 1 Hz) while your program runs on linux, which isn’t a real time OS. This means you’l likely have to use some sort of fifo on both the tx and rx side to make sure you don’t miss any transmissions.

 

A second tough part will be actually communicating with the XBee. We’ve successfully used them with a mac before, but this will be a bit different. Again, Jingting and Gordon are most knowledgeable about this, but Bassel has provided this link to get started

https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf

 

Getting started

Some advice to get started, which you should feel free to ignore if need be.

  • Figure out something about QT

  • Import/export a Json struct from/to a file in C++

  • Talk to Dhruv to understand exactly how the user will provide a flightpath

  • Reach out to Jingting/Gordon to figure out mavlink and build in the encoding

  • Once you get closer to here we’ll figure out if it’s best to ship you an Xbee or hook one up to the WARG desktop and have you remote into it.

Appendix

 

(credits to Bassel for the drawing)