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

List of minor bugs, missings or inexplicit behavior #341

Closed TomMuc1 closed 6 years ago

TomMuc1 commented 6 years ago

map side-bar menu: 'Display flight remaining route on click' and 'Display flight route on click' not deselectable

TomMuc1 commented 6 years ago

found no setting to display just ALL aircrafts that my site receives messages from AT THE MOMENT

TomMuc1 commented 6 years ago

while other map interfaces show instantly all aircrafts i receive - flightairmap needs often several minutes to do so

TomMuc1 commented 6 years ago

top menubar -> explore -> latest accident/incident while all other within explore are very fast and responsive these two menu-items take very long, freeze the site and put huge cpu-load (mysql) on the machine

TomMuc1 commented 6 years ago

an options/settings html-page like virtualradarserver has would be a very nice enhancement and/or better documentation of require/settings.php

TomMuc1 commented 6 years ago

one feature of virtualradarserver i love - and did not find (maybe overlooked) is the option to do range-plots for my site even over a long time period and different altitudes

TomMuc1 commented 6 years ago

at least at my site (1.500msg/sec) very high cpu-load (70-100%) while running daemon-spotter.php 24/7 via cronjob and using port 30003 on dump1090-mutability as data-source.

TomMuc1 commented 6 years ago

altitude colors and aircraft outlines of this app are maybe a little nicer - just my single opinion: http://radarcape-demo.jetvision.de/gmap.html

Ysurac commented 6 years ago
TomMuc1 commented 6 years ago

hahaha - lightningfast as always :) never saw an app where even these minor bugs were fixed soo fast! thanx

Ysurac commented 6 years ago
TomMuc1 commented 6 years ago

yep - the altitude color - but again just my taste maybe others see this different ...

TomMuc1 commented 6 years ago

in this post you can see two of these range plots: https://discussions.flightaware.com/t/post-your-piaware-setup/17467/158?u=tommuc

TomMuc1 commented 6 years ago

I will try to optimize that, many checks are done here. It's fast with postgreSQL but slow with MySQL

i'll have a look into table structure and indexes of mysql - maybe i can find out what the problem could be with mysql ...

TomMuc1 commented 6 years ago

and please let me know when you managed to add aircraft.json and lighttpd support - but again - no hurry - i'm just curious :)

Ysurac commented 6 years ago

There is a (dirty) polar in FlightAirMap when stats are enable for the source (sourcestats should be TRUE for the source). I don't remember if this work when using spotter-daemon.php as cronjob, maybe not.

Maybe check are done when loading page to find if a aircraft that crash was not seen before. I will try to make this another way. MySQL is always slower than postgreSQL for FlightAirMap usage.

aircraft.json support is added in latest commit. (even if daemon-spotter.php running as daemon with TCP source is better for data). As cronjob this will use less CPU, but don't run it as cronjob when you can.

TomMuc1 commented 6 years ago

missing option to deselect an aircraft on map without selecting another - again - maybe i overlooked something

Ysurac commented 6 years ago

There is a little X on the upper right corner of the flight info box, this will close info box and deselect aircraft.

TomMuc1 commented 6 years ago

aircraft.json support is added in latest commit. (even if daemon-spotter.php running as daemon with TCP source is better for data). As cronjob this will use less CPU, but don't run it as cronjob when you can.

unbelivable!!! what is the best way to update the app to new commits? and what is the best/easiest way to switch from 30003 input to aircraft.json without running the installer again?

TomMuc1 commented 6 years ago

There is a little X on the upper right corner of the flight info box, this will close info box and deselect aircraft.

aaah - ok - silly me :)

Ysurac commented 6 years ago

git pull You can run the installer, when initial install is done it only update table/options when needed. It should be run after each update.

TomMuc1 commented 6 years ago

hmmm - that's what i did - but:

pi@RaspPiADSB5:/var/www/html $ ls flightairmap index.html index.lighttpd.html phpinfo.php pi@RaspPiADSB5:/var/www/html $ git pull fatal: Not a git repository (or any of the parent directories): .git pi@RaspPiADSB5:/var/www/html $

Ysurac commented 6 years ago

In flightairmap directory and if you get it via git the first time.

TomMuc1 commented 6 years ago

pi@RaspPiADSB5:/var/www/html/flightairmap $ git pull remote: Counting objects: 10, done. remote: Compressing objects: 100% (1/1), done. remote: Total 10 (delta 9), reused 10 (delta 9), pack-reused 0 Unpacking objects: 100% (10/10), done. From http://github.com/ysurac/flightairmap 87b9d11..9e0f727 master -> origin/master Updating 87b9d11..9e0f727 error: Your local changes to the following files would be overwritten by merge: index.php install/index.php polar-geojson.php require/class.SpotterImport.php Please commit your changes or stash them before you merge. Aborting

TomMuc1 commented 6 years ago

i did zero changes to the files named above beside setting them to 777 (like all other files in this directory and beyond) while all the install hassle was some days ago ...

Ysurac commented 6 years ago

It's a change. 2 choices:

TomMuc1 commented 6 years ago

ok - worked instantly. but now did a reboot and in /install Data source can't see the option for aircraft.json ...

TomMuc1 commented 6 years ago

ok - the index.php i have in install directory is different from the one that is in master on github ...

