Tracking Application Configuration File - davewalker5/ADS-B-BaseStationReader GitHub Wiki
- The appsettings.json file in the console application project contains the following keys and command line options for specifying them on-the-fly:
| Option | Short Form | Setting | Description |
|---|---|---|---|
| --help | -h | - | Show command line help |
| --app-timeout | -a | ApplicationTimeout | Timeout (ms) after which the application will quit of no messages are recieved |
| --auto-lookup | -al | AutoLookup | Automatically lookup aircraft and flights via the external APIs |
| --cleardown | -cd | ClearDown | Delete tracking records from the database before starting |
| --enable-sql-writer | -w | EnableSqlWriter | Log file path and name |
| --flight-api | -fapi | FlightApi | Specify the name of an API to use for lookups |
| --host | -ho | Host | Host to connect to for data stream |
| --log-file | -l | LogFile | Log file path and name |
| --max-rows | -m | MaximumRows | Maximum number of rows displayed |
| --max-altitude | -maxa | MaximumTrackedAltitude | Maximum altitude (ft) at which an aircraft will be tracked |
| --max-distance | -maxd | MaximumTrackedDistance | Maximum distance (Nm) at which an aircraft will be tracked |
| --log-level | -ll | MinimumLogLevel | Minimum logging level (Debug, Info, Warning or Error) |
| --min-altitude | -mina | MinimumTrackedAltitude | Minimum altitude (ft) at which an aircraft will be tracked |
| --port | -p | Port | Port to connect to for data stream |
| --tracking-profile | -tpro | - | Specify a JSON format tracking profile |
| --latitude | -la | ReceiverLatitude | Receiver latitude |
| --longitude | -lo | ReceiverLongitude | Receiver longitude |
| --auto-restart | -ar | RestartOnTimeout | Automatically restart the tracker after a timeout |
| --settings | -s | - | Specify an alternative application settings file |
| --read-timeout | -t | SocketReadTimeout | Timeout (ms) for socket read operations |
| --lock | -k | TimeToLock | Time (ms) to locking of active database records |
| --recent | -r | TimeToRecent | Time (ms) to 'recent' staleness |
| --remove | -x | TimeToRemoval | Time (ms) to removal of stale records |
| --stale | -st | TimeToStale | Time (ms) to 'stale' staleness |
| --behaviours | -b | TrackedBehaviours | Specify a list of aircraft behaviours to track |
| --track-position | -tpos | TrackPosition | Set to true to record aircraft position over time |
| --aircraft-interval | -ai | AircraftNotificationInterval | Interval, in ms, at which aircraft notifications are sent to the UI |
| --verbose | -v | VerboseLogging | Enable verbose logging at debug log level |
Note
On low-powered hardware it is not recommended to enable live lookup - in such cases, offline lookup is recommended instead
- The appsettings.json file in the console application project contains the following keys that are not mapped to command line options:
| Section | Key | Command Line | Short Name | Purpose |
|---|---|---|---|---|
| ApplicationSettings | Columns | - | - | Set of column definitions for columns to be included in the output |
| ApplicationSettings | ApiEndpoints | - | - | Set of endpoint definitions for external APIs - see the external API integration sections |
| ApplicationSettings | ApiServices | - | - | Set of API service definitions for external APIs - see the external API integration sections |
| ConnectionStrings | BaseStationReaderDB | - | - | SQLite connection string for the database |
- Values may also be passed using the indicated command line arguments, in which case the values are first read from the configuration file and then any values specified on the command line are then applied
- The Columns property in the ApplicationSettings section of the file contains a list of column definitions:
[
{
"Property": "Address",
"Label": "ID",
"Format": ""
},
{
"Property": "Callsign",
"Label": "Callsign",
"Format": ""
},
{
"Property": "Latitude",
"Label": "Latitude",
"Format": "N5"
}
]- Each column definition contains the following items:
| Item | Comments |
|---|---|
| Property | Case-sensitive name of the property on the Aircraft entity to be rendered in this column |
| Label | Column title |
| Format | The C# format string used to render the property or blank for default formatting |
- The application will show only the columns listed in this section of the configuration file, showing them in the order in which they appear here and formatted according to the format specifier
- The format string is passed to the ".ToString()" method to format the column
- The maximum row limit and custom column control are intended to support running the application on small screens
- The following shows the console application running on a Raspberry Pi with 3.5" LCD screen:

- The continuous writer processes writes to the database and live API lookup requests
- How quickly entries are flushed from the queue in a given time period is dependent on the hardware running the application
- If entries aren't flushed from the queue quickly enough, a significant backlog can build up that is fludhed when <ESC> is used to close the terminal application
- This can delay application exit
- The following are hardware recommended settings for enabling the SQL writer:
| Host | EnableSqlWriter | AutoLookup | TrackPosition | AircraftNotificationInterval |
|---|---|---|---|---|
| Raspberry Pi 4B | true | false | true | 1000 |
| Apple M4 | true | false 1 | true | 1000 |
Notes:
- Auto-lookup will work on more performant hardware but in practice offline lookup may be a better option