aerospaceresearch / orbitdeterminator

determination of satellite orbits and more
MIT License
181 stars 113 forks source link

Added Exception for IndexError in Lamberts Kalman #191

Closed Curious-Nikhil closed 4 years ago

Curious-Nikhil commented 4 years ago

Hi, When running OD using Lamberts Kalman method xhat = np.mean(kep[:, I]) in kalman_lambert.kalman will result in IndexErrorbecause the distance units are in km. Changing the units to metres fixes the issue.

But currently, there is no error handling. This commit adds a simple try-except block for IndexError which returns a message requesting the user to change units to metres. Use this command - python3 main.py -u m

image

Thanks!

Originally mentioned by @aryadas98 in #106 (comment)

Edit: closed #190 to squash and shift branch

Curious-Nikhil commented 4 years ago

Thanks for the review and push. @aryadas98