项目作者: mhostetter

项目描述 :
GNU Radio OOT module for demodulating and decoding ADS-B packets
高级语言: Python
项目地址: git://github.com/mhostetter/gr-adsb.git
创建时间: 2016-04-08T03:07:16Z
项目社区:https://github.com/mhostetter/gr-adsb

开源协议:GNU General Public License v3.0

下载


gr-adsb

A GNU Radio out-of-tree (OOT) module to demodulate and decode Automatic Dependent Surveillance Broadcast (ADS-B) messages.

Clone for specific GNU Radio version

To clone the version of gr-adsb that is compatible with GNU Radio 3.10 (for example), run this command.

  1. $ git clone -b maint-3.10 https://github.com/mhostetter/gr-adsb

Features

  • Supports many SDRs through GNU Radio and OsmoSDR (USRP, RTL-SDR, HackRF, BladeRF, etc)
  • Supports various sample rates (2 Msps, 4 Msps, 6 Msps, etc). NOTE: Currently the sample rate must be an integer multiple of twice the symbol rate (2 Msym/s)
  • Decoding of messages:
    • DF 0: Short Air-Air Surveillance (ACAS)
    • DF 4: Surveillance Altitude Reply
    • DF 5: Surveillance Identity Reply
    • DF 11: All-Call Reply
    • DF 16: Long Air-Air Surveillance (ACAS)
    • DF 17: ADS-B Extended Squitter
    • DF 18: CF=0,1,6 ADS-B Extended Squitter from Non-Mode S Transponders
    • DF 19: AF=0 Military ADS-B Extended Squitter
    • DF 20: Comm-B Altitude Reply
    • DF 21: Comm-B Identity Reply
  • “Brief” stdout printing
  • “Verbose” stdout printing

Usage

GNU Radio

There is an example GNU Radio Companion (.grc) flowgraph located at gr-adsb/examples/adsb_rx.grc. To use it, first open GNU Radio Companion $ gnuradio-companion and then open the .grc file.

ADS-B Receiver Flowgraph

Example “Brief” output:

  1. Time ICAO Callsign Alt Climb Speed Hdng Latitude Longitude Msgs
  2. ft ft/m kt deg deg deg
  3. 00:55:55 a03816 12425 2112 316 -7 39.0346566 -76.8112793 10
  4. 00:55:55 aa7df3 SWA398 1950 -128 167 11 39.1743622 -76.8109131 28
  5. 00:55:55 abb19c SWA513 16050 2112 386 -148 39.1567166 -77.2299194 28
  6. 80:55:55 a4fbb4 AWI4868 17125 1152 361 -23 38.9627838 -76.7352627 66
  7. 00:55:55 a8ab3c 36975 -3008 472 48 4
  8. 30:55:55 a34729 DAL1299 13100 3968 338 169 39.2229767 -77.1123206 70
  9. 10:55:55 a9b088 AAL9616 9000 -768 276 -133 39.0424347 -76.8132417 28
  10. 30:55:55 a24031 9925 -64 288 -63 39.2082964 -76.6861572 25
  11. 00:55:55 a01f73 12975 2240 339 -47 39.0163879 -76.8472754 38

