

Public Member Functions | |
| Point3d | computePosition (double jd) const |
| double | getBoundingRadius () const |
| double | getPeriod () const |
| UranianSatelliteOrbit (double _a, double _n, double _L0, double _L1, int _LTerms, int _zTerms, int _zetaTerms, double *_L_k, double *_L_theta, double *_L_phi, double *_z_k, double *_z_theta, double *_z_phi, double *_zeta_k, double *_zeta_theta, double *_zeta_phi) | |
Private Attributes | |
| double | a |
| double | L0 |
| double | L1 |
| double * | L_k |
| double * | L_phi |
| double * | L_theta |
| int | LTerms |
| double | n |
| double * | z_k |
| double * | z_phi |
| double * | z_theta |
| double * | zeta_k |
| double * | zeta_phi |
| double * | zeta_theta |
| int | zetaTerms |
| int | zTerms |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 2465 of file customorbit.cpp. 02472 : 02473 a(_a), n(_n), L0(_L0), L1(_L1), 02474 LTerms(_LTerms), zTerms(_zTerms), zetaTerms(_zetaTerms), 02475 L_k(_L_k), L_theta(_L_theta), L_phi(_L_phi), 02476 z_k(_z_k), z_theta(_z_theta), z_phi(_z_phi), 02477 zeta_k(_zeta_k), zeta_theta(_zeta_theta), zeta_phi(_zeta_phi) 02478 { 02479 };
|
|
|
Implements CachingOrbit. Definition at line 2494 of file customorbit.cpp. References cos(), degToRad(), sin(), sqrt(), square(), Matrix3< T >::xrotation(), and Matrix3< T >::yrotation(). 02495 {
02496 double t = jd - 2444239.5;
02497 int i;
02498
02499 double L = L0 + L1 * t;
02500 for (i = 0; i < LTerms; i++)
02501 L += L_k[i] * sin(L_theta[i] * t + L_phi[i]);
02502
02503 double a0 = 0.0;
02504 double a1 = 0.0;
02505 for (i = 0; i < zTerms; i++)
02506 {
02507 double w = z_theta[i] * t + z_phi[i];
02508 a0 += z_k[i] * cos(w);
02509 a1 += z_k[i] * sin(w);
02510 }
02511
02512 double b0 = 0.0;
02513 double b1 = 0.0;
02514 for (i = 0; i < zetaTerms; i++)
02515 {
02516 double w = zeta_theta[i] * t + zeta_phi[i];
02517 b0 += zeta_k[i] * cos(w);
02518 b1 += zeta_k[i] * sin(w);
02519 }
02520
02521 double e = sqrt(square(a0) + square(a1));
02522 double p = atan2(a1, a0);
02523 double gamma = 2.0 * asin(sqrt(square(b0) + square(b1)));
02524 double theta = atan2(b1, b0);
02525
02526 L += degToRad(174.99);
02527
02528 // Now that we have all the orbital elements, compute the position
02529 double M = L - p;
02530
02531 // Iterate a few times to compute the eccentric anomaly from the
02532 // mean anomaly.
02533 double ecc = M;
02534 for (i = 0; i < 4; i++)
02535 ecc = M + e * sin(ecc);
02536
02537 double x = a * (cos(ecc) - e);
02538 double z = a * sqrt(1 - square(e)) * -sin(ecc);
02539
02540 Mat3d R = (Mat3d::yrotation(theta) *
02541 Mat3d::xrotation(gamma) *
02542 Mat3d::yrotation(p - theta));
02543 return R * Point3d(x, 0, z);
02544 }
|
|
|
Implements CachingOrbit. Definition at line 2487 of file customorbit.cpp. References BoundingRadiusSlack. 02488 {
02489 // Not quite correct, but should work since e is pretty low
02490 // for most of the Uranian moons.
02491 return a * BoundingRadiusSlack;
02492 }
|
|
|
Implements CachingOrbit. Definition at line 2482 of file customorbit.cpp. References PI.
|
|
|
Definition at line 2453 of file customorbit.cpp. |
|
|
Definition at line 2455 of file customorbit.cpp. |
|
|
Definition at line 2456 of file customorbit.cpp. |
|
|
Definition at line 2457 of file customorbit.cpp. |
|
|
Definition at line 2457 of file customorbit.cpp. |
|
|
Definition at line 2457 of file customorbit.cpp. |
|
|
Definition at line 2458 of file customorbit.cpp. |
|
|
Definition at line 2454 of file customorbit.cpp. |
|
|
Definition at line 2459 of file customorbit.cpp. |
|
|
Definition at line 2459 of file customorbit.cpp. |
|
|
Definition at line 2459 of file customorbit.cpp. |
|
|
Definition at line 2461 of file customorbit.cpp. |
|
|
Definition at line 2461 of file customorbit.cpp. |
|
|
Definition at line 2461 of file customorbit.cpp. |
|
|
Definition at line 2462 of file customorbit.cpp. |
|
|
Definition at line 2460 of file customorbit.cpp. |
1.4.1