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
517 stars 157 forks source link

Error : Table 'flightairmap.spotter_live' doesn't exist #283

Closed LamaBleu closed 7 years ago

LamaBleu commented 7 years ago

Hi Ysurac,

First thank you for the nice piece of work. French also here. I'm actually feeding local VRS server with ADSB frames, and my final plan is to use ACARS-VDL2 frames using dumpvdl2. I'm facing issue after FlightAirMap install, while trying to run daemon. Running Ubuntu here, installation was more or less easy but seems OK.

If you use MySQL or MariaDB, check that max_allowed_packet >= 8M, else import of some table can fail.

Write configuration....SUCCESS
Create database....SUCCESS
Update schema if needed....SUCCESS
Insert data in source table....SUCCESS
Reloading page to check all is now ok....SUCCESS

After performing the installation, I'm able to display the web page and menus without issue. Database were populated (using populate_all.php and update_db.php) , and I can display airports, but unfortunately no flights.

While restarting/running the script scripts/daemon-spotter.php I'm facing several errors :

Connecting...
Connect to all...
Connection in progress to 127.0.0.1:30003 (sbs)....
Connected!
SCAN MODE 

*********** New aircraft hex : 3430CD ***********
*********** New aircraft hex : 400FE3 ***********
*********** New aircraft hex : 484F6D ***********
*********** New aircraft hex : 4CA541 ***********
Getting schedule info...
Getting schedule info...
Getting schedule info...
!!! Too much distance in short time... for TRA6117
Time : 21s - Distance : 4358m -Speed : 747.08571428571 km/h - Lat : 43.70585 - long : -1.10301 - prev lat : 43.74161 - prev long : -1.08081 
!!! Too much distance in short time... for TRA6117
Time : 21s - Distance : 4462m -Speed : 764.91428571429 km/h - Lat : 43.70517 - long : -1.10406 - prev lat : 43.74161 - prev long : -1.08081 
!!! Too much distance in short time... for TRA6117
Time : 21s - Distance : 4545m -Speed : 779.14285714286 km/h - Lat : 43.70435 - long : -1.10406 - prev lat : 43.74161 - prev long : -1.08081 
!!! Too much distance in short time... for 
Time : 23s - Distance : 3213m -Speed : 502.90434782609 km/h - Lat : 43.81613 - long : -1.12808 - prev lat : 43.83943 - prev long : -1.10438 
!!! Too much distance in short time... for TRA6117
Time : 23s - Distance : 4767m -Speed : 746.13913043478 km/h - Lat : 43.70250 - long : -1.10511 - prev lat : 43.74161 - prev long : -1.08081 
!!! Too much distance in short time... for TRA6117
Time : 23s - Distance : 4877m -Speed : 763.35652173913 km/h - Lat : 43.70174 - long : -1.10611 - prev lat : 43.74161 - prev long : -1.08081 
Check if aircraft is already in DB...PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'flightairmap.spotter_live' doesn't exist in /var/www/FlightAirMap/require/class.SpotterLive.php:856
Stack trace:
#0 /var/www/FlightAirMap/require/class.SpotterLive.php(856): PDOStatement->execute(Array)
#1 /var/www/FlightAirMap/require/class.SpotterImport.php(623): SpotterLive->checkModeSRecent('484F6D')
#2 /var/www/FlightAirMap/scripts/daemon-spotter.php(1277): SpotterImport->add(Array)
#3 {main}
  thrown in /var/www/FlightAirMap/require/class.SpotterLive.php on line 856

No doubt, I forgot a step ! Thanks in advance for your help :)

Ysurac commented 7 years ago

Check that table spotter_live is available. It seems it's not the case. It's possible if install was stopped during table creation. Why did you run populate_all.php ?

for the too much distance problem, this should be fixed in latest commit, in fact this was too much data for a same flight in a short time.

LamaBleu commented 7 years ago

Hi Ysurac, thanks for your quick answer. spotter_live table doesn't exist in the database, but I can find the creation script spotter_live.sql in db directory. I will perhaps try a full reinstall (except settings.php)

Why did you run populate_all.php ? Just because of the nice name ;)

Ysurac commented 7 years ago

You can insert all *.sql in db directory for tables that doesn't exist. Or (it's better) try a full install again.

I will create a script: win_money.php that will delete all files :)

LamaBleu commented 7 years ago

HI, I performed a full-reinstall several times with errors on tables, and finally increased upload_max_filesize and max_execution_time in php.ini. Seems OK now, I can display aircrafts on the map, statistics are OK. However I encounter new issues but will check later (picture and departure/arrival time not displayed). Issue closed, thanks a lot for your help !