Skip to content

Commit fca3026

Browse files
delete volocity project ahead function
1 parent 70fc149 commit fca3026

1 file changed

Lines changed: 1 addition & 23 deletions

File tree

src/smsfusion/_ins_v2.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from ._transforms import _euler_from_quaternion, _rot_matrix_from_quaternion
99
from ._vectorops import _normalize, _skew_symmetric
1010

11-
1211
P0 = (
1312
(1.0e-6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
1413
(0.0, 1.0e-6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
@@ -22,7 +21,6 @@
2221
)
2322

2423

25-
2624
@njit # type: ignore[misc]
2725
def _update_quaternion_with_gibbs2(
2826
q: NDArray[np.float64], da: NDArray[np.float64]
@@ -247,26 +245,6 @@ def _project_covariance_ahead(
247245
P[:, :] = phi @ P @ phi.T + Q
248246

249247

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-
270248
def _state_transition_matrix(
271249
dt: float,
272250
dvel: NDArray[np.float64],
@@ -677,7 +655,7 @@ def update(
677655
_update_state_transition_matrix(self._phi, dvel, dtheta, R_nb)
678656

679657
# 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?
681659
_update_quaternion_with_rotvec(self._q_nb, dtheta)
682660

683661
# Project (a priori) error covariance matrix estimate ahead

0 commit comments

Comments
 (0)