sdr-enthusiasts/acars_router

March 8, 2025 ยท View on GitHub

acars_router receives, validates, deduplicates, modifies and routes ACARS/VDLM2/HFDL/IMSL/IRDM JSON messages.

Example Feeder docker-compose.yml

volumes:
  - acarshub_run

services:
  acarshub:
    image: ghcr.io/sdr-enthusiasts/docker-acarshub:latest
    container_name: acarshub
    restart: always
    ports:
      - 8080:80
    environment:
      - ENABLE_VDLM=EXTERNAL
      - ENABLE_ACARS=EXTERNAL
      - FEED=true
      - IATA_OVERRIDE=UP|UPS|United Parcel Service;GS|FTH|Mountain Aviation (Foothills);GS|EJA|ExecJet
      - ENABLE_ADSB=true
      - ADSB_LAT=${FEEDER_LAT}
      - ADSB_LON=${FEEDER_LON}
      - ADSB_URL=${ACARS_TAR_HOST}
    volumes:
      - "acars_run:/run/acars"
    tmpfs:
      - /database:exec,size=64M
      - /run:exec,size=64M
      - /var/log

  acars_router:
    image: ghcr.io/sdr-enthusiasts/acars_router:latest
    container_name: acars_router
    restart: always
    environment:
      - TZ=${FEEDER_TZ}
      - AR_ENABLE_DEDUPE=true
      - AR_SEND_UDP_ACARS=acarshub:5550;feed.airframes.io:5550
      - AR_SEND_UDP_VDLM2=acarshub:5555
      - AR_SEND_TCP_VDLM2=feed.airframes.io:5553
      - AR_SEND_TCP_HFDL=feed.airframes.io:5556
      - AR_RECV_ZMQ_VDLM2=dumpvdl2:45555
    tmpfs:
      - /run:exec,size=64M
      - /var/log

Change the GAIN, FREQUENCIES, SERIAL, TZ, ADSB_LAT, ADSB_LON and AR_OVERRIDE_STATION_NAME to suit your environment.

With the above deployment:

  • JSON messages generated by acarsdec will be sent to acars_router via UDP.
  • acars_router will connect to dumpvdl2 via TCP/ZMQ and receive JSON messages.
  • acars_router will set your station ID on all messages.
  • acars_router will then output to acarshub.

Ports

All ports are configurable. By default, the following ports will be used:

PortProtocolDescription
5550UDPACARS ingest. Clients will send ACARS data to this port via UDP.
5550TCPACARS ingest. Clients will send ACARS data to this port via TCP.
5555UDPVDLM2 ingest. Clients will send VDLM2 data to this port via UDP.
5555TCPVDLM2 ingest. Clients will send VDLM2 data to this port via TCP.
5556UDPHFDL ingest. Clients will send HFDL data to this port via UDP.
5556TCPHFDL ingest. Clients will send HFDL data to this port via TCP.
5557UDPIMSL ingest. Clients will send IMSL data to this port via UDP.
5557TCPIMSL ingest. Clients will send IMSL data to this port via TCP.
5558UDPIRDM ingest. Clients will send IRDM data to this port via UDP.
5558TCPIRDM ingest. Clients will send IRDM data to this port via TCP.
15550TCPACARS server. Can be used for other clients to connect and get messages
15555TCPVDLM2 server. Can be used for other clients to connect and get messages
15556TCPHFDL server. Can be used for other clients to connect and get messages
15557TCPIMSL server. Can be used for other clients to connect and get messages
15558TCPIRDM server. Can be used for other clients to connect and get messages
35550ZMQACARS ingest. Clients will connect to this port and send ACARS messages over ZMQ
35555ZMQVDLM2 ingest. Clients will connect to this port and send VDLM2 messages over ZMQ
35556ZMQHFDL ingest. Clients will connect to this port and send HFDL messages over ZMQ
35557ZMQIMSL ingest. Clients will connect to this port and send IMSL messages over ZMQ
35558ZMQIRDM ingest. Clients will connect to this port and send IRDM messages over ZMQ
45550ZMQACARS server. Can be used for other ZMQ clients to connect and get messages
45555ZMQVDLM2 server. Can be used for other ZMQ clients to connect and get messages
45556ZMQHFDL server. Can be used for other ZMQ clients to connect and get messages
45557ZMQIMSL server. Can be used for other ZMQ clients to connect and get messages
45558ZMQIRDM server. Can be used for other ZMQ clients to connect and get messages

