Embedded Radio Tracker (ERT) is an application primarily aimed to track high-altitude balloons. The software is modular and very configurable so it is basically a general-purpose radio tracker that can be extended and modified easily. In addition to tracking high-altitude balloons, it could be used to track vehicles or it could even function as a remote weather station.
NOTE: The project in its current state can be considered as a proof-of-concept implementation, since it has been tested very lightly and there are only few automated unit tests for the code.
The project consists of two applications:
-
ertnode
— a tracker application transmitting GPS location, sensor and image data -
ertgateway
— a receiver application for allertnode
data
So, simply put…
ertnode
is an application that performs the actual tracking: it should be run in a device attached to the object that
needs to be tracked, e.g. a weather balloon or a vehicle. It collects telemetry data and takes photographs
(currently only with Raspberry Pi camera) and transmits most useful parts (e.g. location) of the data over
LoRa radio to ertgateway
receivers.
ertgateway
is responsible for receiving telemetry data messages and images transmitted by ertnode
and
providing network APIs and a user interface (with ertgateway-ui-web
) to view the received data. The device
running ertgateway
can be used as a fixed base station or, in the case of tracking high-altitude balloons,
as a mobile station in a chase car.
ertgateway-ui-web
is a web-based user interfaces that provides access to the telemetry data messages and images
received and collected by ertgateway
. The user interface source code is in another repository and it has to be built
and installed separately from the rest of the application.
The project code is arranged in modules and layers, so that higher-level code uses plain C11 and POSIX APIs. There is a lightweight hardware abstraction layer (HAL) in the code: Linux- and Raspberry Pi-specific code has been extracted to separate modules.
The main applications ertnode
and ertgateway
have relatively small amount of code and application logic,
since they share much of their code. The shared functionality is provided by two libraries: libert
and
libertapp
.
libert
is a library containing a collection of hardware drivers, abstractions and commonly used routines needed to
develop embedded applications on Linux and Raspberry Pi (although most of the code is generic and can be used on
other hardware platforms too). It also includes some more specific functionality for ERT, such as the data logger
and sensor APIs. The library code is organized in modules that can be used as basic building blocks for
higher-level applications.
See libert documentation.
libertapp
implements high-level features that are specific and common to both ertnode
and ertgateway
.
Most of the code consists of the implementation of the HTTP and WebSocket server and related API endpoint routines.
The project code depends on a bunch of libraries, some of which have been cloned to either add CMake build support
or to modify it for more fine-grained configuration. Most of the libraries are included as GIT submodules in
the deps
directory, because they are not widely available for easy installation in Linux distributions.
The included (and forked) library dependencies are:
-
zlog
for fast and configurable application logging-
Support for CMake build was merged from another fork and adapted for better control of build artifacts
-
-
jansson
>= 2.10
for JSON encoding of logs and API responses -
msgpack-c
>= 2.1.1
for MsgPack encoding and decoding of telemetry data transferred over wireless LoRa link -
libwebsockets
>= 2.2.0
for HTTP and WebSocket APIs -
RTIMULib
provides drivers for all Sense HAT sensors and proper calculation of pose/orientation for IMU -
WiringPi
>= 2.44
for GPIO access and interrupt handlers: forked to support parameters (context) for interrupt handlers-
Support for interrupt handler context parameters added to my fork of
WiringPi
library
-
The external library dependencies, which need to be installed on the system, are:
To install the external library dependencies on Raspbian, execute:
apt-get install gpsd libgps21 libgps-dev libyaml-0-2 libyaml-dev
The ertnode
application takes photos with the Raspberry Pi camera and converts the photos to low-quality
thumbnails in WEBP format. These operations require the following external tools to be installed:
-
raspistill
command-line utility to take photographs using the Raspberry Pi camera -
ImageMagick
convert
for converting JPEG images to thumbnail WEBP -
cwebp
command-line utility fromwebp
package to add WEBP support toconvert
To install these tools on Raspbian, execute:
apt-get install libraspberrypi-bin webp imagemagick
The minimum hardware requirements for running ertnode
and ertgateway
are:
-
A Raspberry Pi model A+, B+, Zero, 2B or 3B (any model with 40-pin GPIO connector)
-
A GPS receiver supported by
gpsd
— any receiver outputting NMEA format data through serial port should work -
A Semtech SX127x / HopeRF RFM9xW LoRa radio transceiver connected to Raspberry Pi SPI port
There are more detailed hardware requirements and installation instructions available for both applications:
ertgateway
and ertnode
.
Modules:
-
ertnode documentation and installation instructions
-
ertgateway documentation and installation instructions
-
libert documentation
-
libertapp documentation
Technical documentation:
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.