diff --git a/src/ExternLib/Maglib/Posmag.hh b/src/ExternLib/Maglib/Posmag.hh index da87425..bf5b571 100644 --- a/src/ExternLib/Maglib/Posmag.hh +++ b/src/ExternLib/Maglib/Posmag.hh @@ -75,6 +75,8 @@ namespace AMDA { double rrmag = std::sqrt(in[0]*in[0]+in[1]*in[1]+in[2]*in[2]); double thetr = std::acos(in[3]/rrmag); double phir = std::atan2(in[1] , in[0]); + + /* PAR magout (I) : type de champ magnetique externe @@ -139,11 +141,27 @@ namespace AMDA { double tgl = 1.0; int ifail=10; + maglib::maglibWarpper::getPosmag(1900 + tmp->tm_year, 1 + tmp->tm_mon, tmp->tm_mday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec, rrmag, thetr, phir, _isatex, _magout, tgl, flg, xlamb,ifail); + + // test results shud be as + /** + const double PI =3.141592653589793238463; + rrmag = 7.0; thetr=30*PI/180.0; phir=25*PI/180; + maglib::maglibWarpper::getPosmag(2017,02,15,11,30,0, + rrmag, thetr, phir, + _isatex, _magout, + tgl, flg, xlamb,ifail); + * expected results + * tgl 14.08 + flg 18.76 + xlamb 76.65 + tglc 15.24 + */ DataType tgl_res = tgl; DataType xlamb_res = (DataType) xlamb*180/ (2*std::asin(1.0)); DataType flg_res = (DataType) flg; -- libgit2 0.21.2