Skip to content

Commit

Permalink
Merge pull request #191 from Curious-Nikhil/patch-1
Browse files Browse the repository at this point in the history
Added Exception for IndexError in Lamberts Kalman
  • Loading branch information
aryadas98 authored Apr 11, 2020
2 parents e1ea104 + 12ac681 commit 5a2c2a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion orbitdeterminator/kep_determination/lamberts_kalman.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,12 @@ def kalman(kep, R):
Pminus = 0.0 # a priori error estimate
K = 0.0 # gain or blending factor
# intial guesses
xhat = np.mean(kep[:, i])
try:
xhat = np.mean(kep[:, i])
except IndexError as err:
print('Error: {0} \n ** Switching units to metres might help **'.format(err))
quit()

P = 1.0
for k in range(1, n_iter):
# time update
Expand Down

0 comments on commit 5a2c2a6

Please sign in to comment.