ADSB-Tracker-Server is the dedicated ADS-B track scheduling microservice for Flight-Training.
- stores user-scoped track schedule jobs in MySQL
- polls for due UTC/Zulu schedules
- reads Raspberry Pi raw
jsonllogs - filters matching track points
- exports KML files
- .NET SDK 8+
- MySQL running locally
- a database created for this service, for example:
CREATE DATABASE adsb_tracker;The service reads configuration from:
appsettings.jsonappsettings.Local.json(optional, local-only, ignored by Git)- environment variables
The most important setting is:
ConnectionStrings__Default="server=localhost;port=3306;database=adsb_tracker;user=hptg;password=your-password"For local development secrets and machine-specific overrides, edit your local-only file directly:
touch appsettings.Local.jsonappsettings.Local.json is ignored by Git. Put your real MySQL password, local paths, and any development-only overrides there.
Use appsettings.Local.json as the single development override file. You do not need a separate appsettings.Development.json.
Optional path overrides:
PiTrackSource__RawRootPath="/home/hptg/Projects/adsb-tracklog/raw"
PiTrackSource__Mode="ssh"
PiTrackSource__SshHost="192.168.86.53"
PiTrackSource__SshUser="pintaigao"
PiTrackSource__SshPort=22
PiTrackSource__RemoteRawRootPath="/home/pintaigao/Documents/ADSB-Tracker/raw"
PiTrackSource__SshIdentityFile="/Users/your-user/.ssh/id_ed25519"
PiTrackSource__SshAcceptNewHostKey=true
TrackerStorage__WorkingDirectory="data/work"
TrackerStorage__ExportDirectory="data/exports"
FEEDER_LIVE_AIRCRAFT_URL="http://192.168.86.53:8080/live-aircraft"
FEEDER_LIVE_AIRCRAFT_TOKEN=""
FLIGHT_TRAINING_SERVER_BASE_URL="http://localhost:3000"
FLIGHT_TRAINING_SERVER_SERVICE_TOKEN=""Runtime toggles live in appsettings.Local.json as booleans:
{
"Runtime": {
"DisableTrackScheduleWorker": false,
"SkipDbMigrate": false
}
}PiTrackSource supports two modes:
local(default): readsYYYY-MM-DD.jsonlfromRawRootPathssh: usesscpto copy one dailyjsonlfrom the remote Ubuntu host into the local working directory on demand
For your current Mac + Ubuntu setup, ssh mode is the intended path. Make sure key-based SSH login from the Mac to the Ubuntu host works non-interactively before running schedules.
For production, prefer appsettings.Production.json over appsettings.Local.json.
Set:
ASPNETCORE_ENVIRONMENT=ProductionASP.NET Core will then load:
appsettings.jsonappsettings.Production.json- environment variables
A committed placeholder template now lives at:
appsettings.Production.json
Recommended production defaults:
PiTrackSource.Mode = localRuntime.DisableTrackScheduleWorker = falseRuntime.SkipDbMigrate = true
Fields you must replace before running in production:
ConnectionStrings:DefaultPiTrackSource:RawRootPathFeederLiveAircraft:Urlif your feeder endpoint differsFlightTrainingServer:BaseUrlandFlightTrainingServer:ServiceTokenif callback import is enabled
Notes:
- Leave
FlightTrainingServer.BaseUrlempty if you do not want ADSB schedule exports to callback intoFlight-Training-Server. - Do not commit real database passwords, service tokens, or machine-specific secrets to Git.
- On the production host, keep the real
appsettings.Production.jsonalongside the published app or inject the same keys via environment variables.
Install the local EF tool if needed:
DOTNET_CLI_HOME=/tmp dotnet tool restoreCreate a migration:
DOTNET_CLI_HOME=/tmp dotnet dotnet-ef migrations add InitialTrackSchedulesApply migrations:
DOTNET_CLI_HOME=/tmp dotnet dotnet-ef database updateThe app also runs Database.Migrate() on startup, so once the first migration exists it will apply pending migrations automatically.
DOTNET_CLI_HOME=/tmp dotnet run --launch-profile httpTo run only the live-aircraft path without background MySQL polling:
DOTNET_CLI_HOME=/tmp dotnet run --launch-profile httpSet the local runtime toggles first if you want that behavior:
{
"Runtime": {
"DisableTrackScheduleWorker": true,
"SkipDbMigrate": true
}
}The default local HTTP URL is:
http://localhost:5053
GET /api/v1/adsb/flights/live-aircraftPOST /api/v1/adsb/flights/track-schedulesGET /api/v1/adsb/flights/track-schedulesGET /api/v1/adsb/flights/track-schedules/{id}POST /api/v1/adsb/flights/track-schedules/{id}/cancelGET /api/v1/adsb/flights/track-schedules/{id}/executionsGET /api/v1/adsb/flights/track-schedules/executions/{executionId}/download