13 Rhumb rhumb(Constants::WGS84_a(), Constants::WGS84_f());
17 double lat1 = 40.6, lon1 = -73.8, s12 = 5.5e6, azi12 = 51;
19 rhumb.
Direct(lat1, lon1, azi12, s12, lat2, lon2);
20 cout << lat2 <<
" " << lon2 <<
"\n";
25 lat1 = 40.6, lon1 = -73.8,
26 lat2 = 51.6, lon2 = -0.5;
28 rhumb.
Inverse(lat1, lon1, lat2, lon2, s12, azi12);
29 cout << s12 <<
" " << azi12 <<
"\n";
32 catch (
const exception&
e) {
33 cerr <<
"Caught exception: " << e.what() <<
"\n";
void Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi12, real &S12) const
Header for GeographicLib::Rhumb and GeographicLib::RhumbLine classes.
Namespace for GeographicLib.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Header for GeographicLib::Constants class.
Solve of the direct and inverse rhumb problems.
void Direct(real lat1, real lon1, real azi12, real s12, real &lat2, real &lon2, real &S12) const