#include <orbit.h>
Inheritance diagram for MixedOrbit:


Public Member Functions | |
| virtual double | getBoundingRadius () const |
| virtual double | getPeriod () const |
| MixedOrbit (Orbit *orbit, double t0, double t1, double mass) | |
| Point3d | positionAtTime (double jd) const |
| virtual void | sample (double, double, int, OrbitSampleProc &proc) const |
| virtual | ~MixedOrbit () |
Private Attributes | |
| EllipticalOrbit * | afterApprox |
| EllipticalOrbit * | beforeApprox |
| double | begin |
| double | boundingRadius |
| double | end |
| Orbit * | primary |
Definition at line 101 of file orbit.h.
|
||||||||||||||||||||
|
Definition at line 320 of file orbit.cpp. References afterApprox, beforeApprox, boundingRadius, Orbit::getBoundingRadius(), EllipticalOrbit::getBoundingRadius(), primary, and StateVectorToOrbit(). 00320 : 00321 primary(orbit), 00322 afterApprox(NULL), 00323 beforeApprox(NULL), 00324 begin(t0), 00325 end(t1), 00326 boundingRadius(0.0) 00327 { 00328 assert(t1 > t0); 00329 assert(orbit != NULL); 00330 00331 double dt = 1.0 / 1440.0; // 1 minute 00332 Point3d p0 = orbit->positionAtTime(t0); 00333 Point3d p1 = orbit->positionAtTime(t1); 00334 Vec3d v0 = (orbit->positionAtTime(t0 + dt) - p0) / (86400 * dt); 00335 Vec3d v1 = (orbit->positionAtTime(t1 + dt) - p1) / (86400 * dt); 00336 beforeApprox = StateVectorToOrbit(p0, v0, mass, t0); 00337 afterApprox = StateVectorToOrbit(p1, v1, mass, t1); 00338 00339 boundingRadius = beforeApprox->getBoundingRadius(); 00340 if (primary->getBoundingRadius() > boundingRadius) 00341 boundingRadius = primary->getBoundingRadius(); 00342 if (afterApprox->getBoundingRadius() > boundingRadius) 00343 boundingRadius = afterApprox->getBoundingRadius(); 00344 }
|
|
|
Definition at line 346 of file orbit.cpp. References afterApprox, beforeApprox, and primary. 00347 {
00348 if (primary != NULL)
00349 delete primary;
00350 if (beforeApprox != NULL)
00351 delete beforeApprox;
00352 if (afterApprox != NULL)
00353 delete afterApprox;
00354 }
|
|
|
Implements Orbit. Definition at line 374 of file orbit.cpp. References boundingRadius. 00375 {
00376 return boundingRadius;
00377 }
|
|
|
Implements Orbit. Definition at line 368 of file orbit.cpp. References Orbit::getPeriod(), and primary.
|
|
|
Implements Orbit. Definition at line 357 of file orbit.cpp. References afterApprox, beforeApprox, begin, end, Orbit::positionAtTime(), EllipticalOrbit::positionAtTime(), and primary. 00358 {
00359 if (jd < begin)
00360 return beforeApprox->positionAtTime(jd);
00361 else if (jd < end)
00362 return primary->positionAtTime(jd);
00363 else
00364 return afterApprox->positionAtTime(jd);
00365 }
|
|
||||||||||||||||||||
|
Implements Orbit. Definition at line 380 of file orbit.cpp. References afterApprox, beforeApprox, begin, end, primary, and Orbit::sample(). 00382 {
00383 Orbit* o;
00384 if (t0 < begin)
00385 o = beforeApprox;
00386 else if (t0 < end)
00387 o = primary;
00388 else
00389 o = afterApprox;
00390 o->sample(t0, t1, nSamples, proc);
00391 }
|
|
|
Definition at line 114 of file orbit.h. Referenced by MixedOrbit(), positionAtTime(), sample(), and ~MixedOrbit(). |
|
|
Definition at line 115 of file orbit.h. Referenced by MixedOrbit(), positionAtTime(), sample(), and ~MixedOrbit(). |
|
|
Definition at line 116 of file orbit.h. Referenced by positionAtTime(), and sample(). |
|
|
Definition at line 118 of file orbit.h. Referenced by getBoundingRadius(), and MixedOrbit(). |
|
|
Definition at line 117 of file orbit.h. Referenced by positionAtTime(), and sample(). |
|
|
Definition at line 113 of file orbit.h. Referenced by getPeriod(), MixedOrbit(), positionAtTime(), sample(), and ~MixedOrbit(). |
1.4.1