10 #if !defined(GEOGRAPHICLIB_CIRCULARENGINE_HPP)
11 #define GEOGRAPHICLIB_CIRCULARENGINE_HPP 1
19 # pragma warning (push)
20 # pragma warning (disable: 4251)
23 namespace GeographicLib {
63 std::vector<real> _wc, _ws, _wrc, _wrs, _wtc, _wts;
67 real& gradx, real& grady, real& gradz)
const throw();
69 static inline void cossin(real x, real& cosx, real& sinx) {
70 x = x >= 180 ? x - 360 : (x < -180 ? x + 360 : x);
71 real xi = x * Math::degree<real>();
72 cosx = std::abs(x) == 90 ? 0 : cos(xi);
73 sinx = x == -180 ? 0 : sin(xi);
80 real a, real r, real u, real t)
88 , _wc(std::vector<real>(_M + 1, 0))
89 , _ws(std::vector<real>(_M + 1, 0))
90 , _wrc(std::vector<real>(_gradp ? _M + 1 : 0, 0))
91 , _wrs(std::vector<real>(_gradp ? _M + 1 : 0, 0))
92 , _wtc(std::vector<real>(_gradp ? _M + 1 : 0, 0))
93 , _wts(std::vector<real>(_gradp ? _M + 1 : 0, 0))
100 void SetCoeff(
int m,
real wc,
real ws)
101 { _wc[m] = wc; _ws[m] = ws; }
103 void SetCoeff(
int m,
real wc,
real ws,
105 _wc[m] = wc; _ws[m] = ws;
107 _wrc[m] = wrc; _wrs[m] = wrs;
108 _wtc[m] = wtc; _wts[m] = wts;
139 return Value(
false, coslon, sinlon, dummy, dummy, dummy);
150 cossin(lon, coslon, sinlon);
151 return (*
this)(coslon, sinlon);
172 real& gradx, real& grady, real& gradz)
const throw() {
173 return Value(
true, coslon, sinlon, gradx, grady, gradz);
191 real& gradx, real& grady, real& gradz)
const throw() {
193 cossin(lon, coslon, sinlon);
194 return (*
this)(coslon, sinlon, gradx, grady, gradz);
200 #if defined(_MSC_VER)
201 # pragma warning (pop)
204 #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
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.