MagneticModel.hpp
Go to the documentation of this file.
1 
10 #if !defined(GEOGRAPHICLIB_MAGNETICMODEL_HPP)
11 #define GEOGRAPHICLIB_MAGNETICMODEL_HPP 1
12 
16 
17 #if defined(_MSC_VER)
18 // Squelch warnings about dll vs vector
19 # pragma warning (push)
20 # pragma warning (disable: 4251)
21 #endif
22 
23 namespace GeographicLib {
24 
25  class MagneticCircle;
26 
70  private:
71  typedef Math::real real;
72  static const int idlength_ = 8;
73  std::string _name, _dir, _description, _date, _filename, _id;
74  real _t0, _dt0, _tmin, _tmax, _a, _hmin, _hmax;
75  int _Nmodels, _Nconstants;
78  std::vector< std::vector<real> > _G;
79  std::vector< std::vector<real> > _H;
80  std::vector<SphericalHarmonic> _harm;
81  void Field(real t, real lat, real lon, real h, bool diffp,
82  real& Bx, real& By, real& Bz,
83  real& Bxt, real& Byt, real& Bzt) const;
84  void ReadMetadata(const std::string& name);
85  MagneticModel(const MagneticModel&); // copy constructor not allowed
86  MagneticModel& operator=(const MagneticModel&); // nor copy assignment
87  public:
88 
91 
119  explicit MagneticModel(const std::string& name,
120  const std::string& path = "",
121  const Geocentric& earth = Geocentric::WGS84());
123 
126 
141  real& Bx, real& By, real& Bz) const {
142  real dummy;
143  Field(t, lat, lon, h, false, Bx, By, Bz, dummy, dummy, dummy);
144  }
145 
164  real& Bx, real& By, real& Bz,
165  real& Bxt, real& Byt, real& Bzt) const {
166  Field(t, lat, lon, h, true, Bx, By, Bz, Bxt, Byt, Bzt);
167  }
168 
187  MagneticCircle Circle(real t, real lat, real h) const;
188 
202  static void FieldComponents(real Bx, real By, real Bz,
203  real& H, real& F, real& D, real& I) {
204  real Ht, Ft, Dt, It;
205  FieldComponents(Bx, By, Bz, real(0), real(1), real(0),
206  H, F, D, I, Ht, Ft, Dt, It);
207  }
208 
230  static void FieldComponents(real Bx, real By, real Bz,
231  real Bxt, real Byt, real Bzt,
232  real& H, real& F, real& D, real& I,
233  real& Ht, real& Ft, real& Dt, real& It);
235 
238 
243  const std::string& Description() const { return _description; }
244 
249  const std::string& DateTime() const { return _date; }
250 
254  const std::string& MagneticFile() const { return _filename; }
255 
260  const std::string& MagneticModelName() const { return _name; }
261 
265  const std::string& MagneticModelDirectory() const { return _dir; }
266 
276  Math::real MinHeight() const { return _hmin; }
277 
287  Math::real MaxHeight() const { return _hmax; }
288 
298  Math::real MinTime() const { return _tmin; }
299 
309  Math::real MaxTime() const { return _tmax; }
310 
316  Math::real MajorRadius() const { return _earth.MajorRadius(); }
317 
322  Math::real Flattening() const { return _earth.Flattening(); }
324 
335  static std::string DefaultMagneticPath();
336 
346  static std::string DefaultMagneticName();
347  };
348 
349 } // namespace GeographicLib
350 
351 #if defined(_MSC_VER)
352 # pragma warning (pop)
353 #endif
354 
355 #endif // GEOGRAPHICLIB_MAGNETICMODEL_HPP
GeographicLib::MagneticModel::DateTime
const std::string & DateTime() const
Definition: MagneticModel.hpp:249
GeographicLib::MagneticModel::MinTime
Math::real MinTime() const
Definition: MagneticModel.hpp:298
H
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
Definition: gnuplot_common_settings.hh:74
GeographicLib::MagneticModel::_name
std::string _name
Definition: MagneticModel.hpp:73
GeographicLib::Geocentric::MajorRadius
Math::real MajorRadius() const
Definition: Geocentric.hpp:247
name
Annotation for function names.
Definition: attr.h:51
D
MatrixXcd D
Definition: EigenSolver_EigenSolver_MatrixType.cpp:14
GeographicLib::MagneticModel::_G
std::vector< std::vector< real > > _G
Definition: MagneticModel.hpp:78
GeographicLib
Namespace for GeographicLib.
Definition: JacobiConformal.hpp:15
GeographicLib::MagneticModel::_H
std::vector< std::vector< real > > _H
Definition: MagneticModel.hpp:79
GeographicLib::MagneticModel::operator()
void operator()(real t, real lat, real lon, real h, real &Bx, real &By, real &Bz, real &Bxt, real &Byt, real &Bzt) const
Definition: MagneticModel.hpp:163
GeographicLib::MagneticModel
Model of the earth's magnetic field.
Definition: MagneticModel.hpp:69
GeographicLib::MagneticModel::MaxTime
Math::real MaxTime() const
Definition: MagneticModel.hpp:309
real
float real
Definition: datatypes.h:10
GeographicLib::MagneticModel::MagneticModelDirectory
const std::string & MagneticModelDirectory() const
Definition: MagneticModel.hpp:265
GEOGRAPHICLIB_EXPORT
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:91
h
const double h
Definition: testSimpleHelicopter.cpp:19
GeographicLib::MagneticModel::Description
const std::string & Description() const
Definition: MagneticModel.hpp:243
GeographicLib::SphericalHarmonic::normalization
normalization
Definition: SphericalHarmonic.hpp:74
pybind_wrapper_test_script.dummy
dummy
Definition: pybind_wrapper_test_script.py:42
GeographicLib::Geocentric
Geocentric coordinates
Definition: Geocentric.hpp:67
GeographicLib::Math::real
double real
Definition: Math.hpp:129
GeographicLib::MagneticModel::_tmin
real _tmin
Definition: MagneticModel.hpp:74
GeographicLib::MagneticModel::real
Math::real real
Definition: MagneticModel.hpp:71
GeographicLib::MagneticModel::_earth
Geocentric _earth
Definition: MagneticModel.hpp:77
GeographicLib::MagneticModel::_Nmodels
int _Nmodels
Definition: MagneticModel.hpp:75
Geocentric.hpp
Header for GeographicLib::Geocentric class.
I
#define I
Definition: main.h:112
GeographicLib::MagneticModel::MagneticModelName
const std::string & MagneticModelName() const
Definition: MagneticModel.hpp:260
GeographicLib::MagneticModel::Flattening
Math::real Flattening() const
Definition: MagneticModel.hpp:322
GeographicLib::MagneticModel::MaxHeight
Math::real MaxHeight() const
Definition: MagneticModel.hpp:287
GeographicLib::MagneticModel::FieldComponents
static void FieldComponents(real Bx, real By, real Bz, real &H, real &F, real &D, real &I)
Definition: MagneticModel.hpp:202
Constants.hpp
Header for GeographicLib::Constants class.
gtsam::symbol_shorthand::F
Key F(std::uint64_t j)
Definition: inference/Symbol.h:153
GeographicLib::MagneticModel::operator()
void operator()(real t, real lat, real lon, real h, real &Bx, real &By, real &Bz) const
Definition: MagneticModel.hpp:140
GeographicLib::MagneticModel::MagneticFile
const std::string & MagneticFile() const
Definition: MagneticModel.hpp:254
matlab_wrap.path
path
Definition: matlab_wrap.py:66
GeographicLib::Geocentric::Flattening
Math::real Flattening() const
Definition: Geocentric.hpp:254
GeographicLib::MagneticModel::_norm
SphericalHarmonic::normalization _norm
Definition: MagneticModel.hpp:76
GeographicLib::MagneticModel::MinHeight
Math::real MinHeight() const
Definition: MagneticModel.hpp:276
GeographicLib::MagneticModel::_harm
std::vector< SphericalHarmonic > _harm
Definition: MagneticModel.hpp:80
lon
static const double lon
Definition: testGeographicLib.cpp:34
GeographicLib::MagneticModel::MajorRadius
Math::real MajorRadius() const
Definition: MagneticModel.hpp:316
align_3::t
Point2 t(10, 10)
GeographicLib::Geocentric::WGS84
static const Geocentric & WGS84()
Definition: src/Geocentric.cpp:31
real
Definition: main.h:100
GeographicLib::MagneticCircle
Geomagnetic field on a circle of latitude.
Definition: MagneticCircle.hpp:37
SphericalHarmonic.hpp
Header for GeographicLib::SphericalHarmonic class.
lat
static const double lat
Definition: testGeographicLib.cpp:34


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:44