2 * fgcom - VoIP-Client for the FlightGear-Radio-Infrastructure
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 #ifndef __POSITION_H__
22 #define __POSITION_H__
24 /* Compute distance between two points. */
25 double distance (double lat1, double lon1, double lat2, double lon2);
27 /* Build the phone number based on the ICAO code and airport frequency. */
28 void icao2number (char *icao, float frequency, char *buf);
29 void icao2atisnumber (char *icao, float frequency, char *buf);
31 /* Search for the closest airport on selected frequency. */
33 icaobypos (struct airport *airports, double frequency, double plane_lat,
34 double plane_lon, double range);