Metadata-Version: 2.1
Name: pyadsb
Version: 0.0.1
Summary: Functionality for encoding/decoding ADSB messages written in pure Python 3
Home-page: https://github.com/enok71/adsb
Author: Oskar Enoksson
Author-email: Oskar Enoksson <enok@lysator.liu.se>
License: MIT License
        
        Copyright (c) 2024 Oskar Enoksson <enok@lysator.liu.se>
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/enok71/adsb
Project-URL: Issues, https://github.com/enok71/adsb/issues
Project-URL: Documentation, https://github.com/enok71/adsb/wiki
Keywords: adsb,aircrafts
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# adsb
ADSB and Mode-S decoder/encoder

The `Adsb` class provides `parse` and `encode` functions for creating `Adsb` objects from a bytes object, and encoding an object to bytes respectively.

The `Tracker` class implements a simple aircraft tracker that detects vehicles and collects and updates information about them. The `Tracker` class is meant primarily as an example application.

<b>Example</b>: decoding messages given either as `bytes` or `int`:
```
from adsb import Adsb

print(Adsb.parse(0x8D40621D58C382D690C8AC2863A7))
print(Adsb.parse(b'\x8D\x48\x40\xD6\x20\x2C\xC3\x71\xC3\x2C\xE0\x57\x60\x98')
```

<b>Example</b>: tracking aircrafts:
```
from adsb import Tracker

tracker = Tracker()
for msg in readline():
    m = Adsb.parse(msg.strip().encode())
    tracker.process(m)
```

