AdsbAnomalyDetector


NameAdsbAnomalyDetector JSON
Version 0.7.1 PyPI version JSON
download
home_pageNone
SummaryLow altitude aircraft anomaly detector
upload_time2024-12-05 09:04:22
maintainerNone
docs_urlNone
authorPirolley Melvyn
requires_pythonNone
licenseNone
keywords python deep learning tensorflow aircraft classification ads-b
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![GitHub](https://img.shields.io/badge/GitHub-View_on_GitHub-blue?logo=GitHub)](https://github.com/DApIA-Project/Anomaly-Detection)

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.

<!-- make an image link to github -->
If you meet any problem with the library, feel free to open an issue our GitHub repository.

## Installation

```bash
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 :

```python
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.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "AdsbAnomalyDetector",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, deep learning, tensorflow, aircraft, classification, ADS-B",
    "author": "Pirolley Melvyn",
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "[![GitHub](https://img.shields.io/badge/GitHub-View_on_GitHub-blue?logo=GitHub)](https://github.com/DApIA-Project/Anomaly-Detection)\n\nThis 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.\n\nAll 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\nprocess.\n\n<!-- make an image link to github -->\nIf you meet any problem with the library, feel free to open an issue our GitHub repository.\n\n## Installation\n\n```bash\npip install AdsbAnomalyDetector\n```\n\n## Usage\n\nThe library provides a function `predict` that should be connected to an ADS-B stream.\nThe function takes as input a list of ADS-B messages in a JSON format.\n\nEvery call should correspond to a unique timestamp, and so every messages should have the same timestamp.\nIf you want to process a whole timeseries, you should call the function multiple times.\n\nThe function stores the messages in caches, hence do not go backwards in time. Or the cache will automatically be cleared.\n\nHere is an example of how to use the library, and show the format of the messages :\n\n```python\nfrom AdsbAnomalyDetector import predict, AnomalyType\n\nmessages = [ # list of flights messages at t = 1609459200\n    {\n        \"icao24\": \"3C4A4D\",\n        \"callsign\": \"AFR123\",\n        \"timestamp\": \"1609459200\",\n        \"latitude\": \"48.8583\",\n        \"longitude\": \"2.2945\",\n        \"altitude\": \"10000\",\n        \"geoaltitude\": \"10000\",\n        \"velocity\": \"250\",\n        \"vertical_rate\": \"0\",\n        \"track\": \"90\",\n        \"alert\": \"False\",\n        \"spi\": \"False\"\n    },\n    {\n        \"icao24\": \"39AC45\",\n        \"callsign\": \"SAMU31\",\n        \"timestamp\": \"1609459200\",\n        ...\n    }, ...\n]\n\nmessages = predict(messages)\n```\n\nBy default the function will return for each message a json object with the following fields :\n- 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)\n- tag : a string useful under saturation to separate messages of simultaneous flights with identical ICAO24\n\nYou can set the parameter `compress` to False if you want the function to return the full message + the anomaly field.\n\nYou 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.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Low altitude aircraft anomaly detector",
    "version": "0.7.1",
    "project_urls": null,
    "split_keywords": [
        "python",
        " deep learning",
        " tensorflow",
        " aircraft",
        " classification",
        " ads-b"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aecb710dbb60d4897db9f3b14dd0efde157a6e6198a78002b30b8a71d7d3717a",
                "md5": "ee4838868f66c2798a7f52f1e86db316",
                "sha256": "81e8a9462b9c4089d163d11e33c408e243a5a026ba31f2f6f2f586f5f72fed47"
            },
            "downloads": -1,
            "filename": "AdsbAnomalyDetector-0.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ee4838868f66c2798a7f52f1e86db316",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 87089619,
            "upload_time": "2024-12-05T09:04:22",
            "upload_time_iso_8601": "2024-12-05T09:04:22.752387Z",
            "url": "https://files.pythonhosted.org/packages/ae/cb/710dbb60d4897db9f3b14dd0efde157a6e6198a78002b30b8a71d7d3717a/AdsbAnomalyDetector-0.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-05 09:04:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "adsbanomalydetector"
}
        
Elapsed time: 0.36496s