ADSBImport - diggybell/piaware-tools GitHub Wiki

Table of Contents

PiAware ADSB Import

Description

This utility is responsible for processing the PiAware history_*.json files retrieved from your PiAware feeder. PiAware cycles through the files once per hour. This utility should generally be run at least twice an hour to ensure all aircraft are captured. It can be run more frequently for faster refreshes.

Note: Running this utility on a host other than your PiAware is recommended for more frequent updates.

Usage

You can run this utility manually at any time. The following commands can be used.

cd <path to piaware-tools>/utility
php adsb-import.php <options>

Options

  • --aircraft
    • Extract aircraft positions from history files
    • Convert the ICAO Hex Code to N-Number for US Aircraft
    • Determine the registration country
  • --altitude
    • Extract the lowest altitude seen in each of the Cardinal Range Rings
  • --archive
    • Move the current aircraft and altitude history files to archive
      • This should be done at 23:55 each day
  • --help
    • Display help information

CRON Automation

This utility should be integrated with CRON to provide continuous updates. The following example will execute the script on the hour and 30 minutes past the hour.

0,30 * * * * cd <path to piaware-tools>; scp <user>@<host or ip>:/run/dump1090-fa/* data; cd utility; php adsb-import.php --altitude; php adsb-import.php --aircraft
This utility also handles archival of the aircraft and altitude files. This should be run daily. It should be run just before midnight every night. The example below will execute the script at 23:55.
55 23 * * * cd <path to piaware-tools>/utility; php reader.php --archive
Notes:
  1. Replace <path to piaware-tools> with the base path where you installed PiAware Tools.
  2. Replace <user> with your user name on your PiAware feeder (you will need SSH keys from your data host to your PiAware)
  3. Replace <host or ip> with the IP address or host name of your PiAware feeder.
⚠️ **GitHub.com Fallback** ⚠️