X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmagvar%2Fcoremag.cxx;h=e6d42c1d1a5bf45341a2b476c19ea31ee9913337;hb=4e46bb667179cd45cfb2f9934734ceddd1ea01b4;hp=e7b868d3ea578f9f6c02c292910320e936f2b395;hpb=7c410d36e346956511918224ad078151ef1cb8c9;p=simgear.git diff --git a/simgear/magvar/coremag.cxx b/simgear/magvar/coremag.cxx index e7b868d3..e6d42c1d 100644 --- a/simgear/magvar/coremag.cxx +++ b/simgear/magvar/coremag.cxx @@ -86,8 +86,6 @@ #include "coremag.hxx" - -static const double pi = 3.14159265358979; static const double a = 6378.137; /* semi-major axis (equatorial radius) of WGS84 ellipsoid */ static const double b = 6356.7523142; /* semi-minor axis referenced to the WGS84 ellipsoid */ static const double r_0 = 6371.2; /* standard Earth magnetic reference radius */ @@ -325,7 +323,7 @@ double calc_magvar( double lat, double lon, double h, long dat, double* field ) } /* Find geodetic field components: */ - psi = theta - ((pi / 2.0) - lat); + psi = theta - ((M_PI / 2.0) - lat); sinpsi = sin(psi); cospsi = cos(psi); X = -B_theta * cospsi - B_r * sinpsi;