examples/example-Geodesic-small.cpp
Go to the documentation of this file.
1 // Small example of using the GeographicLib::Geodesic class
2 
3 #include <iostream>
5 
6 using namespace std;
7 using namespace GeographicLib;
8 
9 int main() {
10  const Geodesic& geod = Geodesic::WGS84();
11  // Distance from JFK to LHR
12  double
13  lat1 = 40.6, lon1 = -73.8, // JFK Airport
14  lat2 = 51.6, lon2 = -0.5; // LHR Airport
15  double s12;
16  geod.Inverse(lat1, lon1, lat2, lon2, s12);
17  cout << s12 / 1000 << " km\n";
18 }
Definition: BFloat16.h:88
Header for GeographicLib::Geodesic class.
Namespace for GeographicLib.
Geodesic calculations
Definition: Geodesic.hpp:172
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Definition: Geodesic.hpp:674


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:12