Lat/Long Format for Search Procedure

Hello, I am working on a project for school where I’m trying to retrieve flights within a given distance of a lat/lon. I’m trying to use the Search function with the -latlong key, but I keep getting the following error:


list must have an even number of elements

I have tried every possible format I can think of to define the lat/lon box, but always the same error. I have successfully tested every other input that I’ve tried (destination, etc.).

Can anyone give me an example of the proper format?

Thanks,
John McDowall

I do not believe that is possible. FlightAware tracks flights by airports, type of aircraft, operator, and tail number. If you can find your nearest airport then I will help you with this, but there isn’t a way to track them like that. Hope that helped.

Holton :smiley:

I’m also trying to use this search/query

It certainly says in the documentation that querying by Lat/Long box should be possible.

Search searches data on all airborne aircraft to find ones matching the search query. Query parameters include a latitude/longitude box, aircraft ident with wildcards, type with wildcards, prefix, suffix, origin airport, destination airport, origin or destination airport, groundspeed, and altitude. It takes search terms in a single string comprising “-key value” pairs and returns an array of flight structures."

I get the same error about the need for an even number of elements.

I’m going to play around with some query strings to try and guess the proper format. But some documentation help from a staff member would be helpful also.

Eric

You are supposed to be able to do lat/long searchbox queries of currently in-air aircraft, but not of historical data.

It’s probably a bug and we’re looking into it.

Try this for the search terms:

-latlong "28.98 -96.34 30.98 -94.34"

Thanks for the response, works fine.

Just a little tip if any one needs it, be sure to use escape characters for “string within a string.”

in c#

InFlightStruct r = df.Search(“-latlong "28.98 -96.34 30.98 -94.34"”, 15, 0);

eric