Closed vincenttate13 closed 4 months ago
I can assure that the operation is correct. Consider the following example:
I've also formulated a very similar example in https://depositonce.tu-berlin.de/items/a1990767-cacd-4749-bb74-5ade7ff16d12:
@dlaidig I see now, thank you very much for the clarification.
Hi @dlaidig, I have a question with respect to the rotation applied to the mag vector in order to yield magEarth.
From the updateMag function in vqf.cpp, magEarth is obtained by rotating the raw magnetometer measurement vector by the 6D orientation quat: getQuat6D(accGyrQuat); quatRotate(accGyrQuat, mag, magEarth);
If I understand the intention of this operation, why do you not need to invert accGyrQuat prior to applying it to mag? As an example, if you began with the IMU's local coordinate system in line with the global inertial coordinate system, then rolled the IMU +45 degrees, accGyrQuat should reflect a +45 degree rolled rotation. If the intention of this operation is to transform the mag vector into the inertial frame, would you not need to apply a -45 degree rolled rotation such that the magnetometer's local z-axis would realign with the global z-axis? Thanks!