albar965 / littlenavmap

Little Navmap is a free flight planner, navigation tool, moving map, airport search and airport information system for Flight Simulator X, Microsoft Flight Simulator 2020, Prepar3D and X-Plane.
https://albar965.github.io/littlenavmap.html
GNU General Public License v3.0
1.28k stars 164 forks source link

[minor edge case] airport search within radius incomplete around 180ºE/W #1184

Closed niobos closed 1 month ago

niobos commented 1 month ago

Hi,

First of all, thank you for your effort and time you put into this wonderful project. I really appreciate it.

I think I discovered a bug in the airport search when searching for airports within a certain distance of a center point when near the 180ºE/W meridian.

Steps to reproduce (LittleNavMap 3.0.9 on macOS):

  1. Go to Alaska, and locate the airports PASY and PADK.
  2. A flight between them is correctly calculated as 343NM.
  3. Now search for airports within a distance of 500NM, Any direction.
  4. "Set Center for Distance Search" near PADK. Notice that PADK is found, but PASY is not, even though it's only 343NM away.
  5. Place the search cursor near PASY. Notice that PASY is found, but PADK is not.

It seems that the distance search is confused by crossing over the 180ºE/W meridian. Placing the search cursor on either side only finds the airport on that side.

I would like to stress that this is a minor bug with only very limited impact as it seems to only occur at the 180ºE/W meridian, which is very sparsely populated (both with people and airports)

albar965 commented 1 month ago

Thank you for the report. I can confirm this. The anti-meridian is always problematic and I already fixed numerous bugs around it. Will fix for 3.0.10.

image

albar965 commented 1 month ago

Fixed in a base function which means this potentially affected more functionality around the antimeridian.

niobos commented 1 month ago

Wow, that was fast! Thank you for the fix! I'm looking forward for the 3.0.10 release.