Flight API Not show Actual Arrival time


#1

Flight API not give actual arrival time Please check.

I have entered LX455 That time show Actual Arrival time 0

Please suggest. I am using java script API


$(document).ready(function() {
    $('#go_button').click(function() {
    $.ajax({
       type: 'GET',
       url: fxml_url + 'FlightInfoEx', 
       data: { 'ident': $('#ident_text').val(), 'howMany': 1, 'offset': 0 },
       success : function(result) {

          // display some textual details about the flight.
          var flight = result.FlightInfoExResult.flights[0];

//          $('#results').html('Flight ' + flight.ident + ' from ' + flight.origin + ' to ' + flight.destination +'Estimate Departuretime ' + flight.filed_departuretime +'Actual Departuretime ' + flight.actualdeparturetime
//                                     +'Actual Departuretime ' + flight.actualdeparturetime  +'Estimate Arrivaltime ' + flight.estimatedarrivaltime +'Actual Arrivaltime ' + flight.actualarrivaltime);

		  //alert(flight);
          $('#results').html('Flight ' + flight.ident + ' from ' + flight.origin + ' to ' + flight.destination +'Estimate Departuretime ' + flight.filed_departuretime +'Actual Departuretime ' + flight.actualdeparturetime
                                     +'Actual Departuretime ' + flight.actualdeparturetime  +'Estimate Arrivaltime ' + flight.estimatedarrivaltime +'Actual Arrivaltime ' + flight.actualarrivaltime);


  $('#results').html('Flight ' + flight.ident + 'Actual Arrivaltime ' + flight.actualarrivaltime);
          // display the route on a map.
          fetchAndRenderRoute(flight.faFlightID);
       },
       error: function(data, text) { alert('Failed to fetch flight: ' + data); },
       dataType: 'jsonp',
       jsonp: 'jsonp_callback',
       xhrFields: { withCredentials: true }
       });
   });
});

code.


#2

(I have moved your post to the FlightXML forum. Please use this section for posting such questions in the future.)

If the actualarrivaltime is 0 then the flight has not arrived yet. Be aware that the result from FlightInfoEx may contain multiple flights for the last several days, and a few into the future, so you should not necessarily assume that the first result returned is the one that the user will always be interested in.


#3

Thanks, Can you tell me how can I get the time duration of any flight using Jquery/Json code. I mean i cannot see the parameter to get the time duration. Duration means traveled time of a flight Like suppose if flight departs on 6th May 2013 at 6:00 Pm and lands on 7th May morning i.e. 6:00 AM to destination then duration will be counted as 12 hours. Otherwise you can give me Dates as well start date and end date of flight. I mean like in above example start date will be 6th May and end date will be 7th May. Also I am facing the Issue with timezone as flights are of different timezones so if any parameter recognizes as Timezone will be very great.

For your kind information : I am using Jquery/Json API. So above questions will belongs to the same API only.

Please help me as its very urgent.

Thanks,
Jitendra


#4

The “filed_ete” value (filed estimated time enroute) is how long the flight was originally scheduled to be. However, once the flight has actually arrived, the actual time enroute can simply be computed by subtracting (actualarrivaltime - actualdeparturetime).


#5

But in case if there will be a difference of more then 24 hours like 6PM to next day 7 PM then it will actually calculate it as 1 hour or 25 hours. Please suggest. Can you tell me how I can find Dates.

Thanks,
JItendra


#6

All timestamp values returned by FlightXML are UNIX “epoch” standard (seconds since Jan 1, 1970 midnight UTC). Date and time information are both available in the timestamps and subtracting two epoch timestamps that cross a day boundary will properly yield a value that is 25 hours for your hypothetical example.