Rogerox Posted September 13, 2010 Report Posted September 13, 2010 Hi there, I want to know if there´s any way to wipe the flight data from the LIVE MAP window, for example, after the flight is done (I plan to trigger an event from client to server side, at the PHP module, to make it clean the flight data). I mean, how to code at server side (php module) to clean up just the pilots flight data (especific flight data, not all data at the map window). Thank you in advance. Regards, Roger Quote
Moderators joeri Posted September 13, 2010 Moderators Report Posted September 13, 2010 in your maintanace part off the admin you can do a reset acars then it will clean the whole map Quote
Rogerox Posted September 14, 2010 Author Report Posted September 14, 2010 in your maintanace part off the admin you can do a reset acars then it will clean the whole map Hi Joeri, I need something to wipe out only the pilot and specific flight I was doing, not all the flights on the map. Example: I am PLT1123 flying FLT1244, when I end my flight, the MAP still shows it for several minutes/hours. I would like to trigger an event with my ACARS client, telling the server side to call some tool to wipe only FLT1244 So the map that had this: PLT1101 - John Xxxx FLT 1203 PLT1104 - Paul Yxxx FLT 1214 PLT1123 - Peter Zzzz FLT 1244 <= that´s my flight PLT1107 - Carl Oooo FLT 1232 Will have this: PLT1101 - John Xxxx FLT 1203 PLT1104 - Paul Yxxx FLT 1214 PLT1107 - Carl Oooo FLT 1232 Is that possible? Thanks. Quote
Administrators simpilot Posted September 14, 2010 Administrators Report Posted September 14, 2010 The acarsdata table holds the pilot id. You can write a sql function to delete the row and call it when you want to. Something like -> function delete_pilotdata($pilotid) { $query = "DELETE FROM phpvms_acarsdata WHERE pilotid='$pilotid'"; DB::query($query); } inside of a data class would do it for you. Call that function from your acars module you are building and include the pilot id in the call. Quote
Rogerox Posted September 15, 2010 Author Report Posted September 15, 2010 The acarsdata table holds the pilot id. You can write a sql function to delete the row and call it when you want to. Something like -> function delete_pilotdata($pilotid) { $query = "DELETE FROM phpvms_acarsdata WHERE pilotid='$pilotid'"; DB::query($query); } inside of a data class would do it for you. Call that function from your acars module you are building and include the pilot id in the call. Thank you, Simpilot, that´s exactly what I needed! Regards, Roger Quote
richipilot Posted January 11, 2015 Report Posted January 11, 2015 Simpilot, How should I enter that on my website to make that flights completed must be ereased from the map? Thanks for your help Quote
Administrators simpilot Posted January 11, 2015 Administrators Report Posted January 11, 2015 Simpilot, How should I enter that on my website to make that flights completed must be ereased from the map? Thanks for your help You can include it in a controller, or make your own (preferred) so it does not get overwritten in an update. If you are just trying to make sure pilots do not show on the map after a flight is completed you could just set the config for ACARS_LIVE_TIME to a minimum, something like 3 minutes. This will cause any flight that has not been updated in the last 3 minutes be dropped from the display. # ACARS options # Minutes, flights to show on the ACARS # Default is 720 minutes (12 hours) Config::Set('ACARS_LIVE_TIME', 720); 1 Quote
richipilot Posted January 11, 2015 Report Posted January 11, 2015 You can include it in a controller, or make your own (preferred) so it does not get overwritten in an update. If you are just trying to make sure pilots do not show on the map after a flight is completed you could just set the config for ACARS_LIVE_TIME to a minimum, something like 3 minutes. This will cause any flight that has not been updated in the last 3 minutes be dropped from the display. # ACARS options # Minutes, flights to show on the ACARS # Default is 720 minutes (12 hours) Config::Set('ACARS_LIVE_TIME', 720); O_o I have been so idiot xDD was so easy in this case, but thanks a lot for your help!!! really really appreciated thanks. SOLVED Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.