afk11 / sbs1
SBS1 packet decoder
v0.0.4
2018-07-07 12:57 UTC
Requires (Dev)
- infection/infection: ^0.8.2
- phpstan/phpstan: ^0.9.2
- phpunit/phpunit: ^6.5
- squizlabs/php_codesniffer: ^3.2
This package is auto-updated.
Last update: 2024-12-23 06:48:48 UTC
README
This project provides simple library for decoding ADSB information from SBS-1 format.
SBS1 format is a CSV format produced by ADSB decoders.
This package enables decoding raw messages, and generating messages from a 'stream' type (a file handle or socket).
The software can decode messages produced on port 30003 by dump1090 (started with the --net
flag). There are many cheap (~10$) devices that can be used for this.
Installation
composer require afk11/sbs1
Examples
Parse raw messages
Stream from file
Stream from Socket
This example is missing, but it's essentially a one line difference to stream_from_file.php.
Replace the line calling readFile with a call to readTcpStream:
-foreach ($streamReader->readFile($lineReader, $file) as $line) {
+foreach ($streamReader->readTcpStream($lineReader, "127.0.0.1", 30003) as $line) {