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
515 stars 156 forks source link

Trouble adding ACARS data #430

Closed thebaldgeek closed 5 years ago

thebaldgeek commented 5 years ago

I have read the ACARS page, but it seems to be out of date, so am having trouble finding out how to add my ACARS data feed.

I am using acarsdeco2

In my acars settings I have tried outServer and outConnect and outConnectUDP pp, ad2 and sbs both with the IP address of the Pi running FlightAirMap and also 127.0.0.1 I have also tried running inServer and inConnect.

In the install/index.php I have tried 127.0.0.1 and the IP address of the Pi.

That is a LOT of combinations tested and none of them pull in the ACARS feed. At this point I am wondering what I am doing wrong......

Thanks very much for your work on FlightAirMap, I am excited to get it up and running, just adding my ACARS messages would be sweet.

Thanks.

thebaldgeek commented 5 years ago

I would like to add that I have tried using daemon-acars.php, but it seems to lock up once 'connected' and listening, you can never exit that script, and it does not show up in a 'top' so it can not be killed that way. The only way to free up that script is to reboot the pi running flightairmap.... So I have been using daemon-spotter as suggested in the index.php page that it can also listen for ACARS. (It never seems to try and look for the ACARS feed, so I might be wrong in expecting it to receive ACARS messages?

Ysurac commented 5 years ago

Should work by following this : https://github.com/Ysurac/FlightAirMap/wiki/ACARS

thebaldgeek commented 5 years ago

Thanks. That's the guide/page I mentioned in my first comment and that's the guide that is out of date. The acarsdeco2 throws an error when using that option to start it. It also does not mention what install/index.php should be set to.

Will daemon-spotter receive ACARS messages?

I will keep working on it and hopefully post a working solution at some stage.

Ysurac commented 5 years ago

If messages are send to it, yes. You must set it to correct format and this will display what is received in the console.

thebaldgeek commented 5 years ago

What is the correct format, sbs, ad2 or pp?

Ysurac commented 5 years ago

sbs or pp are supported. If you configure it to send data via UDP then daemon-spotter should display something if source is set as acars (same for daemon-acars that listen to anything)

thebaldgeek commented 5 years ago

I think the problem is that I have Flightairmap running on one Pi and acarsdeco2 running on another.

Will test running them on the same Pi and will report back.

thebaldgeek commented 5 years ago

I installed acarsdeco2 onto the same Pi as flightairmap and am now seeing the ACARS messages in the console of from daemon-acars.php script. That is great progress. It confirms (in my mind) that flightairmap is only listening for localhost acars messages.

However, none of the ACARS messages are showing in the web interface.

image

thebaldgeek commented 5 years ago

This is the error I get when I put any address other than either 'localhost' or 127.0.0.1 in for the ACARS address;

Listen to acarsdec ... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/flightairmap/scripts/daemon-acars.php on line 45 Could not bind socket : [99] Cannot assign requested address

thebaldgeek commented 5 years ago

Fresh install of Linux on a x86 laptop. Using the following versions; Ubuntu 18.04.2 LTS mysql Ver 14.14 Distrib 5.7.25 PHP 7.2.15

Followed your Debian install guide which works every time with no extra commands added to the flow.

Issue: daemon-acars.php shows decoded ACARS messages but they do not show up in the web GUI.

Thanks for your time.

Ysurac commented 5 years ago

All ACARS messages are not added to the database, for live acars they need to have registration and ident data. But it's also possible that I don't parse correctly the format, can you send acarsdeco commands and some example messages from daemon-acars.php that I can copy/paste and test.

thebaldgeek commented 5 years ago

I'm making progress on getting the information you requested. But I am seeing this message a lot; PHP Warning: A non-numeric value encountered in /var/www/flightairmap/require/class.SpotterImport.php on line 735

Using daemon-spotter.php in terminal to see ACARS and dump1090 messages. That error shows up frequently. (I see the ACARS messages in the terminal, but not in the web GUI - Will get the information you need and post it here soon).

thebaldgeek commented 5 years ago

Here is my acrsdeco2 command; ./acarsdeco2 --http-port 2278 --inServerUdp sbs:2237 --outConnectUdp sbs:127.0.0.1:9969

As mentioned in this thread, it seems you have to run acarsdeco2 on the same device as flightairmap. Hence getting it from one UDP port and outputting it on localhost.

Sample messages from daemon-spotter.php; ACARS : 2019-02-23,01:52:09,130.025,2,N815UA,,H1,9,F14A,UA2198,#M1B/HDQDLUA.POSN36074W111160,TBC,015206,390,OURAY,022318,,M49,29647,135/GAHDQDLUA/CA/TS015206,1007992188

ACARS : 2019-02-23,01:52:16,130.450,2,N819DX,,H1,3,F82A,NW1149,#M2BPOSN34200W116406,GLESN,015214,258,ANJLL,015451,CAANN,M36,32967,90,BE14

ACARS : 2019-02-23,01:52:18,130.450,2,N329NB,,H1,3,F58A,NW2240,#M1BPOSN34151W118534,IRNMN,015213,137,SYMON,015329,BAYST,M12,32729,80C6CB

ACARS : 2019-02-23,01:52:18,130.025,2,,,SQ, ,02XA,PHXKPH,X23326N11200WV136975/ARINC

ACARS : 2019-02-23,01:52:27,130.450,2,N540US,,H1,3,D44A,NW1735,#DFB*WXRN33208W1184850150180-15532203500 N33169W1185320151195-19532503800 N33137W1185710152209-22531103800

ACARS : 2019-02-23,01:52:32,130.025,2,N815UA,,H1,9,F14A,UA2198,#M1B/HDQDLUA.POSN36074W111160,TBC,015206,390,OURAY,022318,,M49,29647,135/GAHDQDLUA/CA/TS015206,1007992188

Let me know if you need any more samples (or you can look at my acarsdeco2 http webserver).

thebaldgeek commented 5 years ago

Sample ACARS messages from daemon-acars.php

2019-02-23,03:48:27,131.550,2,N356BR,,Q0,4,M44A,UV0000,

2019-02-23,03:48:38,131.725,2,N641VA,,H1,8,F77A,VX1569,#M1BRESPWI/RJ,302A18B

2019-02-23,03:48:39,131.725,2,N430UA,Q,_d,6,S21A,UA2339,

2019-02-23,03:48:40,131.725,2,N430UA,,H1,7,F77A,UA2339,#M1B/HDQDLUA.RESREQ/AK,115/GAHDQDLUA/TS034838,2302192063

2019-02-23,03:48:41,131.725,2,N641VA,,H1,9,F78A,VX1569,#M1BPRG/TS034839,022319/DTKSEA,16R,99,055239,046/FNASA1569ED02

2019-02-23,03:48:42,131.550,2,N435WN,,H1,9,D26A,WN0939,#DFB++76502,435,B737-700,190223,WN0939,KSJC,KSNA,0420,SW1804 6 N3456.1,W11940.6,230343,35820,-59.5,300,056,DC,00011,1, N3450.4,W11933.8,230344,34990,-57.8,307,054,DC,00011,1, N3444.6,W11926.9,230345,34167,-

2019-02-23,03:48:44,131.725,2,N430UA,,H1,8,F78A,UA2339,#M1B/HDQDLUA.POSN33194W113225,SNRRA,034839,180,,,,M20,31957,88/GAHDQDLUA/CA/TS034839,2302198572

2019-02-23,03:48:49,131.550,2,N435WN,,H1,0,D26B,WN0939,#DFB55.5,309,054,DC,00009,1, N3438.7,W11920.0,230346,32474,-51.5,315,056,DC,00016,1, N3432.9,W11913.0,230347,29850,-45.3,320,057,DC,00064,1, N3427.3,W11906.3,230348,27618,-39.8,326,053,DC,00049,1, :

2019-02-23,03:48:51,130.450,2,N819DX,Y,_d,4,S17A,NW1149,

2019-02-23,03:48:53,130.450,2,N819DX,,H1,5,F91A,NW1149,#M2B/BA USADCXA.DR1.N819DXA934

2019-02-23,03:48:57,130.025,2,N805AW,,5Z,8,M11A,US2009,OS KPHX /IR KPHX0358

2019-02-23,03:49:06,130.025,2,N965SW,,17,1,M43A,OO5527,H,H,23FEB19 03:49:13,13376824,4796,METAR,KTUS,

2019-02-23,03:49:09,130.025,2,N770UW,N,_d,3,S31A,US1823,

2019-02-23,03:49:19,131.725,2,N318UP,,H1,7,D30A,UP0903,#DFBA5M4230349LAX SDF N33435W1182221366M120337028G0009N33432W118195141 6M126339031G0009N33428W1181671505M137335030G0009N33423W1181381618M141 334036G0009N33416W1181081716M150333037G0009

2019-02-23,03:49:29,131.725,2,N318UP,,H1,7,D30A,UP0903,#DFBA5M4230349LAX SDF N33435W1182221366M120337028G0009N33432W118195141 6M126339031G0009N33428W1181671505M137335030G0009N33423W1181381618M141 334036G0009N33416W1181081716M150333037G0009

2019-02-23,03:49:31,131.550,2,N532VL,,Q0,1,S22A,Y40904,

2019-02-23,03:49:31,131.725,2,,,SQ, ,00XS,,

2019-02-23,03:49:35,131.725,2,N662FE,,H1,1,D84A,FX1351,#DFBR12/N662FE23FEB034924135163109-122423336 /031324N3360W1160935012-5622970730 /032524N3392W1141135010-5393070860 /033724N3422W1121035017-4882970650 /034924N3449W1100735028-4423030510

thebaldgeek commented 5 years ago

Thankyou. Working very well.