New SGGeodesy::advance, taking degrees

This commit is contained in:
James Turner 2020-05-30 16:27:42 +01:00
parent 11cf87951c
commit 01ab3b2385
2 changed files with 10 additions and 0 deletions

View File

@ -537,6 +537,13 @@ SGGeodesy::advanceRadM(const SGGeoc& geoc, double course, double distance,
}
}
SGGeoc SGGeodesy::advanceDegM(const SGGeoc &geoc, double course,
double distance) {
SGGeoc result;
advanceRadM(geoc, course * SG_DEGREES_TO_RADIANS, distance, result);
return result;
}
double
SGGeodesy::courseRad(const SGGeoc& from, const SGGeoc& to)
{

View File

@ -65,6 +65,9 @@ public:
// Geocentric course/distance computation
static void advanceRadM(const SGGeoc& geoc, double course, double distance,
SGGeoc& result);
static SGGeoc advanceDegM(const SGGeoc &geoc, double course, double distance);
static double courseRad(const SGGeoc& from, const SGGeoc& to);
static double distanceRad(const SGGeoc& from, const SGGeoc& to);
static double distanceM(const SGGeoc& from, const SGGeoc& to);