If you want any port(s) to be exposed outside of the docker network, please be sure to append them to the ports section of the docker-compose.yml file.

Environment Variables

All env variables with SEND or RECV in them can have multiple destinations. Each destination should be separated by a ;. For example, SEND_UDP_ACARS=acarshub:5550;acarshub2:5550 will send UDP ACARS messages to both acarshub and acarshub2.

The nomenclature for the environment variables is as follows:

Nomenclature used in variable naming

Input/Inbound data

  • Receiver: ACARS router will connect out to a remote host and receive data from it. (TCP/ZMQ)
  • Listener: ACARS router will listen on a port for incoming data (UDP) or incoming connection based on socket type (TCP/ZMQ)

Output/Outbound data

  • Sender: ACARS router will connect out to a remote host and send data to it. (TCP/ZMQ)
  • Server: ACARS router will send data to a remote host (UDP) or listen for incoming connection (TCP/ZMQ) and send data to it.

Outbound data

Env VariableCommand Line SwitchDefaultDescription
AR_SEND_UDP_ACARS--send-udp-acarsunsetUDP host:port to send ACARS messages to
AR_SEND_UDP_VDLM2--send-udp-vdlm2unsetUDP host:port to send VDLM2 messages to
AR_SEND_UDP_HFDL--send-udp-hfdlunsetUDP host:port to send HFDL messages to
AR_SEND_UDP_IMSL--send-udp-imslunsetUDP host:port to send IMSL messages to
AR_SEND_UDP_IRDM--send-udp-irdmunsetUDP host:port to send IRDM messages to
AR_SEND_TCP_ACARS--send-tcp-acarsunsetTCP host:port to send ACARS messages to
AR_SEND_TCP_VDLM2--send-tcp-vdlm2unsetTCP host:port to send VDLM2 messages to
AR_SEND_TCP_HFDL--send-tcp-hfdlunsetTCP host:port to send HFDL messages to
AR_SEND_TCP_IMSL--send-tcp-imslunsetTCP host:port to send IMSL messages to
AR_SEND_TCP_IRDM--send-tcp-irdmunsetTCP host:port to send IRDM messages to
AR_SERVE_TCP_ACARS--serve-tcp-acars15550TCP port to serve ACARS messages to
AR_SERVE_TCP_VDLM2--serve-tcp-vdlm215555TCP port to serve VDLM2 messages to
AR_SERVE_TCP_HFDL--serve-tcp-hfdl15556TCP port to serve HFDL messages to
AR_SERVE_TCP_IMSL--serve-tcp-imsl15557TCP port to serve IMSL messages to
AR_SERVE_TCP_IRDM--serve-tcp-irdm15558TCP port to serve IRDM messages to
AR_SERVE_ZMQ_ACARS--serve-zmq-acars45550ZMQ port to serve ACARS messages to
AR_SERVE_ZMQ_VDLM2--serve-zmq-vdlm245555ZMQ port to serve VDLM2 messages to
AR_SERVE_ZMQ_HFDL--serve-zmq-hfdl45556ZMQ port to serve HFDL messages to
AR_SERVE_ZMQ_IMSL--serve-zmq-imsl45557ZMQ port to serve IMSL messages to
AR_SERVE_ZMQ_IRDM--serve-zmq-irdm45558ZMQ port to serve IRDM messages to

Inbound data

