Aircraft tracking and notification client. Track all aircraft within the set cordinate rectangular bounds and notifiy when one of the filtered aircraft is present.
From the template config_template.yaml
, a copy of it needs to be made and named config.yaml
.
Once that is done, the following config options could be set:
- radarBounds.topRightCords.latitude= latitude cordinate for top right edge of the bounds.
- radarBounds.topRightCords.longitude= longitude cordinate for top right edge of the bounds.
- radarBounds.bottomLeftCords.latitude= latitude cordinate for bottom left edge of the bounds.
- radarBounds.bottomLeftCords.longitude= longitude cordinate for bottom left edge of the bounds.
- aircraft= list of all special aircrafts to be filtered. All aircrafts in this list must be designated by their ICAO code.
- redis.addr= the redis server address which will be used for caching flight ids.
- redis.port= the redis server port which will be used for caching flight ids.
To avoid duplicate notifications for the same aircraft, each aircraft, by their fid, is assisted a TTL of 5 minutes once detected. This caching is done via Redis with the TTL currently not user configurable.
As the software currently sits, the "push notification" is done via standard output. Plans to extend this are in the works as I am working on implementing a universal push notification service with atracker being one of the supported platforms.
As discovered via R/D of the internal API that I use to retrieve aircraft data, frequest aircraft info requests result in Cloudflare sending captchas to solve. To prevent this, scans of the bounds only occur every 10 seconds. Similarly, the number of concurrent aircraft workers goroutines is set to 5. Within each worker, a random timeout between [0,10] seconds is set. Thus, as a result, there can be delay in the notifiaction. Until further optimization is done to lower these values, these values have been upperbounded to higher values to avoid high congestion resulting in temp bans and captchas.
The following steps must be done for the tool to run:
- Install Go v1.16.
- Clone repo and install dependencies with
go mod download
. - Configure the filter and the bounds of the tracker as designated in config.
- Two ways of running the tool:
- Either build the tool with
go build
and then run it was./atracker
Note thatconfig.yaml
must be present in same directory asatracker
binary. - Run without build via
go run main.go
.
- Either build the tool with