10 #if !defined(GEOGRAPHICLIB_MAGNETICMODEL_HPP)
11 #define GEOGRAPHICLIB_MAGNETICMODEL_HPP 1
19 # pragma warning (push)
20 # pragma warning (disable: 4251)
23 namespace GeographicLib {
63 static const int idlength_ = 8;
64 std::string _name, _dir, _description, _date, _filename, _id;
65 real _t0, _dt0, _tmin, _tmax, _a, _hmin, _hmax;
69 std::vector< std::vector<real> > _G;
70 std::vector< std::vector<real> > _H;
71 std::vector<SphericalHarmonic> _harm;
72 void Field(real t, real lat, real lon, real h,
bool diffp,
73 real& Bx, real& By, real& Bz,
74 real& Bxt, real& Byt, real& Bzt)
const;
75 void ReadMetadata(
const std::string& name);
111 const std::string& path =
"",
130 void operator()(real t, real lat, real lon, real h,
131 real& Bx, real& By, real& Bz)
const {
133 Field(t, lat, lon, h,
false, Bx, By, Bz, dummy, dummy, dummy);
152 void operator()(real t, real lat, real lon, real h,
153 real& Bx, real& By, real& Bz,
154 real& Bxt, real& Byt, real& Bzt)
const {
155 Field(t, lat, lon, h,
true, Bx, By, Bz, Bxt, Byt, Bzt);
191 static void FieldComponents(real Bx, real By, real Bz,
192 real& H, real& F, real& D, real& I) {
195 H, F, D, I, Ht, Ft, Dt, It);
238 const std::string&
DateTime()
const {
return _date; }
324 static std::string DefaultMagneticPath();
335 static std::string DefaultMagneticName();
340 #if defined(_MSC_VER)
341 # pragma warning (pop)
344 #endif // GEOGRAPHICLIB_MAGNETICMODEL_HPP