TomMuc1 commented 6 years ago

that means the git pull did not what was supposed to do

TomMuc1 commented 6 years ago

delete all files and clone completely from master?

Ysurac commented 6 years ago

yes maybe better, you can keep the require/settings.php

TomMuc1 commented 6 years ago

pi@RaspPiADSB5:/var/www/html $ sudo rm -r flightairmap/ pi@RaspPiADSB5:/var/www/html $ sudo git clone --depth=1 http://github.com/ysurac/flightairmap Cloning into 'flightairmap'... remote: Counting objects: 2943, done. remote: Compressing objects: 100% (2788/2788), done. remote: Total 2943 (delta 252), reused 2564 (delta 131), pack-reused 0 Receiving objects: 100% (2943/2943), 91.11 MiB | 4.42 MiB/s, done. Resolving deltas: 100% (252/252), done. Checking out files: 100% (2959/2959), done. pi@RaspPiADSB5:/var/www/html $ sudo chmod -R 777 flightairmap/

now have the actual install/index.php - but agian see no option for aircraft.json

Ysurac commented 6 years ago

why do you chmod 777 ? It's Dump1090 aircraft.json

TomMuc1 commented 6 years ago

why do you chmod 777 ?

because i was too lazy to see which files needs what permissions

i find 'aircraft.json' in the source of install/index.php but not on html output in chrome!

TomMuc1 commented 6 years ago

cleard browser cache and restarted browser - now in option menu

Ysurac commented 6 years ago

When you run install/index.php it say which file need write permission.

In source you can choose the format, even if using auto it should detect it. If the file is locally available use file:///run/idontknowwhereitisforyou/aircraft.json else if over webserver http://ip/../aircraft.json

Ysurac commented 6 years ago

ok, never add this problem. In latest commit this will not be cached by browser.

TomMuc1 commented 6 years ago

no wonder with all this back and force I MADE with the browser :)

TomMuc1 commented 6 years ago

output from terminal:

New flight... New aircraft hex : 4B0F76 New flight... New aircraft hex : 0200AF New flight... New aircraft hex : 3D3719 New flight... New aircraft hex : 3D16CD Sleeping... New flight... New aircraft hex : 4CA6B6 New flight... New aircraft hex : 4CA948 New flight... New aircraft hex : 3C6608 New flight... New aircraft hex : 3C4891 New flight... New aircraft hex : 3C6445 New flight... New aircraft hex : 501D1E !!! Too much distance in short time... for Time : 52s - Distance : 22601m -Speed : 1564.6846153846 km/h - Lat : 47.345352 - long : 10.156517 - prev lat : 47.472157 - prev long : 9.921781 ø Calculated Heading for 501E1B : 359 !!! Too much distance in short time... for Time : 52s - Distance : 26108m -Speed : 1807.4769230769 km/h - Lat : 48.051918 - long : 13.183242 - prev lat : 48.252512 - prev long : 13.000296 Sleeping...

TomMuc1 commented 6 years ago

bot no aircrafts show up -> made a second source via install (the old working 30003) but where can i switch between sources in flightairmap html interface?

TomMuc1 commented 6 years ago

if i delete aircraft.json from sources it autoreverts instantly to 30003 and the planes show up. what i wonder in addition is that daemon-spotter.php sleeps most of the time when aircraft.json is set up as source. but as the aircraft.json is refreshed every second it should pick up a new every second! what and where did you setup the interval to fetch the new file again and again?

Ysurac commented 6 years ago

aircraft.json support fixed in latest commit.

Source are agregated, but http and TCP source can't be used at the same time. You can decrease the sleeping time using $globalMinFetch (I forget to add it to install/index.php...)

TomMuc1 commented 6 years ago

the git pull again did not work

BUT

i cant be happier! set $globalMinFetch = '1' (forwhatever the singlequotes are good for with numbers:))) and now lots of aircrafts instantly show up on the map INCLUSIVE ALL (WITH ANONYMIZED) MLAT AND as i always assumed CPU-LOAD of daemon-spotter.php now is between 5-10% instead of before 70-100%

PERFECT!!! THANX SO MUCH :)

Ysurac commented 6 years ago
TomMuc1 commented 6 years ago

anyways - i'm really happy that you gave the aircraft.json a try! and we'll see if over time you start to love this option too :) now there is no more downside to use your app even on a cheap old raspberry pi2 and when it will be possible to adapt the htaccess to lighttpd i'm sure nearly every feeder from flightaware want's to run your app!

Ysurac commented 6 years ago

Cron job use less CPU but write and read a lot more data to/from DB, less checks possibles, speed and heading can't be calculated if not available,... But it's your choice, maybe better for a slow Raspberry PI (at least if DB is not on it, else maybe not).

I'm trying to do the change for lighttpd.

TomMuc1 commented 6 years ago

ok i'll give system-service a try as you did with .json :)

Ysurac commented 6 years ago
Ysurac commented 6 years ago

lighttpd configuration is added in install directory. I will have to write a little tutorial for that.

TomMuc1 commented 6 years ago

ok - got your points :)

what i'll do is setup a systemctl service instead of cron ...

TomMuc1 commented 6 years ago

you make me fear - are you human? - every single wish/idea i had - some minutes later your'e done with the job. how many arms, heads and seconds within an hour you guys over there in france have???