Merge branch 'develop' of https://git.hofmannnet.myhome-server.de/GermanAirlines/GermanAirlinesVA-GAConnector into develop
This commit is contained in:
@@ -77,6 +77,19 @@ namespace geodata
|
||||
return 2.0 * EARTH_M * asin(sqrt(u * u + cos(lat1r) * cos(lat2r) * v * v));
|
||||
}
|
||||
|
||||
// Input in degrees, Output in metres
|
||||
static inline double distanceEarthP(point from, point to)
|
||||
{
|
||||
double lat1r, lon1r, lat2r, lon2r, u, v;
|
||||
lat1r = toRadians(from.latitude);
|
||||
lon1r = toRadians(from.longitude);
|
||||
lat2r = toRadians(to.latitude);
|
||||
lon2r = toRadians(to.longitude);
|
||||
u = sin((lat2r - lat1r) / 2);
|
||||
v = sin((lon2r - lon1r) / 2);
|
||||
return 2.0 * EARTH_M * asin(sqrt(u * u + cos(lat1r) * cos(lat2r) * v * v));
|
||||
}
|
||||
|
||||
// Input and Output in degrees
|
||||
static inline struct point calculatePointDD(struct point coordinates,
|
||||
double bearing,
|
||||
|
||||
Reference in New Issue
Block a user