Hi,
When using the Search Operation to find flights in a Lat/Lon box, the flights that are returned are not inside that box. I am using the
-latlong "MINLAT MINLON MAXLAT MAXLON"
Here is the PHP/Soap code that I am using:
<?php
$options = array(
'trace' => true,
'exceptions' => 0,
'login' => 'XXX',
'password' => 'XXX',
);
$client = new SoapClient('http://flightxml.flightaware.com/soap/FlightXML2/wsdl', $options);
$query = "-latlon 36.897669 -79.03655 40.897669 -75.03655";
$result = $client->Search($query);
print_r($result);
?>
Here is one of the returned aircraft:
[faFlightID] => AAL1974-1343453138-airline-0306
[ident] => AAL1974
[prefix] =>
[type] => B738
[suffix] => Q
[origin] => KLAX
[destination] => KBNA
[timeout] => ok
[timestamp] => 1343680642
[departureTime] => 1343673540
[firstPositionTime] => 1343673600
[arrivalTime] => 0
[longitude] => -102.431999207
[latitude] => 38.188999176
[lowLongitude] => -118.599441528
[lowLatitude] => 33.8277778625
[highLongitude] => -102.431999207
[highLatitude] => 38.426109314
[groundspeed] => 473
[altitude] => 350
[heading] => 95
[altitudeStatus] =>
[updateType] => TA
[altitudeChange] =>
The Longitude is -102.431999207, which is not in my search box
When I switch it to find flights with an origin of KMIA/Miami, FL:
<?php
$options = array(
'trace' => true,
'exceptions' => 0,
'login' => 'XXX',
'password' => 'XXX',
);
$client = new SoapClient('http://flightxml.flightaware.com/soap/FlightXML2/wsdl', $options);
$query = "-origin KMIA";
$result = $client->Search($query);
print_r($result);
?>
I get:
[faFlightID] => DAL82-1343453196-airline-0268
[ident] => DAL82
[prefix] =>
[type] => B752
[suffix] => Q
[origin] => KLAX
[destination] => KJFK
[timeout] => ok
[timestamp] => 1343680942
[departureTime] => 1343664901
[firstPositionTime] => 1343664901
[arrivalTime] => 0
[longitude] => -74.1166000366
[latitude] => 40.904800415
[lowLongitude] => -118.57611084
[lowLatitude] => 33.8294448853
[highLongitude] => -74.1166000366
[highLatitude] => 42.6163902283
[groundspeed] => 356
[altitude] => 190
[heading] => 115
[altitudeStatus] =>
[updateType] => TA
[altitudeChange] =>
No other flights have KMIA as the origin.
Am I doing something wrong?
Thanks