Skip to content

Commit 541a006

Browse files
innovation cov
1 parent fca3026 commit 541a006

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/smsfusion/_ins_v2.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,13 @@ def _kalman_gain(
121121
Kalman gain vector.
122122
"""
123123

124-
# Innovation covariance (inverse)
125124
Ph = np.dot(P, h)
126-
s_inv = 1.0 / (np.dot(h, Ph) + r)
125+
126+
# Innovation covariance
127+
s = np.dot(h, Ph) + r
127128

128129
# Kalman gain
129-
k = Ph * s_inv
130+
k = Ph / s
130131

131132
return k
132133

0 commit comments

Comments
 (0)