pathfinder-for-autonomous-navigation / psim

Six DOF flight simulator and related GNC implementations.
MIT License
4 stars 6 forks source link

Ground Propagator #182

Closed nhz2 closed 4 years ago

nhz2 commented 4 years ago

Ground Propagator

Fixes #181

Summary of changes

Ptest Effects

None

Testing

Unit tests are in test_groundpropagator.cpp Let me know if there is some edge case I'm missing that might break the estimator.

Under normal conditions, this estimator just propagates the most recently uplinked Orbit.

The main goal of the testing is to ensure there is no input that will break the estimator so it can't recover if ground does eventually uplink a good Orbit, and the sat is given enough time to propagate it to the current time.

Also the testing should ensure that too many Orbits getting uplinked won't overload the estimator and prevent it from making progress.

Documentation Evidence

Inline documentation is sufficient.

nhz2 commented 4 years ago

Overall, the propegation logic and everything looks great. I am wondering, however, if we'd want the bestestimate function to ever return an orbit that wasn't caught up to the present. I'm not sure if this will ever be useful information for the rest of gnc/fsw/ Thoughts?

It probably won't be useful for the rest of GNC if the best_estimate isn't caught up. Hopefully this will only happen on startup, or if the GPS time and teensy clock get off by a huge amount (like more than 1 second) for some reason. GNC and flight software can check by calling est.best_estimate().numgravcallsleft() and est.best_estimate().valid() I'm not sure, but hopefully that will just be inlined and won't actually copy the current Orbit into a temporary object and then call numgravcallsleft().