fpw / avitab

X-Plane plugin that displays a tablet to aid VR usage
GNU Affero General Public License v3.0
300 stars 59 forks source link

Refactoring and defect fix relating to NAV data and user fix loading #187

Closed mjh65 closed 9 months ago

mjh65 commented 10 months ago

Fix a small defect causing duplication and wasted memory when loading user fixes. All existing airports and fixes were re-added to the fast lookup maps, indexed by integer long,lat areas. This update stops those entries being duplicated. However user fixes can be reloaded several times (if the user decides to do this) and will still be duplicated. This is slightly wasteful, but acceptable. It could be fixed later if considered a problem.

Remove NAV data load cancelling responsibility from the World class. The World class provides an API for obtaining NAV data, it shouldn't be involved in control aspects of loading this data. This has been moved into the Manager class, and rename it as LoadManager which clarifies its purpose.

Move user fix loading into the load manager base class. This makes user fix loading independent of the source of the world NAV data so that it will be supported by the forthcoming variant of Avitab for Microsoft Flight Simulator.

Split this PR into 3 changes to help with review.

fpw commented 9 months ago

Thanks for reconsideration!