2017 © Pedro Peláez
 

library adsb

Adsb is a PHP library that decode adsb DF17 message issued from dump1090 raw message (port3002).

image

kletellier/adsb

Adsb is a PHP library that decode adsb DF17 message issued from dump1090 raw message (port3002).

  • Thursday, August 31, 2017
  • by kletellier
  • Repository
  • 2 Watchers
  • 2 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Ads-b decoder for PHP

This component decode DF17 raw message from dump1090 program (port 30002). [dump1090] (https://github.com/antirez/dump1090), (*1)

For using it :, (*2)

in the composer.json file add this require :, (*3)

"require": {
    "kletellier/adsb": "dev-master"
}

after composer update you can use it by adding the composer autoload to your project., (*4)

require 'vendor/autoload.php';

Example :


use Kletellier\Adsb; // use message 8D4CA2AC9940E9B0600403144BEB $adsb = new Adsb("8D4CA2AC9940E9B0600403144BEB"); if($adsb->isValid()) { // message CRC is correct // you can test the message type if($adsb->isisAircraftVelocitiesMsg()) { echo "Aircraft Icao code : " . $adsb->getIcao(); ."\n"; // present in all messages echo "Actual speed : " . $adsb->getSpeed()."\n"; echo "Actual heading : " . $adsb->getHeading()."\n"; } if($adsb->isAircraftIdentificationMsg()) { echo "Aircraft Icao code : " . $adsb->getIcao(); ."\n"; // present in all messages echo "Actual flight number : " . $adsb->getIdent()."\n"; } }

For retrieve position it's an different way. You must have 2 messages, one odd message, and one even message. You must specify the Epoch time for each message in constructor (or by setTs method). The Epoch Time difference for 2 messages must not greater than 10 seconds, or result will be incorrect., (*5)

Example :, (*6)


use Kletellier\Adsb; use Kletellier\AdsbUtils; // use message $adsb_odd = new Adsb("*8D4CA1FA58BDF40C1A61F7846E27;",1443430837); $adsb_even = new Adsb("*8D4CA1FA58BDF095F26507CB5A87;",1443430840); // this message was necessary from same icao aircraft and a position message // test : $adsb_odd->isAircraftPositionMsg() must be true // check odd and even bit if($adsb_odd->getOe=="1" && $adsb_even->getOe=="0") { $latlon = AdsbUtils::getCoordinates($adsb_odd,$adsb_even); echo "airplane : " . $adsb_odd->getIcao . "\n"; echo "latitude : " . $latlon["latitude"] . "\n"; echo "longitude : " . $latlon["longitude"] . "\n"; }

You can use an example to connect directly to Dump1090 in example folder., (*7)

Just change the ip of your dump1090 instance :, (*8)

$dump1090_ip = "127.0.0.1";

in linux change chmod :, (*9)

chmod +x sbs-raw.php 

and launch it :, (*10)

./sbs-raw.php 

The Versions

31/08 2017

dev-master

9999999-dev

Adsb is a PHP library that decode adsb DF17 message issued from dump1090 raw message (port3002).

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar kletellier

adsb ads-b df17 dump1090 plane

01/10 2015

dev-develo

dev-develo

Adsb is a PHP library that decode adsb DF17 message issued from dump1090 raw message (port3002).

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar kletellier

adsb ads-b df17 dump1090 plane