This is the main crate implementing the site-specific ways of accessing, authenticating and fetching data from the supported sources. Currently, we support:
- Aeroscope
- ASD
- Opensky
- Safesky (incomplete)
A source can support one or more operation like Fetch
and Stream
. At this moment, only Opensky support streaming.
This is the data extracted from a local Aeroscope antenna, considering you are supposed to have a local server attached to the antenna. Software supplied by DJI store data in its [MongoDB] database and there is a local API to access said data. Our antenna was supplied by [ASD] and interestingly enough the data model and access methods are not exactly the same.
This source is for data aggregated by [ASD] on the airspacedrones.com
through their own API. The data model & API are
different from the local access in the previous one because you can have multiple antennas from a single API endpoint.
Opensky is different from the previous two sources as it is an ADS-B data site, not a drone-specific one. We use Opensky for sites that do not have access to our own set of ADS-B antennas (called EMIT). The API is radically different from more common sources like Flightradar24 or Flightaware. You have access to only the last hour of data through the API and you must use their SSH-based Impala shell for "historical" datasets.
I am currently cheating there by repeatedly callng the API (there are no API limitation for data generated by you own antennas) and generating a stream from this. I have included a caching system to avoid sending the data several times as the API can (and will) send you the same dataset sometimes.
Safesky is an alternate ADS-B source we thought we'd be working with at some point so partial support is there but has not been tested. See the source.
I use an [HCL] file called sources.hcl
to store the source parameters. ,You are not really supposed to edit this and
that's why it is not documented in acutectl
.
On UNIX systems, it is located in $HOME/.config/drone-utils/sources.hcl
and in %LOCALAPPDATA%\DRONE-UTILS
on
Windows.
The current config file version is 4. This is where all the URL for the parts of each API are defined, which routes are available, the default data model etc.
sources.hcl
version = 4
site "local" {
features = ["fetch"]
type = "drone"
format = "aeroscope"
base_url = "http://127.0.0.1:2400"
routes = {
get = "/drone/get"
}
}
site "big.site.aero" {
features = ["fetch"]
type = "drone"
format = "asd"
base_url = "https://api.site.aero"
routes = {
get = "/api/journeys/filteredlocations/json"
}
}
site "opensky" {
features = ["fetch", "stream"]
type = "adsb"
format = "opensky"
base_url = "https://opensky-network.org/api"
routes = {
get = "/states/own"
}
}
site "safesky" {
features = ["fetch"]
type = "adsb"
format = "safesky"
base_url = "https://public-api.safesky.app"
routes = {
get = "/v1/beacons"
}
}
NOTE: authentication data used to be in this file, but it has been moved to the more proper location for acutectl
.