@@ -229,7 +229,7 @@ class AHRS:
229229 ----------
230230 fs : float
231231 Sampling rate in Hz.
232- v : array_like, shape (3,), optional
232+ vel : array_like, shape (3,), optional
233233 Initial velocity estimate in m/s. Defaults to zero velocity (stationary).
234234 q : Attitude or array_like, shape (4,), optional
235235 Initial attitude estimate as a unit quaternion (qw, qx, qy, qz). Defaults
@@ -263,7 +263,7 @@ class AHRS:
263263 def __init__ (
264264 self ,
265265 fs : float ,
266- v : ArrayLike = (0.0 , 0.0 , 0.0 ),
266+ vel : ArrayLike = (0.0 , 0.0 , 0.0 ),
267267 q : ArrayLike = (1.0 , 0.0 , 0.0 , 0.0 ),
268268 bg : ArrayLike = (0.0 , 0.0 , 0.0 ),
269269 P : ArrayLike = P0 ,
@@ -288,7 +288,7 @@ def __init__(
288288 self ._gbc = gyro_bias_corr_time # gyro bias correlation time
289289
290290 # State and covariance estimates
291- self ._v_n = np .asarray_chkfinite (v ).reshape (3 ).copy ()
291+ self ._v_n = np .asarray_chkfinite (vel ).reshape (3 ).copy ()
292292 self ._q_nb = np .asarray_chkfinite (q ).reshape (4 ).copy ()
293293 self ._bg_b = np .asarray_chkfinite (bg ).reshape (3 ).copy ()
294294 self ._P = np .asarray_chkfinite (P ).reshape (9 , 9 ).copy ()
@@ -307,18 +307,18 @@ def __init__(
307307 )
308308 self ._H = _measurement_matrix_init (self ._q_nb )
309309
310- def quaternion (self ) -> NDArray [np .float64 ]:
311- """
312- Attitude expressed as a unit quaternion.
313- """
314- return self ._q_nb .copy ()
315-
316310 def velocity (self ) -> NDArray [np .float64 ]:
317311 """
318312 Velocity expressed in the navigation frame.
319313 """
320314 return self ._v_n .copy ()
321315
316+ def quaternion (self ) -> NDArray [np .float64 ]:
317+ """
318+ Attitude expressed as a unit quaternion.
319+ """
320+ return self ._q_nb .copy ()
321+
322322 def euler (self , degrees : bool = False ) -> NDArray [np .float64 ]:
323323 """
324324 Attitude expressed as Euler angles (roll, pitch, yaw).
0 commit comments