Software team progress report
The software team’s main goal is to build the dashboard that will display relevant flight information to the pilot. Early in the process, we divided that task into two main parts: collecting data from various sensors, and displaying everything in an easy-to-use interface. Ben has been working on the first part, and Emily has taken on the second.
What information needs to be displayed?
Our sensors support the standard “six pack” of aviation instruments (read more here):
- Airspeed Indicator
- Vertical Speed Indicator
- Attitude Indicator
- Heading Indicator
- Turn Coordinator
These are supported by sensors that can measure airspeed, barometric pressure, temperature, and orientation. The dashboard also contains a maps feature that displays the location of the plane using the GPS sensor.
Our data collection software runs on a microcontroller. Currently, we use the following setup:
- Microcontroller: Teensy 3.0
- Accelerometer, gyroscope, and magnetometer: Adafruit Precision NXP 9-DOF Breakout Board
- Pressure and temperature sensor (used to measure altitude): Adafruit DPS310 Precision Barometric Pressure / Altitude Sensor
- Airspeed sensor: Holybro Air Speed Sensor
The Teensy reads data from all sensors (over I2C or, for the GPS, UART) and passes it to the computer it’s connected to over a USB serial connection, using an NDJSON (Newline Delimited JSON) format:
Getting data to the dashboard
- Broadcast lines of text received over the serial connection to all connected WebSocket clients
- Parse messages as JSON if they are valid JSON
- Automatically retry the serial connection, so the server can be left running while the serial device is plugged in and unplugged
- Broadcast status messages (whether or not a serial device is connected) to all connected clients
- Broadcast errors that occur with the serial connection to all connected clients, and signal that certain messages are errors as opposed to raw data received from the serial device
Currently, the server must be run with the serial port it should watch (e.g. /dev/ttyACM0 on a typical Linux system) as a command line argument. Eventually, we hope to detect this automatically.
Displaying information on the dashboard
The main screen of the dashboard displays data from the “six pack”: an airspeed indicator (ASI), altimeter, vertical speed indicator (VSI), attitude indicator (AI), heading indicator (HI), and turn coordinator (TC). We used HTML SVGs for the animated indicators for the AI, HI, and TC, and simple text for the other three indicators: