Low altitude aircraft anomaly detector
Project description
This library is a tool to detect anomalies in ADS-B messages. It is based on an artificial intelligence model that has been trained to detect spoofing, flooding and replay attacks.
All the used models are pre-trained and weight are stored in the library. On first use, the library will download the hashtable needed for the detection of replay attacks. Do not stop the program during the download process.
If you meet any problem with the library, feel free to open an issue our GitHub repository.
Installation
pip install AdsbAnomalyDetector
Usage
The library provides a function predict
that should be connected to an ADS-B stream.
The function takes as input a list of ADS-B messages in a JSON format.
Every call should correspond to a unique timestamp, and so every messages should have the same timestamp. If you want to process a whole timeseries, you should call the function multiple times.
The function stores the messages in caches, hence do not go backwards in time. Or the cache will automatically be cleared.
Here is an example of how to use the library, and show the format of the messages :
from AdsbAnomalyDetector import predict, AnomalyType
messages = [ # list of flights messages at t = 1609459200
{
"icao24": "3C4A4D",
"callsign": "AFR123",
"timestamp": "1609459200",
"latitude": "48.8583",
"longitude": "2.2945",
"altitude": "10000",
"geoaltitude": "10000",
"velocity": "250",
"vertical_rate": "0",
"track": "90",
"alert": "False",
"spi": "False"
},
{
"icao24": "39AC45",
"callsign": "SAMU31",
"timestamp": "1609459200",
...
}, ...
]
messages = predict(messages)
By default the function will return for each message a json object with the following fields :
- anomaly : equals AnomalyType.VALID if the message is valid, else it will be equal to the type of anomaly detected (AnomalyType.SPOOFING, AnomalyType.REPLAY, AnomalyType.FLOODING)
- tag : a string useful under saturation to separate messages of simultaneous flights with identical ICAO24
You can set the parameter compress
to False if you want the function to return the full message + the anomaly field.
You can also activate the debug mode by setting the parameter debug
to True. In this case, the function will return some additional information about the predictions of each models.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file AdsbAnomalyDetector-0.6.2-py3-none-any.whl
.
File metadata
- Download URL: AdsbAnomalyDetector-0.6.2-py3-none-any.whl
- Upload date:
- Size: 87.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72dee46812d271c6ab1dc8177ec578aeb84b072d217b8f47a0660eb71299a3e1 |
|
MD5 | 0cb44591631a99e40d41518eb433f85b |
|
BLAKE2b-256 | 7ba595d3ce37a731c1e33d771015cf219f2c78d63030e8f47ac7d83c39b9137a |