Closed mluacnunes closed 1 year ago
Hi,
The Cython functions expect the input arrays to be in C-contiguous memory order. This is apparently not the case for your data, which might be the result of transposing or indexing (and can happen when loading the data). You can easily fix this with np.ascontiguousarray
:
import numpy as np
q_dict = vqf.updateBatch(np.ascontiguousarray(gyro_dt), np.ascontiguousarray(acc_dt), np.ascontiguousarray(mag_dt))
(If you care about speed and process the same data multiple times, you will want to only call np.ascontiguousarray
once after loading the data.)
Hi,
First of all, thank you for sharing your work!
I was trying to use VQF to calculate quarternions (ENU convention) from inertial data collected in an environment with magnetic disturbances:
Where gyro_dt, acc_dt and mag_dt and numpy arrays with shape (7677, 3).
Nevertheless, I got the following error, that seems to be related with the implementation of VQF class's updateBatch function in cython.
Can you help me?