Skip to main content

A module for reading aircraft a PiAware device is sensing

Project description

PiAware and DUMP1090 Python Request wrapper

Application is still in testing and development. If you have suggestions, comments or want to help out feel free to open a PR or submit an issue.

This is a Python wrapper for the piaware/dump1090 ADBS library. This module requests information from the Raspberry Pi via a RESTful request. Returning a list of all aircraf the PiAware is reading.

You will need local LAN access to a Piaware enabled device.

Requirments

  • Python 3.7+
  • Python Requests Library
  • An active and working FlightAware/ Piaware with dump1090 (You can get started here: https://flightaware.com/adsb/piaware/)
  • Make sure to have alook in the requirments.txt file for additional dependencies

Setup

  • run setup.py. In venv or other python3 setup.py install

Sample Usuage

from aircraft import Aircraft
from queryscanner import QueryScanner

q = QueryScanner("http://RPI_IP_ADDR_AS_STRING")
aircraft = q.get_all_aircraft()

for i in aircraft: 
    print(i)

To-Do

  • Setup a docs for reference
  • Fix some typos
  • Improve setup.py and requirements
  • Better exception handling-
  • Implement generator function for querying
  • Fixes "To-Dos" throughout code base
  • When calling aircraft.update() method should not update the hex (ICAO) number as it is unique per aircraft. Implement method that will throw/return error and override the setattr method?
  • Implement custom exceptions on aircraft distance calculation while continuing to set attrs to None.
  • Try to implement tuple unpacking or a cleaner way to take arugments for the calucluate_distance_of_aircraft method
  • Check calculation for any mathmetical errors when computed? Need to read more about this equation to do so? Is there something more accurate? Is this a concern?
  • Do we need to check for any more errors in the input values of calculate_distance_of_airacft?
  • Implment testing (waiting on this as I am working on a firebase project for this)
  • Create exception for QueryScanner._create_query_url() if the url is invalid. Should sanatize this data more?
  • In Query Scanner there is an _auth method. Need to see if some PiAwares have a method of authorization.
  • Implement ability to get the status of the PiAware. This should be just an fstring dump of the date as it would be out of scope to relay on this for that information (maybe make a seperate model?)
  • Using n^2 method for querying data in get_all_aircraft(). I was able to improve a feature that queried the reciever twice for something, now need to work on improving this for effieceny.
  • Need to improve on exception handinling in get_all_aircraft()
  • Add implementation to avoid creating multiple queryscanner(). Need a better way to initlizie this class.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PiAware_Dump1090_Wrapper-1.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PiAware_Dump1090_Wrapper-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file PiAware_Dump1090_Wrapper-1.0.0.tar.gz.

File metadata

  • Download URL: PiAware_Dump1090_Wrapper-1.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for PiAware_Dump1090_Wrapper-1.0.0.tar.gz
Algorithm Hash digest
SHA256 68ec23ee2a2e3e89b20b2e9f3ba960e0d0d7c4843a2018bd1e1a42897ea86501
MD5 832d9a558c1cfc517c073787dd70c8fb
BLAKE2b-256 31bcf9e64cfd0ab35182e0fc42fadbeafc8bf8b91a0ac2cd879665b37aa4fa92

See more details on using hashes here.

File details

Details for the file PiAware_Dump1090_Wrapper-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: PiAware_Dump1090_Wrapper-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for PiAware_Dump1090_Wrapper-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1042e9ac3921ffcef31133629c1dd73d361098ee654145dee3e84ef772967213
MD5 ce136a1fba3cf76b0b8c8cdec5c1603e
BLAKE2b-256 b774677ee1e1a18bbe777ba6b9c478d7619e492b5640712a7b805d9fe1efe988

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page