Ysurac / FlightAirMap

Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
https://www.flightairmap.com/
GNU Affero General Public License v3.0
516 stars 157 forks source link

Aircraft detected in zero - something related to Datasource #409

Open punithbm opened 6 years ago

punithbm commented 6 years ago

screenshot 2018-07-18 at 9 10 33 pm I've installed the FlightAirMap with Nginx - MySQL and it works. But its showing aircraft detected as Zero However i've script run daemon-acars.php

I've followed the installation steps - Please note I was not able to setup init scripts

systemctl daemon-reload systemctl enable flightairmap.service systemctl start flightairmap.service

since i was getting flightairmap not found error Please advice on the fixes

Ysurac commented 6 years ago

You use ACARS as datasource ? Do you have some output when run the script ?

For init scripts you copied them to the /lib/systemd/... path and fixed the path if you don't use the default one (/var/www/flightarimap/) ?

punithbm commented 6 years ago

Hi @Ysurac thanks for the quick reply

I use ACARS for datasource - please check the screen shot for init scripts.. I copied the files to /etc/systemd/flightairmap.service and edited like this [Unit] Description=FlightAirMap

[Service] ExecStartPre=/bin/sleep 30 ExecStart=/var/www/flightairmap/scripts/daemon-spotter.php

[Install] WantedBy=multi-user.target

Please advice on the same screenshot 2018-07-18 at 9 31 29 pm

Ysurac commented 6 years ago

What output do you have when you run daemon-acars.php or daemon-spotter.php manually ?

punithbm commented 6 years ago

I'm getting following error when i run - php daemon-acars.php

Can't calculate geoid, check that you downloaded it via update_db.php (Exception: /var/www/flightairmap/require/../data/egm2008-1.pgm doesn't exist in /var/www/flightairmap/require/class.GeoidHeight.php:46 Stack trace:

0 /var/www/flightairmap/require/class.SpotterImport.php(60): GeoidHeight->__construct()

1 /var/www/flightairmap/require/class.ACARS.php(30): SpotterImport->__construct(Object(PDO))

2 /var/www/flightairmap/scripts/daemon-acars.php(26): ACARS->__construct(NULL, true)

3 {main})

Listen to acarsdec ... PHP Warning: socket_bind(): unable to bind address [98]: Address already in use in /var/www/flightairmap/scripts/daemon-acars.php on line 45

Ysurac commented 6 years ago

Did you run update_db.php ? daemon-acars.php is a UDP server for acarsdec/acarsdeco, it listen on a port (that is already used in this case). If it's not what you want, run daemon-spotter.php that can be used for ACARS SBS-3 over TCP, ACARS from acarsdec json (TCP and UDP).

punithbm commented 6 years ago

I did run update_db.php by php update_db.php When I run php daemon-spotter.php - i'm getting following error

Connecting... Connect to all... Connection in progress to 127.0.0.1:3306 (sbs).... SCAN MODE

Wrong line format. Ignoring... [Reconnect after an error... Connect to all... Connection in progress to 127.0.0.1:3306 (sbs).... Check all... Update last seen flights data...

FYI I'm using nginx - mysql - php combination also please check the screenshot of output : netstat -tulpn

screenshot 2018-07-18 at 11 14 38 pm
Ysurac commented 6 years ago

What program do you use for ACARS ?

punithbm commented 6 years ago

@Ysurac I'm not sure about that

This is my settings.php file

$globalSources = array(array('host' => '127.0.0.1','port' => '3306','name' => '','format' => 'auto','sourcestats' => FALSE,'noarchive' => FALSE,'timezone' => 'U$ // ^^ in the form array(array(host => 'host1', 'port' => 'port1','name' => 'first source','format' => 'sbs'),array('host' => 'host2', 'port' => 'port2','name' =$

//ACARS Listen in UDP $globalACARS = FALSE; $globalACARSHost = '0.0.0.0'; // Local IP to listen $globalACARSPort = '9999'; $globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive $globalACARSArchiveKeepMonths = '0';

//APRS configuration (for glidernet) $globalAPRS = FALSE; $globalAPRSversion = $globalName.' using FlightAirMap'; $globalAPRSssid = 'FAM'; $globalAPRSfilter = 'r/'.$globalCenterLatitude.'/'.$globalCenterLongitude.'/250.0'; $globalAPRSarchive = FALSE; // archive track of APRS flights

//User can choose between APRS & SBS1 //$globalMapchoose = FALSE;

punithbm commented 6 years ago

@Ysurac anything on this

Ysurac commented 6 years ago

For FlightAirMap, you need to have a source, I don't provide any by default. What is your source and what you want to do ?

punithbm commented 6 years ago

Oh ok - I just wanted to try this for real time aircraft tracking - just like in your example (https://real.flightairmap.com/) Can you (@Ysurac ) please suggest be some source or any ways to integrate it

Ysurac commented 6 years ago

For real flight there is adsbexchange or adsbhub. Else you can use a RTL-SDR USB key with Dump1090 like the key available here: https://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/ then you will get flights that are near your position.

punithbm commented 6 years ago

@Ysurac Thank you. Can you please help us in how to use adsbexchange or adsbhub or any other source for showing real aircraft. We tried couple of times - but not able to figure out