Distance and Bearing
It is very important in aviation to have knowledge of the nearby Airports at any time in flight.
You are encouraged to solve this task according to the task description, using any language you may know.
- Task
Determine the distance and bearing from an Airplane to the 20 nearest Airports whenever requested. Use the non-commercial data from openflights.org airports.dat as reference.
A Request comes from an airplane at position ( latitude, longitude ): ( 51.514669, 2.198581 ).
Your Report should contain the following information from table airports.dat (column shown in brackets):
Name(2), Country(4), ICAO(6), Distance and Bearing calculated from Latitude(7) and Longitude(8).
Distance is measured in nautical miles (NM). Resolution is 0.1 NM.
Bearing is measured in degrees (°). 0° = 360° = north then clockwise 90° = east, 180° = south, 270° = west. Resolution is 1°.
- See
-
- openflights.org/data: Airport, airline and route data
- Movable Type Scripts: Calculate distance, bearing and more between Latitude/Longitude points