I want to use this formula $(x−x_0)^2+(y−y_0)^2=R^2$ to determine if $(x, y)$ point is within circle with center $(x_0, y_0)$ and radius $R$.
But, in what units is $R$ specified, if coordinates are a decimal geo-coords (latitude, longitude)? And how can I convert radius to miles or kilometers and vice-versa?
Thank you!
Ok, including all valuable mentions in comments I went to solution. We can use this formula to determine distance between two points specified by lat-lon coordinates:
$d = \arccos\bigl(\sin lat_x * \sin lat_0 + \cos lat_x * \cos lat_0 * cos(lon_x - lon_0)\bigr)$
where $(lat_x, lon_x)$ is an aircraft coords in radians, and $(lat_0, lon_0)$ - airport coordinates in radians, $d$ - distance in radians.
To convert decimal coordinates to radians we need to do next:
$r = \frac{dec * \pi}{180}$,
where $r$ - lat or lon in radians, $dec$ - decimal value of lat or lon.
After that we can convert distance in radians into nautical miles (nm):
$d_{nm}= \frac{180*60*d}{\pi}$
or into kilometers:
$d_{km} = FAI * d$,
where FAI is equal to 6371 km (if we assume that earth is a perfect sphere).