If you find this project useful for your research, please cite our work (bibtex format):
If you find this project useful for your research, please considering cite this tool as::
::
@article{sun2019pymodes,
@article{sun2019pymodes,
author={J. {Sun} and H. {V\^u} and J. {Ellerbroek} and J. M. {Hoekstra}},
author={J. {Sun} and H. {V\^u} and J. {Ellerbroek} and J. M. {Hoekstra}},
@ -18,11 +16,11 @@ If you find this project useful for your research, please cite our work (bibtex
Introduction
Introduction
---------------------
---------------------
PyModeS is a Python library designed to decode Mode-S (including ADS-B) message.
PyModeS is a Python library designed to decode Mode-S (including ADS-B) message. It can be imported to your python project or be used as a standalone tool to view and save live traffic data.
Message with following Downlink Formats (DF) are supported:
Messages with following Downlink Formats (DF) are supported:
[--latlon LAT LON] [--show-uncertainty] [--dumpto DUMPTO]
Arguments:
arguments:
-h, --help show this help message and exit
-h, --help show this help message and exit
--source SOURCE data source: rtlsdr or tcp
--source SOURCE Choose data source, "rtlsdr" or "net"
--server SERVER server address or IP
--connect SERVER PORT DATATYPE
--port PORT raw data port
Define server, port and data type. Supported data
--rawtype RAWTYPE TCP data format: beast, avr or skysense
types are: ['raw', 'beast', 'skysense']
--latlon LAT LON receiver position
--latlon LAT LON Receiver latitude and longitude, needed for the surface
--show-uncertainty display uncertaint values, default off
position, default none
--dumpto folder to dump decoded output
--show-uncertainty Display uncertainty values, default off
--dumpto DUMPTO Folder to dump decoded output, default none
[experimental] If you have a RTL-SDR receiver, you can connect it directly to pyModeS:
Live with RTL-SDR
*******************
If you have an RTL-SDR receiver plugged to the computer, you can connect it with ``rtlsdr`` source switch, shown as follows::
$ modeslive --source rtlsdr
Live with network data
***************************
If you want to connect to a TCP server that broadcast raw data. use can use ``net`` source switch, for example::
$ modeslive --source net --connect localhost 30002 avr
$ modeslive --source net --connect 127.0.0.1 30005 beast
::
$ modeslive --source rtlsdr --latlon [lat] [lon]
Example screenshot:
Example screenshot:
@ -166,11 +176,7 @@ Core functions for ADS-B decoding
pms.adsb.airborne_velocity(msg)
pms.adsb.airborne_velocity(msg)
Note: When you have a fix position of the aircraft, it is convenient to
Note: When you have a fix position of the aircraft, it is convenient to use `position_with_ref()` method to decode with only one position message (either odd or even). This works with both airborne and surface position messages. But the reference position shall be within 180NM (airborne) or 45NM (surface) of the true position.
use `position_with_ref()` method to decode with only one position message
(either odd or even). This works with both airborne and surface position
messages. But the reference position shall be with in 180NM (airborne)
or 45NM (surface) of the true position.
Decode altitude replies in DF4 / DF20
Decode altitude replies in DF4 / DF20
@ -277,9 +283,7 @@ Meteorological hazard air report (MHR) [Experimental]
Customize the streaming module
Customize the streaming module
******************************
******************************
The TCP client module from pyModeS can be re-used to stream and process Mode-S
The TCP client module from pyModeS can be re-used to stream and process Mode-S data as you like. You need to re-implement the ``handle_messages()`` function from the ``BaseClient`` class to write your own logic to handle the messages.
data as your like. You need to re-implement the ``handle_messages()`` function from
the ``BaseClient`` class to write your own logic to handle the messages.
Here is an example:
Here is an example:
@ -319,7 +323,7 @@ Here is an example:
Unit test
Unit test
---------
---------
To perform unit tests. First install ``tox`` through pip, Then, run the following commands:
To perform unit tests. First, install ``tox`` through pip. Then, run the following commands: