|
Lines 111-118
Link Here
|
| 111 |
double A2[9], B2[9], C2[9]; |
111 |
double A2[9], B2[9], C2[9]; |
| 112 |
double A3[9], B3[9], C3[9]; |
112 |
double A3[9], B3[9], C3[9]; |
| 113 |
double A4[9], B4[9], C4[9]; |
113 |
double A4[9], B4[9], C4[9]; |
| 114 |
double A5[9], B5[9], C5[9]; |
114 |
//double A5[9], B5[9], C5[9]; |
| 115 |
double A6[9], B6[9], C6[9]; |
115 |
//double A6[9], B6[9], C6[9]; |
| 116 |
|
116 |
|
| 117 |
Saturn->ecLong()->SinCos( sinJL, cosJL ); |
117 |
Saturn->ecLong()->SinCos( sinJL, cosJL ); |
| 118 |
Saturn->ecLat()->SinCos( sinJB, cosJB ); |
118 |
Saturn->ecLat()->SinCos( sinJB, cosJB ); |
|
Lines 153-181
Link Here
|
| 153 |
|
153 |
|
| 154 |
//Longitudes of the satellites' nodes on the equatorial plane of Jupiter |
154 |
//Longitudes of the satellites' nodes on the equatorial plane of Jupiter |
| 155 |
|
155 |
|
| 156 |
double W0 = MapTo0To360Range(5.095*(t3 - 1866.39)); |
156 |
//double W0 = MapTo0To360Range(5.095*(t3 - 1866.39)); |
| 157 |
double W0rad = MapTo0To360Range(5.095*(t3 - 1866.39))*dms::DegToRad; |
157 |
double W0rad = MapTo0To360Range(5.095*(t3 - 1866.39))*dms::DegToRad; |
| 158 |
|
158 |
|
| 159 |
double W1 = MapTo0To360Range(74.4- 32.39*t2); |
159 |
//double W1 = MapTo0To360Range(74.4- 32.39*t2); |
| 160 |
double W1rad = MapTo0To360Range(74.4- 32.39*t2)*dms::DegToRad; |
160 |
double W1rad = MapTo0To360Range(74.4- 32.39*t2)*dms::DegToRad; |
| 161 |
|
161 |
|
| 162 |
double W2 = MapTo0To360Range(134.3 - 92.62*t2); |
162 |
//double W2 = MapTo0To360Range(134.3 - 92.62*t2); |
| 163 |
double W2rad = MapTo0To360Range(134.3 - 92.62*t2)*dms::DegToRad; |
163 |
double W2rad = MapTo0To360Range(134.3 - 92.62*t2)*dms::DegToRad; |
| 164 |
double W3 = MapTo0To360Range(42.0 - 0.5118*t5); |
164 |
|
|
|
165 |
//double W3 = MapTo0To360Range(42.0 - 0.5118*t5); |
| 165 |
double W3rad = MapTo0To360Range(42.0 - 0.5118*t5)*dms::DegToRad; |
166 |
double W3rad = MapTo0To360Range(42.0 - 0.5118*t5)*dms::DegToRad; |
| 166 |
|
167 |
|
| 167 |
double W4 = MapTo0To360Range(276.59 - 0.5118*t5); |
168 |
double W4 = MapTo0To360Range(276.59 - 0.5118*t5); |
| 168 |
double W4rad = MapTo0To360Range(276.59 - 0.5118*t5)*dms::DegToRad; |
169 |
double W4rad = W4*dms::DegToRad; |
|
|
170 |
//double W4rad = MapTo0To360Range(276.59 - 0.5118*t5)*dms::DegToRad; |
| 171 |
|
| 169 |
double W5 = MapTo0To360Range(267.2635- 1222.1136*t7); |
172 |
double W5 = MapTo0To360Range(267.2635- 1222.1136*t7); |
| 170 |
double W5rad = MapTo0To360Range(267.2635- 1222.1136*t7)*dms::DegToRad; |
173 |
double W5rad = W5*dms::DegToRad; |
|
|
174 |
//double W5rad = MapTo0To360Range(267.2635- 1222.1136*t7)*dms::DegToRad; |
| 171 |
|
175 |
|
| 172 |
double W6 = MapTo0To360Range(175.4762 - 1221.5515*t7); |
176 |
//double W6 = MapTo0To360Range(175.4762 - 1221.5515*t7); |
| 173 |
double W6rad = MapTo0To360Range(175.4762 - 1221.5515*t7)*dms::DegToRad; |
177 |
double W6rad = MapTo0To360Range(175.4762 - 1221.5515*t7)*dms::DegToRad; |
| 174 |
|
178 |
|
| 175 |
double W7 = MapTo0To360Range(2.4891 - 0.002435*t7); |
179 |
//double W7 = MapTo0To360Range(2.4891 - 0.002435*t7); |
| 176 |
double W7rad = MapTo0To360Range(2.4891 - 0.002435*t7)*dms::DegToRad; |
180 |
double W7rad = MapTo0To360Range(2.4891 - 0.002435*t7)*dms::DegToRad; |
| 177 |
|
181 |
|
| 178 |
double W8 = MapTo0To360Range(113.35 - 0.2597*t7); |
182 |
//double W8 = MapTo0To360Range(113.35 - 0.2597*t7); |
| 179 |
double W8rad = MapTo0To360Range(113.35 - 0.2597*t7)*dms::DegToRad; |
183 |
double W8rad = MapTo0To360Range(113.35 - 0.2597*t7)*dms::DegToRad; |
| 180 |
|
184 |
|
| 181 |
|
185 |
|
|
Lines 276-282
Link Here
|
| 276 |
double theta = atanb1b2 + W8rad; |
280 |
double theta = atanb1b2 + W8rad; |
| 277 |
e = edash + 0.002778797*edash*cos(q); |
281 |
e = edash + 0.002778797*edash*cos(q); |
| 278 |
p = w_ + 0.159215*sin(q); |
282 |
p = w_ + 0.159215*sin(q); |
| 279 |
double u = 2*W5 - 2*theta + psi; |
283 |
//double u = 2*W5 - 2*theta + psi; <-this is WRONG! W5 given in degrees while thetha + psi are in rad? |
|
|
284 |
double u = 2*W5rad - 2*theta + psi; |
| 280 |
double h = 0.9375*edash*edash*sin(q) + 0.1875*s*s*sin(2*(W5rad - theta)); |
285 |
double h = 0.9375*edash*edash*sin(q) + 0.1875*s*s*sin(2*(W5rad - theta)); |
| 281 |
lambdadash = MapTo0To360Range(L - 0.254744*(e1*sin(W6rad) + 0.75*e1*e1*sin(2*W6rad) + h)); |
286 |
lambdadash = MapTo0To360Range(L - 0.254744*(e1*sin(W6rad) + 0.75*e1*e1*sin(2*W6rad) + h)); |
| 282 |
i = idash + 0.031843*s*cos(u); |
287 |
i = idash + 0.031843*s*cos(u); |
|
Lines 372-435
Link Here
|
| 372 |
u = (lambda1 - omega1)*dms::DegToRad; |
377 |
u = (lambda1 - omega1)*dms::DegToRad; |
| 373 |
w = (omega1 - 168.8112)*dms::DegToRad; |
378 |
w = (omega1 - 168.8112)*dms::DegToRad; |
| 374 |
double gamma1rad = (gamma1)*dms::DegToRad; |
379 |
double gamma1rad = (gamma1)*dms::DegToRad; |
| 375 |
X[1] = r1*(cos(u)*cos(w) - sin(u)*cos(gamma1rad)*sin(w)); |
380 |
X[0] = r1*(cos(u)*cos(w) - sin(u)*cos(gamma1rad)*sin(w)); |
| 376 |
Y[1] = r1*(sin(u)*cos(w)*cos(gamma1rad) + cos(u)*sin(w)); |
381 |
Y[0] = r1*(sin(u)*cos(w)*cos(gamma1rad) + cos(u)*sin(w)); |
| 377 |
Z[1] = r1*sin(u)*sin(gamma1rad); |
382 |
Z[0] = r1*sin(u)*sin(gamma1rad); |
| 378 |
|
383 |
|
| 379 |
u = (lambda2 - omega2)*dms::DegToRad; |
384 |
u = (lambda2 - omega2)*dms::DegToRad; |
| 380 |
w = (omega2 - 168.8112)*dms::DegToRad; |
385 |
w = (omega2 - 168.8112)*dms::DegToRad; |
| 381 |
double gamma2rad = (gamma2)*dms::DegToRad; |
386 |
double gamma2rad = (gamma2)*dms::DegToRad; |
| 382 |
X[2] = r2*(cos(u)*cos(w) - sin(u)*cos(gamma2rad)*sin(w)); |
387 |
X[1] = r2*(cos(u)*cos(w) - sin(u)*cos(gamma2rad)*sin(w)); |
| 383 |
Y[2] = r2*(sin(u)*cos(w)*cos(gamma2rad) + cos(u)*sin(w)); |
388 |
Y[1] = r2*(sin(u)*cos(w)*cos(gamma2rad) + cos(u)*sin(w)); |
| 384 |
Z[2] = r2*sin(u)*sin(gamma2rad); |
389 |
Z[1] = r2*sin(u)*sin(gamma2rad); |
| 385 |
|
390 |
|
| 386 |
u = (lambda3 - omega3)*dms::DegToRad; |
391 |
u = (lambda3 - omega3)*dms::DegToRad; |
| 387 |
w = (omega3 - 168.8112)*dms::DegToRad; |
392 |
w = (omega3 - 168.8112)*dms::DegToRad; |
| 388 |
double gamma3rad = (gamma3)*dms::DegToRad; |
393 |
double gamma3rad = (gamma3)*dms::DegToRad; |
| 389 |
X[3] = r3*(cos(u)*cos(w) - sin(u)*cos(gamma3rad)*sin(w)); |
394 |
X[2] = r3*(cos(u)*cos(w) - sin(u)*cos(gamma3rad)*sin(w)); |
| 390 |
Y[3] = r3*(sin(u)*cos(w)*cos(gamma3rad) + cos(u)*sin(w)); |
395 |
Y[2] = r3*(sin(u)*cos(w)*cos(gamma3rad) + cos(u)*sin(w)); |
| 391 |
Z[3] = r3*sin(u)*sin(gamma3rad); |
396 |
Z[2] = r3*sin(u)*sin(gamma3rad); |
| 392 |
|
397 |
|
| 393 |
u = (lambda4 - omega4)*dms::DegToRad; |
398 |
u = (lambda4 - omega4)*dms::DegToRad; |
| 394 |
w = (omega4 - 168.8112)*dms::DegToRad; |
399 |
w = (omega4 - 168.8112)*dms::DegToRad; |
| 395 |
double gamma4rad = (gamma4)*dms::DegToRad; |
400 |
double gamma4rad = (gamma4)*dms::DegToRad; |
| 396 |
X[4] = r4*(cos(u)*cos(w) - sin(u)*cos(gamma4rad)*sin(w)); |
401 |
X[3] = r4*(cos(u)*cos(w) - sin(u)*cos(gamma4rad)*sin(w)); |
| 397 |
Y[4] = r4*(sin(u)*cos(w)*cos(gamma4rad) + cos(u)*sin(w)); |
402 |
Y[3] = r4*(sin(u)*cos(w)*cos(gamma4rad) + cos(u)*sin(w)); |
| 398 |
Z[4] = r4*sin(u)*sin(gamma4rad); |
403 |
Z[3] = r4*sin(u)*sin(gamma4rad); |
| 399 |
|
404 |
|
| 400 |
u = (lambda5 - omega5)*dms::DegToRad; |
405 |
u = (lambda5 - omega5)*dms::DegToRad; |
| 401 |
w = (omega5 - 168.8112)*dms::DegToRad; |
406 |
w = (omega5 - 168.8112)*dms::DegToRad; |
| 402 |
double gamma5rad = (gamma5)*dms::DegToRad; |
407 |
double gamma5rad = (gamma5)*dms::DegToRad; |
| 403 |
X[5] = r5*(cos(u)*cos(w) - sin(u)*cos(gamma5rad)*sin(w)); |
408 |
X[4] = r5*(cos(u)*cos(w) - sin(u)*cos(gamma5rad)*sin(w)); |
| 404 |
Y[5] = r5*(sin(u)*cos(w)*cos(gamma5rad) + cos(u)*sin(w)); |
409 |
Y[4] = r5*(sin(u)*cos(w)*cos(gamma5rad) + cos(u)*sin(w)); |
| 405 |
Z[5] = r5*sin(u)*sin(gamma5rad); |
410 |
Z[4] = r5*sin(u)*sin(gamma5rad); |
| 406 |
|
411 |
|
| 407 |
u = (lambda6 - omega6)*dms::DegToRad; |
412 |
u = (lambda6 - omega6)*dms::DegToRad; |
| 408 |
w = (omega6 - 168.8112)*dms::DegToRad; |
413 |
w = (omega6 - 168.8112)*dms::DegToRad; |
| 409 |
double gamma6rad = (gamma6)*dms::DegToRad; |
414 |
double gamma6rad = (gamma6)*dms::DegToRad; |
| 410 |
X[6] = r6*(cos(u)*cos(w) - sin(u)*cos(gamma6rad)*sin(w)); |
415 |
X[5] = r6*(cos(u)*cos(w) - sin(u)*cos(gamma6rad)*sin(w)); |
| 411 |
Y[6] = r6*(sin(u)*cos(w)*cos(gamma6rad) + cos(u)*sin(w)); |
416 |
Y[5] = r6*(sin(u)*cos(w)*cos(gamma6rad) + cos(u)*sin(w)); |
| 412 |
Z[6] = r6*sin(u)*sin(gamma6rad); |
417 |
Z[5] = r6*sin(u)*sin(gamma6rad); |
| 413 |
|
418 |
|
| 414 |
u = (lambda7 - omega7)*dms::DegToRad; |
419 |
u = (lambda7 - omega7)*dms::DegToRad; |
| 415 |
w = (omega7 - 168.8112)*dms::DegToRad; |
420 |
w = (omega7 - 168.8112)*dms::DegToRad; |
| 416 |
double gamma7rad = (gamma7)*dms::DegToRad; |
421 |
double gamma7rad = (gamma7)*dms::DegToRad; |
| 417 |
X[7] = r7*(cos(u)*cos(w) - sin(u)*cos(gamma7rad)*sin(w)); |
422 |
X[6] = r7*(cos(u)*cos(w) - sin(u)*cos(gamma7rad)*sin(w)); |
| 418 |
Y[7] = r7*(sin(u)*cos(w)*cos(gamma7rad) + cos(u)*sin(w)); |
423 |
Y[6] = r7*(sin(u)*cos(w)*cos(gamma7rad) + cos(u)*sin(w)); |
| 419 |
Z[7] = r7*sin(u)*sin(gamma7rad); |
424 |
Z[6] = r7*sin(u)*sin(gamma7rad); |
| 420 |
|
425 |
|
| 421 |
u = (lambda8 - omega8)*dms::DegToRad; |
426 |
u = (lambda8 - omega8)*dms::DegToRad; |
| 422 |
w = (omega8 - 168.8112)*dms::DegToRad; |
427 |
w = (omega8 - 168.8112)*dms::DegToRad; |
| 423 |
double gamma8rad = (gamma8)*dms::DegToRad; |
428 |
double gamma8rad = (gamma8)*dms::DegToRad; |
| 424 |
X[8] = r8*(cos(u)*cos(w) - sin(u)*cos(gamma8rad)*sin(w)); |
429 |
X[7] = r8*(cos(u)*cos(w) - sin(u)*cos(gamma8rad)*sin(w)); |
| 425 |
Y[8] = r8*(sin(u)*cos(w)*cos(gamma8rad) + cos(u)*sin(w)); |
430 |
Y[7] = r8*(sin(u)*cos(w)*cos(gamma8rad) + cos(u)*sin(w)); |
| 426 |
Z[8] = r8*sin(u)*sin(gamma8rad); |
431 |
Z[7] = r8*sin(u)*sin(gamma8rad); |
| 427 |
|
432 |
|
| 428 |
X[9] = 0; |
433 |
X[8] = 0; |
| 429 |
Y[9] = 0; |
434 |
Y[8] = 0; |
| 430 |
Z[9] = 1; |
435 |
Z[8] = 1; |
| 431 |
|
436 |
|
| 432 |
for ( int i=1; i<10; ++i ) { |
437 |
for ( int i=0; i < 9; ++i ) { |
| 433 |
A1[i] = X[i]; |
438 |
A1[i] = X[i]; |
| 434 |
B1[i] = c1*Y[i] - s1*Z[i]; |
439 |
B1[i] = c1*Y[i] - s1*Z[i]; |
| 435 |
C1[i] = s1*Y[i] + c1*Z[i]; |
440 |
C1[i] = s1*Y[i] + c1*Z[i]; |
|
Lines 448-454
Link Here
|
| 448 |
C4[i] = C3[i]*cos(ALPHA) - B3[i]*sin(ALPHA); |
453 |
C4[i] = C3[i]*cos(ALPHA) - B3[i]*sin(ALPHA); |
| 449 |
} |
454 |
} |
| 450 |
|
455 |
|
| 451 |
D = atan2(A4[9], C4[9]); |
456 |
D = atan2(A4[8], C4[8]); |
| 452 |
|
457 |
|
| 453 |
//X and Y are now the rectangular coordinates of each satellite, |
458 |
//X and Y are now the rectangular coordinates of each satellite, |
| 454 |
//in units of Jupiter's Equatorial radius. |
459 |
//in units of Jupiter's Equatorial radius. |