• Software

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

  • Altimeter

  • 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.


Collecting information

Our data collection software runs on a microcontroller. Currently, we use the following setup:


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

There is a web API for reading data from a serial port, but it is only supported by Chrome, and even Chrome’s support is buggy. We use a small helper to transfer data from the serial port to the dashboard over a WebSocket connection. The helper is written in JavaScript using Node.js, with SerialPort to access the serial connection and ws to run a WebSocket server. The server has the following features:

  • 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:




93 views