Comment on page
Prepare the Application Environment
In this step, we prepare the folder structure for our "adsb" application, and create a ".env" file containing our basic details.
We need a directory to host our application. The name of this directory will be the name of our application. Accordingly, we prefer to use
/opt/adsb, so our application is called "adsb":
sudo mkdir -p -m 777 /opt/adsb
A UUID is a unique identifier that will identify you to various feeding servers. If you already have a
UUIDthat was generated for the ADSBExchange service, feel free to reuse that one. If you don't have one, you can generate one by logging onto you Linux machine (Raspberry Pi, etc.) and giving this command:
You can use the output string of this command (in format of
00000000-0000-0000-0000-000000000000) as your UUID. Please use the same UUID consistently for each feeder of your station.
Every RTL-SDR dongle that does not have TXCO(temperature compensated crystal oscillators) will have a small frequency error as it is cheaply mass produced and not tested for accuracy. This frequency error is linear across the spectrum, and can be adjusted in most SDR programs by entering a PPM (parts per million) offset value. This allows you to adjust the PPM figure using the ADSB_SDR_PPM environment variable.
This step is considered optional and mostly legacy/unnessary at this point, as modern SDRs have TXCO and are likely to be accurate enough for ADS-B reception. However, if you wish to determine the PPM value for your SDR, you can do so by following the instructions below.
Unplug all SDRs, leaving only the SDR to be used for 1090MHz reception plugged in. Issue the following command:
docker run --rm -it --entrypoint /scripts/estimate_rtlsdr_ppm.sh --device /dev/bus/usb ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest
This takes about 30 minutes and will print a numerical value for Estimated optimum PPM setting.
Heywhatsthat is a website that can generate an overlay on your map that will show the theoretical range of your location based on obstacles and the curvature of the earth. Follow step 1 at the instructions here to generate a panorama for your feeder's location and altitude. In the upper left of the panorama page there will be a URL that will look like this:
https://www.heywhatsthat.com/?view=NN3NNNN1. That code will be used later in the setup instructions.
Inside this directory, create a file named
.envusing your favourite text editor. Beginners may find the editor
nanoeasy to use:
This file will hold all of the commonly used variables (such as our latitude, longitude and altitude). Initially, add the contents of the file as follows (replacing the values enclosed in
<>with values for your environment:
FEEDER_ALT_FT=<your antenna's altitude in feet>
FEEDER_ALT_M=<your antenna's altitude in metres>
FEEDER_NAME=<your location name>
ADSB_SDR_GAIN=<your desired gain>
ADSB_SDR_PPM=<your PPM from the step above>
ULTRAFEEDER_UUID=<your UUID from the step above>
FEEDER_HEYWHATSTHAT_ID=<your heywhatsthat ID from the step above>
FEEDER_HEYWHATSTHAT_ALTS=<desired theoretical range altitudes>
FEEDER_LATis set to your antenna's latitude (also available at link above)
FEEDER_LONGis set to your antenna's longitude (also available at link above)
FEEDER_NAMEis set to a location name. This is only used in the title of the map's web page.
ADSB_SDR_SERIALis set to the serial number for your ADS-B dongle; the previous steps set this to 1090 by default but if you have used a different serial number enter it here
ADSB_SDR_GAINis set to your desired dongle gain in dB, or
autogainif you would like the software to determine the optimal gain
ADSB_SDR_PPMis set to your desired dongle PPM setting. Enter the number from the PPM estimation step earlier on this page.
ULTRAFEEDER_UUIDis set to the UUID you generated above
FEEDER_HEYWHATSTHAT_IDis set to the code in the URL generated above
FEEDER_HEYWHATSTHAT_ALTSis a comma delimited list of altitudes in meters for which the map will display a theoretical maximum range; a common starting position is 3000 meters and 12000 meters
Note for beginners: If you run an
lscommand in that directory, you won't see your
.envfile. Files beginning with a period are treated as hidden files. To see the file, you can run
-afor all files).