Commit 171af14a2e56109f5dd746cd4d9b2c314da2d931

Authored by Elena.Budnik
1 parent d7f15348

correct input for Jop model

src/ExternLib/Jupiter_JRM09_CAN_81/Jupiter_JRM09_CAN81.hh
... ... @@ -69,10 +69,15 @@ namespace AMDA {
69 69 if (lVal[0] == 0)
70 70 lVal[0] = 1e-31;
71 71 //
72   - lVal[1] = 180 - std::acos(in[2] / lVal[0])*180 / PI;
  72 + lVal[1] = std::acos(in[2] / lVal[0])*180 / PI;
73 73 //
74 74  
75   - lVal[2] = std::atan(in[1] / in[0])*180 / PI;
  75 + lVal[2] = std::atan2(in[1] , in[0])*180 / PI;
  76 +// if (in[0] < 0)
  77 +// lVal[2] += 180.0;
  78 + if (lVal[2] < 0)
  79 + lVal[2] += 360.0;
  80 +
76 81 double crtTime = _paramInput.getTime(_index);
77 82  
78 83 vector<DataType> outputBrtp;
... ...
src/ExternLib/Jupiter_JRM09_CAN_81/Jupiter_JRM09_CAN81_tools.hh
... ... @@ -152,10 +152,8 @@ namespace AMDA {
152 152 x = 1e-31;
153 153 if(r==0)
154 154 r = 1e-31;
155   - T theta = acos(z / r)*180.0 / PI;
156   - T phi = atan(y / x)*180.0 / PI;
157   - if (x < 0)
158   - phi += 180.0;
  155 + T theta = acos(z / r)*180.0 / PI ;
  156 + T phi = atan2(y , x)*180.0 / PI ;
159 157 if (phi < 0)
160 158 phi += 360.0;
161 159 vector<T> result{r, theta, phi};
... ...