ThomasZaniboni Posted September 1, 2010 Report Share Posted September 1, 2010 Hello guys, I wanted to ask you a question about the phases of flight Kacars. My VA is a cargo airline and the stages of Kacars I would change some things: Ex, I would change phase Boarding with the Cargo Loading and other. Please ask if any of you could help me to make this change, thanks. Ciao , My VA : Cargoitalia Virtual Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted September 1, 2010 Report Share Posted September 1, 2010 Sure you can do this within the kACARS_Free module. Open the module and locate the case 'liveupdate': Replace the entire case down to the break with the following. NOT TESTED but it should work. Let me know if you have any problems case 'liveupdate': $pilotid = PilotData::parsePilotID($xml->verify->pilotID); $lat = str_replace(",", ".", $xml->liveupdate->latitude); $lon = str_replace(",", ".", $xml->liveupdate->longitude); # Get the distance remaining $depapt = OperationsData::GetAirportInfo($xml->liveupdate->depICAO); $arrapt = OperationsData::GetAirportInfo($xml->liveupdate->arrICAO); $dist_remain = round(SchedulesData::distanceBetweenPoints( $lat, $lon, $arrapt->lat, $arrapt->lng)); # Estimate the time remaining if($xml->liveupdate->groundSpeed > 0) { $Minutes = round($dist_remain / $xml->liveupdate->groundSpeed * 60); $time_remain = self::ConvertMinutes2Hours($Minutes); } else { $time_remain = '00:00'; } $phase = $xml->liveupdate->status; $phase = str_replace("Boarding", "Cargo Loading", $phase); // If phase is boarding replace with Cargo Loading $fields = array( 'pilotid' =>$pilotid, 'flightnum' =>$xml->liveupdate->flightNumber, 'pilotname' =>'', 'aircraft' =>$xml->liveupdate->registration, 'lat' =>$lat, 'lng' =>$lon, 'heading' =>$xml->liveupdate->heading, 'alt' =>$xml->liveupdate->altitude, 'gs' =>$xml->liveupdate->groundSpeed, 'depicao' =>$xml->liveupdate->depICAO, 'arricao' =>$xml->liveupdate->arrICAO, 'deptime' =>$xml->liveupdate->depTime, 'arrtime' =>'', 'route' =>$xml->liveupdate->route, 'distremain' =>$dist_remain, 'timeremaining' =>$time_remain, 'phasedetail' =>$phase, 'online' =>'', 'client' =>'kACARS', ); #$this->log("UpdateFlightData: \n".print_r($fields, true), 'kacars'); ACARSData::UpdateFlightData($pilotid, $fields); break; Quote Link to comment Share on other sites More sharing options...
ThomasZaniboni Posted September 1, 2010 Author Report Share Posted September 1, 2010 I'm sorry but not work Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted September 1, 2010 Report Share Posted September 1, 2010 Are you sure about that? I just tested it and it worked fine. You have to give it a chance to work. It will only change when an update is passed from kACARS. Since kACARS passes an update about every 10 minutes you will need to be patient. Let me know if you still have problems. Quote Link to comment Share on other sites More sharing options...
ThomasZaniboni Posted September 1, 2010 Author Report Share Posted September 1, 2010 Thanks thanks , now work perfectly Quote Link to comment Share on other sites More sharing options...
Moderators joeri Posted September 3, 2010 Moderators Report Share Posted September 3, 2010 now comes the difficould part could it be implemented for both as we are cargo/pax it would be nice iff it could do that. maby something like looking when you pull a flight from the server iff its cargo or pax. gr joeri Quote Link to comment Share on other sites More sharing options...
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.