19 void MagneticCircle::FieldGeocentric(
real slam,
real clam,
22 real BXc = 0, BYc = 0, BZc = 0;
23 _circ0(slam, clam, BX, BY, BZ);
24 _circ1(slam, clam, BXt, BYt, BZt);
26 _circ2(slam, clam, BXc, BYc, BZc);
28 BXt = (BXt - BX) / _dt0;
29 BYt = (BYt - BY) / _dt0;
30 BZt = (BZt - BZ) / _dt0;
32 BX += _t1 * BXt + BXc;
33 BY += _t1 * BYt + BYc;
34 BZ += _t1 * BZt + BZc;
45 void MagneticCircle::FieldGeocentric(real lon,
46 real& BX, real& BY, real& BZ,
47 real& BXt, real& BYt, real& BZt)
const {
50 FieldGeocentric(slam, clam, BX, BY, BZ, BXt, BYt, BZt);
53 void MagneticCircle::Field(
real lon,
bool diffp,
58 real M[Geocentric::dim2_];
59 Geocentric::Rotation(_sphi, _cphi, slam, clam, M);
60 real BX, BY, BZ, BXt, BYt, BZt;
61 FieldGeocentric(slam, clam, BX, BY, BZ, BXt, BYt, BZt);
63 Geocentric::Unrotate(M, BXt, BYt, BZt, Bxt, Byt, Bzt);
64 Geocentric::Unrotate(M, BX, BY, BZ, Bx, By, Bz);
Header for GeographicLib::Geocentric class.
GeographicLib::Math::real real
Header for GeographicLib::MagneticCircle class.
static void sincosd(T x, T &sinx, T &cosx)
Namespace for GeographicLib.