Skip to content

Latest commit

 

History

History
142 lines (113 loc) · 7.16 KB

feeding-ads-b-exchange.md

File metadata and controls

142 lines (113 loc) · 7.16 KB
description
If you wish to feed ADS-B Exchange, follow the steps below.

Feeding ADS-B Exchange

ADSBExchange.com is a co-op of ADS-B/Mode S/MLAT feeders from around the world, and the world’s largest source of unfiltered flight data.

The docker image mikenye/adsbexchange contains the ADS-B Exchange feeder software and all of its required prerequisites and libraries. This needs to run in conjunction with readsb (or another Beast provider).

Generating a UUID

If you are new to feeding ADS-B Exchange, you will need to generate a UUID for your feeder. If you already have a UUID from an existing feeder that you wish to re-use, you can skip this step.

In order to generate a feeder UUID, run the following command:

docker run --rm -it --entrypoint uuidgen mikenye/adsbexchange -t

Take note of the UUID returned.

Update .env file

Inside your application directory (/opt/adsb), edit the .env file using your favourite text editor. Beginners may find the editor nano easy to use:

nano /opt/adsb/.env

This file holds all of the commonly used variables (such as our latitude, longitude and altitude). We're going to add our ADS-B Exchange variables to this file. Add the following lines to the file:

ADSBX_UUID=YOURUUID
ADSBX_SITENAME=YOURSITENAME
  • Replace YOURSITENAME with a unique name for your receiver, using only the characters "A-Z", "a-z", (-) and (_), and ending in a random number.
  • Replace YOURUUID with the UUID that was generated in the previous step.

For example:

ADSBX_UUID=4e8413e6-52eb-11ea-8681-1c1b0d925d3g
ADSBX_SITENAME=johnsmith_123

Deploying ADS-B Exchange feeder

Open the docker-compose.yml file that was created when deploying readsb.

Append the following lines to the end of the file (inside the services: section):

  adsbx:
    image: mikenye/adsbexchange:latest
    tty: true
    container_name: adsbx
    restart: always
    depends_on:
      - readsb
    environment:
      - BEASTHOST=readsb
      - LAT=${FEEDER_LAT}
      - LONG=${FEEDER_LONG}
      - ALT=${FEEDER_ALT_M}m
      - SITENAME=${ADSBX_SITENAME}
      - UUID=${ADSBX_UUID}
      - TZ=${FEEDER_TZ}

To explain what's going on in this addition:

  • We're creating a container called adsbx, from the image mikenye/adsbexchange:latest.
  • We're passing several environment variables to the container:
    • BEASTHOST=readsb to inform the feeder to get its ADSB data from the container readsb over our private adsbnet network.
    • LAT will use the FEEDER_LAT variable from your .env file.
    • LONG will use the FEEDER_LONG variable from your .env file.
    • ALT will use the FEEDER_ALT_M variable from your .env file.
    • SITENAME will use the ADSBX_SITENAME variable from your .env file.
    • UUID will use the ADSBX_UUID variable from your .env file.
    • TZ will use the FEEDER_TZ variable from your .env file.

Once the file has been updated, issue the command docker-compose up -d in the application directory to apply the changes and bring up the adsbx container. You should see the following output:

readsb is up-to-date
Creating adsbx

You can see from the output above that the readsb container was left alone (as the configuration for this container did not change), and a new container adsbx was created.

We can view the logs for the environment with the command docker-compose logs, or continually "tail" them with docker-compose logs -f. We should now see logs from our newly created adsbx container:

adsbx             | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
adsbx             | [s6-init] ensuring user provided files have correct perms...exited 0.
adsbx             | [fix-attrs.d] applying ownership & permissions fixes...
adsbx             | [fix-attrs.d] done.
adsbx             | [cont-init.d] executing container initialization scripts...
adsbx             | [cont-init.d] 01-adsbexchange: executing...
adsbx             | Statistics available at: https://www.adsbexchange.com/api/feeders/?feed=4e8413e6-52eb-11ea-8681-1c1b0d925d3g
adsbx             | [cont-init.d] 01-adsbexchange: exited 0.
adsbx             | [cont-init.d] done.
adsbx             | [services.d] starting services
adsbx             | [services.d] done.
adsbx             | [adsbexchange-feed] Fri Nov 20 14:48:27 2020 AWST  readsb starting up.
adsbx             | [adsbexchange-feed] readsb version: wiedehopf git: 9f533868 (cpr focus json_reliable fast track, Sun Oct 18 18:26:34 2020 0200)
adsbx             | [adsbexchange-feed] struct sizes: 1552, 24, 64, 100
adsbx             | [adsbexchange-stats] Found local resolver in resolv.conf, disabling DNS Cache
adsbx             | [adsbexchange-stats] Using UUID [4e8413e6-52eb-11ea-8681-1c1b0d925d3g] for stats uploads
adsbx             | [adsbexchange-stats] Using JSON directory [/run/adsbexchange-feed] for source data
adsbx             | [adsbexchange-stats] NOT using script's DNS cache
adsbx             | [mlat-client] mlat-client 0.3.1 starting up
adsbx             | [mlat-client] Listening for Beast-format results connection on port 30105
adsbx             | [mlat-client] Connecting to feed.adsbexchange.com:31090
adsbx             | [adsbexchange-feed] Beast TCP input: Connection established: readsb (172.30.0.12) port 30005
adsbx             | [mlat-client] Connected to multilateration server at feed.adsbexchange.com:31090, handshaking
adsbx             | [adsbexchange-feed] BeastReduce TCP output: Connection established: feed.adsbexchange.com (216.48.109.64) port 30004
adsbx             | [adsbexchange-feed] UUID: 4e8413e6-52eb-11ea-8681-1c1b0d925d3g
adsbx             | [mlat-client] Beast-format results connection with 172.30.0.12:30005: connection established
adsbx             | [mlat-client] Server says:
adsbx             | [mlat-client]
adsbx             | [mlat-client]         In-development v2 server. Expect odd behaviour.
adsbx             | [mlat-client]
adsbx             | [mlat-client]         The multilateration server source code is available under
adsbx             | [mlat-client]         the terms of the Affero GPL (v3 or later). You may obtain
adsbx             | [mlat-client]         a copy of this server's source code at the following
adsbx             | [mlat-client]         location: https://github.com/adsbexchange/mlat-server
adsbx             | [mlat-client]
adsbx             | [mlat-client] Handshake complete.
adsbx             | [mlat-client]   Compression:       zlib2
adsbx             | [mlat-client]   UDP transport:     disabled
adsbx             | [mlat-client]   Split sync:        disabled
adsbx             | [mlat-client] Connecting to readsb:30005
adsbx             | [mlat-client] Input connected to readsb:30005
adsbx             | [mlat-client] Input format changed to BEAST, 12MHz clock
adsbx             | [mlat-client] Accepted Beast-format results connection from ::ffff:172.30.0.11:53198

After a few minutes, point your browser at https://adsbexchange.com/myip/. You should see green smiley faces indicating that you are successfully sending data.