Open Ysurac opened 7 years ago
For accident data you can try : http://www.airfleets.net/crash/crash_search.html https://aviation-safety.net/database/databases.php http://www.skybrary.aero/index.php/Main_Page (Section 'Accidents and incidents') https://www.aeroinside.com/incidents/category/crash https://asrs.arc.nasa.gov/search/requesting.html http://www.jacdec.de/
Update 👍 http://www.airframes.org/losses
Databases are not free, all is copyrighted so I can't use them in FlightAirMap. I can use http://www.ntsb.gov/_layouts/ntsb.aviation/index.aspx but it's only for US flights/aircraft types.
I will create my own free/public domain database. Data will come from Aviation accident and incident investigation agencies over the world.
I will begin with agencies of countries who create commercials airlines aircraft. So first will be NTSB for US (Boeing), BEA for France (Airbus).
Thats sounds like a lot of work !!!! In Germany there is the Bundesamt für Flugsicherheit (BFU) which now also has searchabe reports. Not sure about their copyright. http://www.bfu-web.de/EN/Publications/publications_node.html
This site claims to provide all data as public domain http://www.baaa-acro.com/presentation/
http://www.planecrashinfo.com/
has a link to the following accident map http://www.planecrashinfo.com/Map%20Key.htm
Parser for NTSB and BEA is done. Need to put data in a DB and add support in FlightAirMap.
Parser for FAA added. Should be commited tomorrow:
I saw this one. A crash on a town. Data should be available in FlightAirMap very soon.
I set $globalAccidents = TRUE, then ran install and update. Databases for accidents and faafrm were setup but remain empty. Calling accidents from the web page results in error : 404 Object not found
404 is fixed in latest commit. faafrm will always be empty, it's used to get aircraft ICAO code from manufacturer code in FAA files and it's populated only when/if needed. accident should not be empty... strange. I will make some tests.
404 is gone, but accidents remains empty.
Strange. Try to delete the row with name last_update_accident_db in the config table and run scripts/update_db.php again. This will be slow.
Done that - but still accidents.db is empty.
Strange... What do the Updating accidents part when you run scripts/update_db.php ?
It gives the impression that it is downloading, but the db is empty
DB are populated with external data only every 15 days ! Files are not updated more often. Owner are only updated every 15 days. Updating accidents...Accidents are updated once a day. Updating statistics and archive old data...Update stats ! Count all aircraft types... Count all airlines... Count all registrations... Count all callsigns... Count all owners...
Delete again the row with name last_update_accident_db in the config table and run scripts/update_db.php again. And tell me the result.
Ok - using last commit from yesterday ! Deleted row, then ran update.php
DB are populated with external data only every 15 days ! Files are not updated more often. Owner are only updated every 15 days. Updating accidents...Updating statistics and archive old data...Update stats ! Count all aircraft types... Count all airlines... Count all registrations... Count all callsigns... Count all owners... Count all pilots... Count all departure airports... Count all detected departure airports..
config.db
Update still running, but accident.db remains empty. There is no time delay between writeing the messages "updating accidents .." Seems to internally skip the download
Strange, I added more debug info on latest commit. There is a DB change, you will have to run install/index.php. Then try again to run update_db.php after deleteing the last_update_accident_db row,
DB are populated with external data only every 15 days ! Files are not updated more often. Owner are only updated every 15 days. Updating accidents...Nothing to updateUpdating statistics and archive old data...Update stats ! Count all aircraft types...
Really strange... I added even more debug info on latest commit. Same as before, try again to run update_db.php after deleteing the last_update_accident_db row,
Can you also check if you have a cr-all.md5 file in install/tmp ?
Its there, but 0 bytes
ok. It's the problem.
Can you try to download https://data.flightairmap.fr/data/cr/cr-all.md5 ?
Should be fixed in latest commit, I think it's a TLS negotiation error.
Where do I put the md5 file. In install.tmp ?
Or should I get the commit ?
For the file: anywhere, it's only to check that you can access it and tell me if yes or not. Commit: you can get it and tell me if this was the problem.
I could download it without any problem. Extract
cr-2017.csv 63ec1cd57d68746386fa5d21b8d08699 cr-2016.csv 81da445c0d5011b6d2cc8dfaba893449 cr-2015.csv 9e426213503b041eaa89a3d972a79545 cr-2014.csv 488da0a83bde635d22af9ad2eb7f7017 cr-2013.csv 5d2fd5e7abbe0a9148525b2fbf5f58fb cr-2012.csv 04402590be99f891062b3dd3e206c6f7 cr-2011.csv c627cfa08da9e4c59d05de9aaeed27c7 cr-2010.csv f0f44ce8358fe60966012f368795b057 cr-2009.csv 896a390d617565eee498db915fc76047 cr-2008.csv 85ecdf8f399f6d961ffdc17804cc53e6 cr-2007.csv a822f7259baa3f738ea7c175dda52e8a cr-2006.csv ddd1e6ccedb9aa9cb7295b33bb80b129 cr-2005.csv b5f23fcdda846b79169e52cdcd96b9e4 cr-2004.csv 97a4f8ea04c4ed625eeac26bb8733c92 cr-2003.csv 272400596d79a80202e5f4eb1e1097bd cr-2002.csv 4d87c275701ddf9fae8a0a9ff58da4b5 cr-2001.csv f25030a7fefd42a1de757ff746f3c4b2 cr-2000.csv 006e3816ead33ebc78dd1dc95d0879cb cr-1999.csv fd5540dbffc7fcd79efd4b18be05c7b8
Ok I'll get the commit.
No change. md5 remains empty. Same text from update.php Database remains empty
I can access the md5 file with Firefox via http and https Access to https://data.flightairmap.fr/data/cr/ .. gives a 403 Forbidden error (Probabaly lacking the correct filename)
No problems here, it's really forbidden. Try to remove install/tmp/cr-all.md5
Downloading https://data.flightairmap.fr/data/cr/cr-2017.csv works with Firefox.
Extract
JA461A,"2017-01-19 00:00:00",https://aviation-safety.net/wikibase/wiki.php?id=192942,Japan,"New Chitose Airport (CTS/RJCC)",,0,,,incident,,, N326CA,"2017-01-19 00:00:00",https://aviation-safety.net/wikibase/wiki.php?id=192958,"United States of America","Billings Logan International Airport (KBIL), Billings, MT",,0,,,incident,,, PR-SOM,"2017-01-19 00:00:00",https://aviation-safety.net/wikibase/wiki.php?id=192954,Brazil,"Mar de Paraty, Rio de Janeiro",,3,,,accident,,,
No change after removal of md5 from install/tmp
You can download https://data.flightairmap.fr/data/cr/cr-all.md5 to install/tmp/. This should work, but will never update... I really don't understand the problem here.
I tried that. It just gets replaced by an empty file.
I will shutdown for today.
Thank you and have a good weekend.
Good weekend.
Strange. I installed the latest commit. Ran install, then daemon, then update. I saw a lot of php errors and stopped update to start update with logging fo file. Next run of update brought the usual reaction - "nothing to update".
But I have about 8 incidents in the database. I assume these were copied during the first run with the php errors.
But I just cant get update to repeat the accident downloads. Ran Install, deleted entries, etc.
Is it checking a wrong date ? Or something else ?
Found something. I emptied the accidents database and deleted the last update entry in config.db Its showing a lot of php warnings which seeem to be related to aircraft images.
DB are populated with external data only every 15 days ! Files are not updated more often. Owner are only updated every 15 days. Updating accidents...Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2017.csv Try to find an aircraft image for N8042B... Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 466
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 467
Warning: get_headers(): This function may only be used against URLs in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 466
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 467
Warning: get_headers(): This function may only be used against URLs in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 466
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 467
Warning: get_headers(): This function may only be used against URLs in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 466
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 467
Warning: get_headers(): This function may only be used against URLs in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238
Warning: get_headers(): Filename cannot be empty in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238 Not found :'(
SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2015.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2014.csv SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2013.csv SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2012.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2011.csv SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2010.csv SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2009.csv SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2008.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2007.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2006.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2005.csv SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2004.csv SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2003.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2002.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2001.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2000.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1999.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1998.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1997.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1996.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1995.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1994.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1993.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1992.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1991.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1990.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1989.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1988.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1987.csv Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-1986.csv
Not sure why the image error reapeared: These are the lines from my settings
$globalAircraftImageSources = array('customsources','wikimedia','airportdata','jetphotos','planepictures','planespotters'); // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic) // example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://192.168.178.37/WebSite/Photo/{registration}.jpg','original' => 'http://192.168.178.37/WebSite/Photo/{registration}.jpg','source_website' => 'Localhost', 'source' => 'Localhost', 'exif' => false);
Are you sure $globalAircraftImageCustomSources is not set another time in settings.php ? I added more debug info for this in latest commit.
For the General error: 1267 Illegal mix of collations, it's because you manually insert the table and your default collation is latin1_swedish_ci,IMPLICIT. You can use this to change it:
ALTER TABLE accidents CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci
OK, changed the collation. Checked settings but only one instance for customsources. Will download the new commit.
Could it happen when none of the selected sources has a image ?
No. But the latest commit should display more log info.
OK. Reset accident update date to 21.1.17 : not update Deleted update date and accidents.db, then reloaded table from accidents.sql : updating with errors Does not seem to make a difference if result is found or not found
Updating accidents...Import C:\xampp\htdocs\WebSite\FlightAirMap\require/../install/tmp/cr-2017.csv Try to find an aircraft image for N8042B...original entry not found for $globalAircraftImageCustomSources.http://192.168.178.37/WebSite/Photo/{registration}.jpgArray ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array RECURSION )
)
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 471
Warning: Illegal string offset 'thumbnail' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 472
Warning: get_headers(): This function may only be used against URLs in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238 original entry not found for $globalAircraftImageCustomSources.http://192.168.178.37/WebSite/Photo/{registration}.jpgArray ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array RECURSION )
)
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 471
Warning: Illegal string offset 'thumbnail' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 472
Warning: get_headers(): This function may only be used against URLs in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238 original entry not found for $globalAircraftImageCustomSources.LocalhostArray ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array RECURSION )
)
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 471
Warning: Illegal string offset 'thumbnail' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 472
Warning: get_headers(): This function may only be used against URLs in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238 original entry not found for $globalAircraftImageCustomSources.LocalhostArray ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array RECURSION )
)
Warning: Illegal string offset 'original' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 471
Warning: Illegal string offset 'thumbnail' in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Image.php on line 472
Warning: get_headers(): This function may only be used against URLs in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238 original entry not found for $globalAircraftImageCustomSources.Array ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array ( [thumbnail] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [original] => http://192.168.178.37/WebSite/Photo/{registration}.jpg [source_website] => Localhost [source] => Localhost [exif] => [0] => Array RECURSION )
)
Warning: get_headers(): Filename cannot be empty in C:\xampp\htdocs\WebSite\FlightAirMap\require\class.Common.php on line 238 Not found :'(
Error only occures for 2017 and 2016. All other years are imported without errors
Images are checked only for latest crash, not all. Should be fixed in latest commit.
For real flight, highlight plane that crashes or maybe a new page.
Need to find an updated list with flights registration in public domain. Else create a database.