|
8 | 8 | from ._transforms import _euler_from_quaternion, _rot_matrix_from_quaternion |
9 | 9 | from ._vectorops import _normalize, _skew_symmetric |
10 | 10 |
|
11 | | - |
12 | 11 | P0 = ( |
13 | 12 | (1.0e-6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), |
14 | 13 | (0.0, 1.0e-6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), |
|
22 | 21 | ) |
23 | 22 |
|
24 | 23 |
|
25 | | - |
26 | 24 | @njit # type: ignore[misc] |
27 | 25 | def _update_quaternion_with_gibbs2( |
28 | 26 | q: NDArray[np.float64], da: NDArray[np.float64] |
@@ -247,26 +245,6 @@ def _project_covariance_ahead( |
247 | 245 | P[:, :] = phi @ P @ phi.T + Q |
248 | 246 |
|
249 | 247 |
|
250 | | -@njit # type: ignore[misc] |
251 | | -def _project_velocity_ahead(dvel, v_n, R_nb, dvel_g_corr): |
252 | | - """ |
253 | | - Project velocity estimate ahead (in place). |
254 | | -
|
255 | | - Parameters |
256 | | - ---------- |
257 | | - dvel : ndarray, shape (3,) |
258 | | - Velocity increment measurement (sculling integral). |
259 | | - v_n : ndarray, shape (3,) |
260 | | - Current velocity estimate expressed in the navigation frame (projected ahead |
261 | | - in place). |
262 | | - R_nb : ndarray, shape (3, 3) |
263 | | - Current rotation matrix from body to navigation frame. |
264 | | - dvel_g_corr : ndarray, shape (3,) |
265 | | - Gravity correction. |
266 | | - """ |
267 | | - v_n[:] += R_nb @ dvel + dvel_g_corr |
268 | | - |
269 | | - |
270 | 248 | def _state_transition_matrix( |
271 | 249 | dt: float, |
272 | 250 | dvel: NDArray[np.float64], |
@@ -677,7 +655,7 @@ def update( |
677 | 655 | _update_state_transition_matrix(self._phi, dvel, dtheta, R_nb) |
678 | 656 |
|
679 | 657 | # Project (a priori) state estimates ahead |
680 | | - _project_velocity_ahead(dvel, self._v_n, R_nb, self._dvel_g_corr) |
| 658 | + self._v_n[:] += R_nb @ dvel + self._dvel_g_corr # TODO: speed-up with njit? |
681 | 659 | _update_quaternion_with_rotvec(self._q_nb, dtheta) |
682 | 660 |
|
683 | 661 | # Project (a priori) error covariance matrix estimate ahead |
|
0 commit comments