Feed the glider traffic in your area to the Open Glider Network (OGN) using a Raspberry Pi 3 or 4 with balena!
Tracking commercial aircraft has long become commonplace through popular services such as FlightAware, Flightradar24, and Plane Finder. Smaller soaring aircraft such as gliders, paragliders, and drones are not equipped with ADS-B transponders, however, and have been impossible to track.
With Open Glider Network (OGN) and syndicator sites such as Spot the Gliders, GliderRadar, GliderTracker, PureTrack.io, and Glide and Seek, that's changing. OGN is a community-powered service that tracks smaller aircraft using lightweight beacon technology such as FLARM, FANET, and ADS-L.
Sounds fun? To start feeding data to Open Glider Network and OpenSky Network, you need a Raspberry Pi, an RTL-SDR USB stick, and an antenna—together with the code and instructions below.
👉🏻 Subscribe to our newsletter 👈🏻 to stay updated on the latest development of this project and its sister project balena ADS-B Flight Tracker.
💬 Ask a question in our discussion board
✏️ Create a post in our balena forum thread
🚨 Raise an issue on GitHub
Intel NUC | |
Nvidia Jetson Nano 2GB Devkit SD | |
Raspberry Pi 3 Model B+ | |
Raspberry Pi 3 (using 64bit OS) | |
Raspberry Pi 4 (using 64bit OS) | |
Raspberry Pi 5 |
Please let us know if you are successfully running balena-ogn on a hardware platform not listed here!
The balena-ogn project was created and is maintained by Ketil Moland Olsen. It is based on the splendid ogn-pi34 repository maintained by the one and only VirusPilot. Thank you kindly for your excellent work! Improvements and refactoring by Meisterschueler. Thanks! And big kudo goes to the team behind Open Glider Network for making it all possible.
Software packages downloaded, installed, and configured by the balena-ogn script are disclosed in CREDITS.md.
- Part 1 – Build the receiver
- Part 2 – Initial setup
- Part 3 – Configuration
- Part 4 – Combining OGN and ADS-B feeding
- Part 5 – Advanced configuration
- Part 6 – Updating to the latest version
In its most minimal configuration, the receiver can be built using three core components: A currently supported device (see the complete list above), a good RTL-SDR USB dongle and an 868 MHz (for Europe, Africa, and New Zealand) or 915 MHz (for USA and Australia) antenna. In addition, you would need a power supply for the device, an SD card to install the operating system on, an antenna cable, and – depending on your choice – an SMA adapter. If you don't have it already, you'll need a SD card reader, too. Although not strictly necessary, a case could be a good idea for the device.
Piecing together the pieces should be straightforward. For more information, including other antenna options, look at the official OGN hardware docs. (Remember: For balena-ogn to work, please go with a device from the supported devices list.)
On a high level, there are two ways to deploy balena-ogn. The easy way to get started is to simply click this button:
It will take you through creating (or logging into an existing) balena account and deploying the solution to an SD card you insert into a computing device of your choice. When you finish, the new device will appear on the balena dashboard. Magic! When this is done, you can skip directly to Part 3 – Configuration.
If you want to have more granular control or maybe pair balena-ogn with its sister project balena-ads-b, you might want to walk through this manual procedure instead:
- Create a free balena account. You might be asked to upload your public SSH key during the process. If you don't have a public SSH key yet, you can create one.
- Sign in to balena and head to the Fleets panel.
- Create a fleet with the name of your choice for your device type. Please take note of the fleet name. Just so you know, you will need it later. In the dialogue that appears, pick a Default Device Type that matches your device. Specify the SSID and password if you want to use WiFi (and your device supports it).
- balena will create an SD card image for you, which will download automatically after a few seconds. Flash the image to an SD card using balena's dedicated tool balenaEtcher.
- Insert the SD card in your receiver, and connect it to your cabled network (unless you plan to use WiFi only and configured that in step 3).
- Power up the receiver.
- From the balena dashboard, navigate to the fleet you created. A new device with an automatically generated name should appear within a few minutes. Click on it to open it.
- You can rename your device to your taste by clicking on the pencil icon next to the current device name.
- Almost there! Next, we will push the balena-ogn code to your device through the balena cloud. We'll do that using the balena CLI. Follow the official instructions to download and install the CLI for your operating system of choice.
- After installing the balena-cli, head into your terminal and log in to balena with the following command:
balena login
. Then, follow the instructions on the screen. - Clone the balena-ogn repository to your local computer:
git clone git@github.com:ketilmo/balena-ogn.git
. You can also fork the repo if you want to make changes to it. - Head into the folder of the newly cloned repo by typing
cd balena-ogn
. - Do you remember your fleet name from earlier? Good. Now, we are ready to push the applications to balena's servers by typing
balena push YOUR–FLEET–NAME–HERE
. - Now, wait while the Docker containers build on balena's servers. If the process is successful, you will see a beautiful piece of ASCII art depicting a unicorn right in your terminal window:
\ \ \\ \\ >\/7 _.-(6' \ (=___._/` \ ) \ | / / | / > / j < _\ _.-' : ``. \ r=._\ `. <`\\_ \ .`-. \ r-7 `-. ._ ' . `\ \`, `-.`7 7) ) \/ \| \' / `-._ || .' \\ ( >\ > ,.-' >.' <.'_.'' <'
- Wait a few moments while the Docker containers are deployed and installed on your device. The groundwork is now done – good job!
With your device installed and ready, the next step is to go ahead and configure it. One of the neat features of balena is that all configuration lives in variables that can easily be added through balena's dashboard. Below, we'll go through the concept of adding these variables.
Configuration variables are core to balena, and we'll add quite a few during the setup. The procedure is simple:
- Open the balena console and the Fleets panel. Then, click on the device you created earlier.
- Click on the Device Variables-button on the left-hand side of the screen.
- Click on the blue Add variable-button on the upper left-hand side of the screen.
- Select Service as specified in the instructions (below), and type in the variable Name and Value as specified.
- Click the Add button.
- Add more variables if desired, repeating steps 3 to 5.
- When done, commit the changes to balena by clicking the Apply all changes button on the lower left-hand side of the screen. (Alternatively, revert the changes by clicking the red Revert all changes button.)
- balena will now restart the services you have configured. Within a minute or two, everything should be operational.
Your OGN station will need a unique name to connect to the OGN services. The name will need to follow the OGN naming convention, and should have
- Minimum 3 characters
- Maximum 9 characters
- Characters and numbers only (A-Z, a-z and 0-9)
If, and only if, your receiver is located at an airport or airfield, give it a 4-character ICAO code identifier. It is important to keep the identifier in upper-case notation, e.g.:
- LFLE (Challes-les-Eaux)
- LFLG (Grenoble, Versoud)
- LFLP (Annecy, Meythet)
- EPZR (ZAR, Poland)
If there is no ICAO code identifier for the airport, use the name of the airport in the CamelCase naming convention, e.g.:
- Koenigsdf (Gliding Center Königsdorf, Bavaria)
- Klippneck (Klippeneck, Germany)
- BadWrshfn (Bad Wörishofen, Germany)
For other locations than airports (cities, towns, private houses, etc..) please follow the CamelCase naming convention. In addition, it's recommended to choose a name corresponding to the closest "known" place (town, institute, mountain, etc.), e.g.:
- Cern (European Organization for Nuclear Research, Geneva, Switzerland)
- Paris
- Cluses (Receiver near Cluses, France)
- LeNoiray
- Marmolada (Highest mountain of the dolomites, Italy)
If there is more than one receiver at a given location, you can use numbers or cardinal direction (N, W, S, E).
- HugeTown1
- HugeTown2
- MyTownN
- MyTownS
- A receiver is often located at the airport/airfield, so you don't need to mention this. (Bad: HoyaFlpl, EDLGTurm. Good: Hoya, EDLG.)
- Don't use country codes in the name. (Bad: DEboetzow. Good: Boetzow.)
- Don't use abbreviations too much. The maximum of 9 characters should be enough in most cases. (Bad: BOZ. Better: BergenOZ or BgOpZoom. Bad: Strass1. Better: Strassham.)
- Choose a name you can google. (Bad: Something cryptic like hgrtl, HGC, KCCM, SFVWUG, flevonet2.)
- Don't write out cardinal directions. (Bad: LSZKWest, UrySud. Good: LSZKW, UryS. Even better: LSZK, Ury.)
In the UK, if a receiver is near a BGA turn point, it can be named UKXXX, where XXX is the BGA turn point, e.g. UKFOX. (Note: This does not have a dash.)
Adapted from wiki.glidernet.org
Have you been able to find the perfect name for your station that follows the naming convention? And checked with one of the OGN sites, such as GliderRadar or GliderTracker, that it is not already taken? Perfect! Let's set that name in balena:
- Set the receiver name by creating a configuration variable for the service ogn with the name
APRS_Call
and a value corresponding to the receiver name, e.g.Copenhagen
.
Next, we'll configure the receiver with its geographic location. Unless you know this by heart, you can use Google Maps to find it. The corresponding coordinates should appear when you click on your desired location on the map. We are looking for the decimal coordinates, which should look like 60.395429, 5.325127.
You must also specify the antenna's altitude in meters above sea level. If you need to find the altitude, you use one of several online services. Remember to add the approximate number of corresponding meters if your antenna is above ground level.
- Set the receiver latitude by creating a configuration variable for All services with the name
Position_Latitude
and a value corresponding to the decimal latitude, e.g.60.12345
. - Set the receiver longitude by creating a configuration variable for All services with the name
Position_Longitude
and a value corresponding to the decimal longitude, e.g.4.12345
. - Set the receiver antenna's altitude by creating a configuration variable for All services with the name
Position_Altitude
and a value corresponding to the altitude above sea level in meters, e.g.45
.
That's it! After the services have restarted, your shiny new OGN station should appear on the map.
One of the great things about balena is that it's easy to run several different services on one box with proper isolation. Instructions on how you can combine balena-ogn and balena-ads-b are coming soon. Subscribe to our newsletter to be notified when the instructions are ready, or reach out to the repo's maintainer if you just can't wait – and are ready for some manual work.
SDR PPM calibration is only required for non-TCXO SDRs and is currently a manual process in balena-ogn. Using a TCXO SDR is highly recommended, as explained in Part 1 – Build the receiver. If you need to adjust the PPM, you can do so manually by creating a configuration variable for the service ogn with the name RF_FreqCorr
and a value corresponding to the desired frequency correction, e.g. 40
.
In addition to feeding flight data to OGN, you can send the same data to the research project OpenSky Network. The more parties that can use your data, the better, right?
- Enable OpenSky Network feeding by creating a configuration variable for the service ogn with the name
RF_Demodulator_MergeServer
and the valueflarm-collector.opensky-network.org:20002
.
If your device comes up without an active connection to the Internet, the wifi-connect
container will create a network with a captive portal to connect to a local WiFi network. This lets you switch networks after the initial setup without reinstalling the SD card. The SSID for the created hotspot is balenaWiFi
, and the password is balenaWiFi
. When connected, visit http://192.168.42.1:8181/
in your web browser to set up the connection.
You can disable the balena-ogn services by creating a Device Variable named DISABLED_SERVICES
with the services you want to disable as comma-separated values. For example, if you want to disable the ogn service, set the DISABLED_SERVICES
variable to ogn
.
Updating to the latest version is trivial. If you installed balena-ogn using the blue Deploy with balena-button, you can click it again and overwrite your current application. Choose the "Deploy to existing fleet" option, then select the fleet you want to update. All settings will be preserved. For convenience, the button is right here:
If you used the manual balena push
method, pull the changes from the master branch and push the update to your application with the balena CLI. For complete instructions, look at Part 2 – Initial setup.
Enjoy!