Skip to content

Commit 204ea3b

Browse files
committed
add comment
1 parent ea5d3ff commit 204ea3b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Localization/extended_kalman_filter/extended_kalman_filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import matplotlib.pyplot as plt
1212

1313
# Estimation parameter of EKF
14-
Q = np.diag([1.0, 1.0])**2
15-
R = np.diag([0.1, 0.1, np.deg2rad(1.0), 1.0])**2
14+
Q = np.diag([1.0, 1.0])**2 # Observation x,y position covariance
15+
R = np.diag([0.1, 0.1, np.deg2rad(1.0), 1.0])**2 # predict state covariance
1616

1717
# Simulation parameter
1818
Qsim = np.diag([0.5, 0.5])**2
@@ -152,7 +152,7 @@ def plot_covariance_ellipse(xEst, PEst):
152152
y = [b * math.sin(it) for it in t]
153153
angle = math.atan2(eigvec[bigind, 1], eigvec[bigind, 0])
154154
R = np.array([[math.cos(angle), math.sin(angle)],
155-
[-math.sin(angle), math.cos(angle)]])
155+
[-math.sin(angle), math.cos(angle)]])
156156
fx = R.dot(np.array([[x, y]]))
157157
px = np.array(fx[0, :] + xEst[0, 0]).flatten()
158158
py = np.array(fx[1, :] + xEst[1, 0]).flatten()

0 commit comments

Comments
 (0)