Env VariableCommand Line SwitchDefaultDescription
AR_RECV_ZMQ_ACARS--recv-zmq-acarsunsetZMQ host:port to receive ACARS messages from
AR_RECV_ZMQ_VDLM2--recv-zmq-vdlm2unsetZMQ host:port to receive VDLM2 messages from
AR_RECV_ZMQ_HFDL--recv-zmq-hfdlunsetZMQ host:port to receive HFDL messages from
AR_RECV_ZMQ_IMSL--recv-zmq-imslunsetZMQ host:port to receive IMSL messages from
AR_RECV_ZMQ_IRDM--recv-zmq-irdmunsetZMQ host:port to receive IRDM messages from
AR_RECV_TCP_ACARS--recv-tcp-acarsunsetTCP host:port to receive ACARS messages from
AR_RECV_TCP_VDLM2--recv-tcp-vdlm2unsetTCP host:port to receive VDLM2 messages from
AR_RECV_TCP_HFDL--recv-tcp-hfdlunsetTCP host:port to receive HFDL messages from
AR_RECV_TCP_IMSL--recv-tcp-imslunsetTCP host:port to receive IMSL messages from
AR_RECV_TCP_IRDM--recv-tcp-irdmunsetTCP host:port to receive IRDM messages from
AR_LISTEN_TCP_ACARS--listen-tcp-acars5550TCP port to listen for ACARS messages from
AR_LISTEN_TCP_VDLM2--listen-tcp-vdlm25555TCP port to listen for VDLM2 messages from
AR_LISTEN_TCP_HFDL--listen-tcp-hfdl5556TCP port to listen for HFDL messages from
AR_LISTEN_TCP_IMSL--listen-tcp-imsl5557TCP port to listen for IMSL messages from
AR_LISTEN_TCP_IRDM--listen-tcp-irdm5558TCP port to listen for IRDM messages from
AR_LISTEN_UDP_ACARS--listen-udp-acars5550UDP port to listen for ACARS messages from
AR_LISTEN_UDP_VDLM2--listen-udp-vdlm25555UDP port to listen for VDLM2 messages from
AR_LISTEN_UDP_HFDL--listen-udp-hfdl5556UDP port to listen for HFDL messages from
AR_LISTEN_UDP_IMSL--listen-udp-imsl5557UDP port to listen for IMSL messages from
AR_LISTEN_UDP_IRDM--listen-udp-irdm5558UDP port to listen for IRDM messages from
AR_LISTEN_ZMQ_ACARS--listen-zmq-acars35550ZMQ port to listen for ACARS messages from
AR_LISTEN_ZMQ_VDLM2--listen-zmq-vdlm235555ZMQ port to listen for VDLM2 messages from
AR_LISTEN_ZMQ_HFDL--listen-zmq-hfdl35556ZMQ port to listen for HFDL messages from
AR_LISTEN_ZMQ_IMSL--listen-zmq-imsl35557ZMQ port to listen for IMSL messages from
AR_LISTEN_ZMQ_IRDM--listen-zmq-irdm35558ZMQ port to listen for IRDM messages from

General Options

Env VariableCommand Line SwitchDefaultDescription
AR_VERBOSITY--verboseinfoVerbosity level. Valid values are debug, info, warning, error
AR_ENABLE_DEDUPE--enable-dedupefalseEnable message deduplication. Valid values are true or false
AR_DEDUPE_WINDOW--dedupe-window2Window for how long a message will be considered a duplicate if the same message is received again.
AR_SKEW_WINDOW--skew-window5If a message is older then the skew window it will be automatically rejected, in seconds. If you are receiving only ACARS/VDLM2 1 or 2 seconds is a good value. With HFDL you will need to increase the window.
AR_MAX_UDP_PACKET_SIZE--max-udp-packet-size60000Maximum UDP packet size. Messages greater then this will be send in multiple parts
AR_ADD_PROXY_ID--add-proxy-idtrueAppend to the message a header indicating that acars router processed the message
AR_OVERRIDE_STATION_NAME--override-station-nameunsetChange the station id field (identifying your station name for unstream clients) is set to this instead of what was in the message originally
AR_STATS_EVERY--stats-every5How often to print stats to the log in minutes
AR_STATS_VERBOSE--stats-verbosefalsePrint verbose stats to the log
AR_REASSEMBLY_WINDOW--reassemble-window1.0If a message comes in, but part of the message is missing, this value will be used to keep the partial message fragment around while attempting to wait for the second (or subsequent) part(s)
AR_DISABLE_ACARS--disable-acarsfalseDisable ACARS processing. Valid values are true or false
AR_DISABLE_VDLM2--disable-vdlmfalseDisable VDLM processing. Valid values are true or false
AR_DISABLE_HFDL--disable-hfdlfalseDisable HFDL processing. Valid values are true or false
AR_DISABLE_IMSL--disable-imslfalseDisable IMSL processing. Valid values are true or false
AR_DISABLE_IRDM--disable-irdmfalseDisable IRDM processing. Valid values are true or false