openskynetwork / opensky-api

Python and Java bindings for the OpenSky Network REST API
GNU General Public License v3.0
345 stars 126 forks source link

Incorrect behavior across +-180 longitude. #22

Open dhyams opened 4 years ago

dhyams commented 4 years ago

The API doesn't seem to behave correctly when the bounding box given crosses the +-180 degree longitude line. For example, if I call the OpenSky API with the following bounding box (reminder: bounding box is latmin, latmax, lonmin, lonmax)

[14.55, 80.0, -179.9, -120.8]

it found (at the moment) 157 planes in that box. If I slightly modify the box to

[14.55, 80.0, +179.9, -120.8]

I get zero planes, when the bounding box has been in reality enlarged very slightly on the western side.

If I reverse the two longitude numbers, I do indeed get a result, but it wraps around the earth the wrong way.