Commit e959cf9ce45a2077351b1a94ef2e51d9580be667
1 parent
dbf061ca
Exists in
master
and in
80 other branches
extention libraire 1945-2000
Showing
1 changed file
with
18 additions
and
0 deletions
Show diff stats
src/ExternLib/Maglib/Posmag.hh
... | ... | @@ -75,6 +75,8 @@ namespace AMDA { |
75 | 75 | double rrmag = std::sqrt(in[0]*in[0]+in[1]*in[1]+in[2]*in[2]); |
76 | 76 | double thetr = std::acos(in[3]/rrmag); |
77 | 77 | double phir = std::atan2(in[1] , in[0]); |
78 | + | |
79 | + | |
78 | 80 | /* |
79 | 81 | PAR magout (I) : type de champ magnetique externe |
80 | 82 | |
... | ... | @@ -139,11 +141,27 @@ namespace AMDA { |
139 | 141 | double tgl = 1.0; |
140 | 142 | int ifail=10; |
141 | 143 | |
144 | + | |
142 | 145 | maglib::maglibWarpper::getPosmag(1900 + tmp->tm_year, 1 + tmp->tm_mon, tmp->tm_mday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec, |
143 | 146 | rrmag, thetr, phir, |
144 | 147 | _isatex, _magout, |
145 | 148 | tgl, flg, xlamb,ifail); |
146 | 149 | |
150 | + | |
151 | + // test results shud be as | |
152 | + /** | |
153 | + const double PI =3.141592653589793238463; | |
154 | + rrmag = 7.0; thetr=30*PI/180.0; phir=25*PI/180; | |
155 | + maglib::maglibWarpper::getPosmag(2017,02,15,11,30,0, | |
156 | + rrmag, thetr, phir, | |
157 | + _isatex, _magout, | |
158 | + tgl, flg, xlamb,ifail); | |
159 | + * expected results | |
160 | + * tgl 14.08 | |
161 | + flg 18.76 | |
162 | + xlamb 76.65 | |
163 | + tglc 15.24 | |
164 | + */ | |
147 | 165 | DataType tgl_res = tgl; |
148 | 166 | DataType xlamb_res = (DataType) xlamb*180/ (2*std::asin(1.0)); |
149 | 167 | DataType flg_res = (DataType) flg; | ... | ... |