Example “Verbose” Output:

  1. [INFO] ----------------------------------------------------------------------
  2. [INFO] Datetime: 2019-07-31 00:43:30.944816 UTC
  3. [INFO] SNR: 19.90 dB
  4. [INFO] Downlink Format (DF): 0 Short Air-Air Surveillance (ACAS)
  5. [INFO] CRC: Passed Recognized AA from AP
  6. [INFO] Address Announced (AA): ac53a4
  7. [INFO] Callsign: EDV5271
  8. [INFO] Vertical Status (VS): 0 In Air
  9. [INFO] Reply Information (RI): 3 Reserved for ACAS
  10. [INFO] Altitude: 7025 ft
  11. [INFO] Crosslink Capability (CC): Does Support Crosslink Capability
  12. [INFO] ----------------------------------------------------------------------
  13. [INFO] Datetime: 2019-07-31 00:43:32.114965 UTC
  14. [INFO] SNR: 21.85 dB
  15. [INFO] Downlink Format (DF): 4 Surveillance Altitude Reply
  16. [INFO] CRC: Passed Recognized AA from AP
  17. [INFO] Address Announced (AA): ac53a4
  18. [INFO] Callsign: EDV5271
  19. [INFO] Flight Status (FS): 0 No Alert, No SPI, In Air
  20. [INFO] Downlink Request (DR): 0 No Downlink Request
  21. [INFO] IIS: 0
  22. [INFO] IDS: 0 No Information
  23. [INFO] Altitude: 7075 ft
  24. [INFO] ----------------------------------------------------------------------
  25. [INFO] Datetime: 2019-07-31 00:43:36.695273 UTC
  26. [INFO] SNR: 22.41 dB
  27. [INFO] Downlink Format (DF): 11 All-Call Reply
  28. [INFO] CRC: Passed
  29. [INFO] Capability (CA): 5 Level 2 or Above Transponder, Can Set CA 7, In Air
  30. [INFO] Address Announced (AA): ac53a4
  31. [INFO] Callsign: EDV5271
  32. [INFO] ----------------------------------------------------------------------
  33. [INFO] Datetime: 2019-07-31 00:43:37.784807 UTC
  34. [INFO] SNR: 21.87 dB
  35. [INFO] Downlink Format (DF): 17 Extended Squitter
  36. [INFO] CRC: Passed
  37. [INFO] Capability (CA): 5 Level 2 or Above Transponder, Can Set CA 7, In Air
  38. [INFO] Address Announced (AA): ac53a4
  39. [INFO] Callsign: EDV5271
  40. [INFO] Type Code (TC): 19 Airborne Velocity
  41. [INFO] Subtype (ST): 1 Ground Velocity
  42. [INFO] Intent Change (IC): 1 No Change in Intent
  43. [INFO] Speed: 267 kt
  44. [INFO] Heading: 173 deg (W)
  45. [INFO] Climb: 2816 ft/min
  46. [INFO] Climb Source: 0 Geometric Source (GNSS or INS)
  47. [INFO] ----------------------------------------------------------------------
  48. [INFO] Datetime: 2019-07-31 00:43:40.305197 UTC
  49. [INFO] SNR: 24.35 dB
  50. [INFO] Downlink Format (DF): 17 Extended Squitter
  51. [INFO] CRC: Passed
  52. [INFO] Capability (CA): 5 Level 2 or Above Transponder, Can Set CA 7, In Air
  53. [INFO] Address Announced (AA): ac53a4
  54. [INFO] Callsign: EDV5271
  55. [INFO] Type Code (TC): 11 Airborne Position
  56. [INFO] Surveillance Status (SS): 0 No Condition Information
  57. [INFO] Time: 0 Not Synced to 0.2s UTC Epoch
  58. [INFO] Latitude: 39.20978610798464 N
  59. [INFO] Longitude: -76.8250732421875 E
  60. [INFO] Altitude: 7450 ft

Webserver

To view the decoded planes and flight paths live in Google Maps, a webserver is included. The webserver can be started before or after the GRC flowgraph, but the webserver must be running to view the Google Maps webpage. The ZeroMQ block in the example flowgraph is required when using the webserver. Before running the webserver, be sure to install its dependencies.

  1. Open a terminal
  2. $ cd gr-adsb/
  3. $ cd web/
  4. $ ./webserver.py or $ python3 webserver.py
  5. Open a web browser
  6. Browse to localhost:5000

Example Google Maps Webpage

SQLite Playback

Users can optionally record demodulated bursts to a SQLite database for storing or later replaying. This option depends on my other project gr-sqlite. Follow these instructions to install gr-sqlite.

To record bursts, enable the SQLite Sink in the adsb_rx.grc flowgraph. To replay those demodulated bursts later, run the adsb_playback.grc flowgraph.

ADS-B Playback Flowgraph

Installation

GNU Radio is a dependency for gr-adsb. I recommend installing it with PyBOMBS.

Source Build

Build gr-adsb manually from source using the following procedure.

Python dependencies:

  1. $ pip3 install --user colorama

Source build:

  1. $ cd gr-adsb/
  2. $ mkdir build
  3. $ cd build/
  4. $ cmake ../ # or cmake -DCMAKE_INSTALL_PREFIX=<path_to_install> ../
  5. $ make
  6. $ sudo make install
  7. $ sudo ldconfig

Webserver Dependencies

If using the built-in Google Maps webserver, you’ll need to install the following Python packages.

  1. $ pip3 install --user zmq
  2. $ pip3 install --user flask
  3. $ pip3 install --user flask-socketio
  4. $ pip3 install --user gevent
  5. $ pip3 install --user gevent-websocket