Jacques Posted December 3, 2011 Report Posted December 3, 2011 Hello, I'm trying to create a code that alter the condition of the aircraft when a pirep is been submitted. it looks to the landing rate, so when the landing rate is below 200 than 0.5% off the condition. when a landing rate is higher than 200 than 2% of condition. when a landing rate is higher than 500 than 50% off condition. so far i have: $pos = find_in_fsacars_log('TouchDown:Rate', $log); $landingrate = str_replace('TouchDown:Rate', '', $log[$pos]); $count = preg_match('/([0-9]*:[0-9]*).*([-+]\d*).*/i', $landingrate, $matches); if($count > 0) { PIREPData::editPIREPFields($report->pirepid, array('landingrate' => $matches[2])); } PIREPData::AppendToLog($report->pirepid, $_GET['log']); if ($count < -200) { aircraftdata::editaircraftfields($report->pirepid, array('cond' => $matches[100-0,5])) } if ($count > -200) { aircraftdata::editaircraftfields($report->pirepid, array('cond' => $matches[100-2])) } if ($count > -500) { aircraftdata::editaircraftfields($report->pirepid, array('cond' => $matches[100-50])) } the most is from the fsacars config file could anyone help me with this? thanx! grtz, Jacques Quote
Jakes Posted March 16, 2012 Report Posted March 16, 2012 Hi Jacques, I am trying to figure out how the condition is calculated in the first place, but cannot find the file containing that info. will see what I can do Cheers, Jakes 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.