JacobiConformal.cpp
Go to the documentation of this file.
1 // Example of using the GeographicLib::JacobiConformal class.
2 
3 #include <iostream>
4 #include <iomanip>
5 #include <exception>
7 #include "JacobiConformal.hpp"
8 
9 using namespace std;
10 using namespace GeographicLib;
11 
12 int main() {
13  try {
14  Utility::set_digits();
15  // These parameters were derived from the EGM2008 geoid; see 2011-07-04
16  // E-mail to PROJ.4 list, "Analyzing the bumps in the EGM2008 geoid". The
17  // longitude of the major axis is -15. These are close to the values given
18  // by Milan Bursa, Vladimira Fialova, "Parameters of the Earth's tri-axial
19  // level ellipsoid", Studia Geophysica et Geodaetica 37(1), 1-13 (1993):
20  //
21  // longitude of major axis = -14.93 +/- 0.05
22  // a = 6378171.36 +/- 0.30
23  // a/(a-c) = 297.7738 +/- 0.0003
24  // a/(a-b) = 91449 +/- 60
25  // which gives: a = 6378171.36, b = 6378101.61, c = 6356751.84
26  Math::real a = 6378137+35, b = 6378137-35, c = 6356752;
27  JacobiConformal jc(a, b, c, a-b, b-c);
28  cout << fixed << setprecision(1)
29  << "Ellipsoid parameters: a = "
30  << a << ", b = " << b << ", c = " << c << "\n"
31  << setprecision(10)
32  << "Quadrants: x = " << jc.x() << ", y = " << jc.y() << "\n";
33  cout << "Coordinates (angle x y) in degrees:\n";
34  for (int i = 0; i <= 90; i += 5) {
35  Math::real omg = i, bet = i;
36  cout << i << " " << jc.x(omg) << " " << jc.y(bet) << "\n";
37  }
38  }
39  catch (const exception& e) {
40  cerr << "Caught exception: " << e.what() << "\n";
41  return 1;
42  }
43 }
Scalar * b
Definition: benchVecAdd.cpp:17
Header for GeographicLib::Utility class.
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
Definition: Half.h:150
Array33i a
Namespace for GeographicLib.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Jacobi&#39;s conformal projection of a triaxial ellipsoid.
int main()
Header for GeographicLib::JacobiConformal class.


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:23