GeographicLib  1.37
GravityCircle.cpp
Go to the documentation of this file.
1 /**
2  * \file GravityCircle.cpp
3  * \brief Implementation for GeographicLib::GravityCircle class
4  *
5  * Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed under
6  * the MIT/X11 License. For more information, see
7  * http://geographiclib.sourceforge.net/
8  **********************************************************************/
9 
11 #include <fstream>
12 #include <sstream>
14 
15 namespace GeographicLib {
16 
17  using namespace std;
18 
19  Math::real GravityCircle::Gravity(real lon, real& gx, real& gy, real& gz)
20  const {
21  real clam, slam, M[Geocentric::dim2_];
22  CircularEngine::cossin(lon, clam, slam);
23  real Wres = W(clam, slam, gx, gy, gz);
24  Geocentric::Rotation(_sphi, _cphi, slam, clam, M);
25  Geocentric::Unrotate(M, gx, gy, gz, gx, gy, gz);
26  return Wres;
27  }
28