examples/example-Ellipsoid.cpp
Go to the documentation of this file.
1 // Example of using the GeographicLib::Ellipsoid class
2 
3 #include <iostream>
4 #include <exception>
6 
7 using namespace std;
8 using namespace GeographicLib;
9 
10 int main() {
11  try {
12  Ellipsoid wgs84(Constants::WGS84_a(), Constants::WGS84_f());
13  // Alternatively: const Ellipsoid& wgs84 = Ellipsoid::WGS84();
14  cout << "The latitude half way between the equator and the pole is "
15  << wgs84.InverseRectifyingLatitude(45) << "\n";
16  cout << "Half the area of the ellipsoid lies between latitudes +/- "
17  << wgs84.InverseAuthalicLatitude(30) << "\n";
18  cout << "The northernmost edge of a square Mercator map is at latitude "
19  << wgs84.InverseIsometricLatitude(180) << "\n";
20  }
21  catch (const exception& e) {
22  cerr << "Caught exception: " << e.what() << "\n";
23  return 1;
24  }
25 }
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
GeographicLib
Namespace for GeographicLib.
Definition: JacobiConformal.hpp:15
main
int main()
Definition: examples/example-Ellipsoid.cpp:10
GeographicLib::Ellipsoid::InverseRectifyingLatitude
Math::real InverseRectifyingLatitude(real mu) const
Definition: src/Ellipsoid.cpp:65
Ellipsoid.hpp
Header for GeographicLib::Ellipsoid class.
GeographicLib::Ellipsoid::InverseIsometricLatitude
Math::real InverseIsometricLatitude(real psi) const
Definition: src/Ellipsoid.cpp:88
std
Definition: BFloat16.h:88
GeographicLib::Ellipsoid::InverseAuthalicLatitude
Math::real InverseAuthalicLatitude(real xi) const
Definition: src/Ellipsoid.cpp:75
GeographicLib::Ellipsoid
Properties of an ellipsoid.
Definition: Ellipsoid.hpp:39


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:16