10 #if !defined(GEOGRAPHICLIB_CIRCULARENGINE_HPP)
11 #define GEOGRAPHICLIB_CIRCULARENGINE_HPP 1
19 # pragma warning (push)
20 # pragma warning (disable: 4251)
63 std::vector<real> _wc, _ws, _wrc, _wrs, _wtc, _wts;
67 real& gradx, real& grady, real& gradz)
const;
69 static inline void cossin(real x, real& cosx, real& sinx) {
70 using std::abs;
using std::cos;
using std::sin;
71 x = x >= 180 ? x - 360 : (x < -180 ? x + 360 : x);
73 cosx = abs(x) == 90 ? 0 : cos(xi);
74 sinx = x == -180 ? 0 : sin(xi);
81 real a, real r, real u, real t)
89 , _wc(
std::vector<real>(_M + 1, 0))
90 , _ws(
std::vector<real>(_M + 1, 0))
91 , _wrc(
std::vector<real>(_gradp ? _M + 1 : 0, 0))
92 , _wrs(
std::vector<real>(_gradp ? _M + 1 : 0, 0))
93 , _wtc(
std::vector<real>(_gradp ? _M + 1 : 0, 0))
94 , _wts(
std::vector<real>(_gradp ? _M + 1 : 0, 0))
101 void SetCoeff(
int m, real wc, real ws)
102 { _wc[m] = wc; _ws[m] = ws; }
104 void SetCoeff(
int m, real wc, real ws,
105 real wrc, real wrs, real wtc, real wts) {
106 _wc[m] = wc; _ws[m] = ws;
108 _wrc[m] = wrc; _wrs[m] = wrs;
109 _wtc[m] = wtc; _wts[m] = wts;
140 return Value(
false, coslon, sinlon, dummy, dummy, dummy);
151 cossin(lon, coslon, sinlon);
152 return (*
this)(coslon, sinlon);
173 real& gradx, real& grady, real& gradz)
const {
174 return Value(
true, coslon, sinlon, gradx, grady, gradz);
192 real& gradx, real& grady, real& gradz)
const {
194 cossin(lon, coslon, sinlon);
195 return (*
this)(coslon, sinlon, gradx, grady, gradz);
201 #if defined(_MSC_VER)
202 # pragma warning (pop)
205 #endif // GEOGRAPHICLIB_CIRCULARENGINE_HPP
#define GEOGRAPHICLIB_EXPORT
The evaluation engine for SphericalHarmonic.
Math::real operator()(real lon) const
GeographicLib::Math::real real
Geomagnetic field on a circle of latitude.
Math::real operator()(real lon, real &gradx, real &grady, real &gradz) const
Math::real operator()(real coslon, real sinlon, real &gradx, real &grady, real &gradz) const
Namespace for GeographicLib.
Spherical harmonic sums for a circle.
Math::real operator()(real coslon, real sinlon) const
Header for GeographicLib::Constants class.
Header for GeographicLib::SphericalEngine class.
Gravity on a circle of latitude.