Giter Club home page Giter Club logo

sbs1's Introduction

sbs1

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

parsing_messages.php

Stream from file

stream_from_file.php

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) {

sbs1's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

manuks

sbs1's Issues

stream error

I am calling readTcpStream as below

  $streamReader = new StreamReader();
  foreach ($streamReader->readTcpStream($lineReader, "127.0.0.1", 30003) as $line) {
  //some code here
  }

But I am getting the error like below
local.ERROR: RuntimeException: Unexpected stream error in /var/www/html/vendor/afk11/sbs1/src/StreamReader.php:97

Any idea how to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.