I have understood that the onboard IMU of the Artemis Module could deliver and record directly the Euler angles from quaternion angles. I just tried to upload the IMU DMP Quat6 but the Arduino OLE tells me there is a trouble with a declaration (see attached picture).
So is it possible to get a help on that and on the way to record Euler angles. I must say that I still need to record GNSS data (10 Hz for the moment as discussed in an other topic).
It sounds as if you are quite new to changing and compiling Arduino code? There are many easier examples you could work through to build your experience. Modifying and re-building the full OpenLog Artemis code is a large and quite complex project.
But, to answer your question, you need to modify and save (overwrite) the ICM_20948_C.h. Do not change its name. Do not change its location. The compiler will use the updated file when you re-compile the code.
I tried to use Example6 and 7 quat9 and quat6 orientation after trying to modify the 20948_C.h file.
But I found that your proposed procedure to modify this file was not obvious for me as it is required to ask for a pull request in place of saving the change … I tried that till the point in the attached image …
Assuming that the modified files could have arrived somewhere in my directory (???), I tried to upload the Example7 and 6.
I got an appearance of upload success but with no initialization of the Artemis according to the com7 view (see the second image)
Please don’t forget that my need is to get orientation angles together with GPS data ???
Please use the OLA BETA binary. Open the main menu, then the IMU menu. There is an option to enable the DMP. Once enabled, you will be able to log Quat6 or Quat9 data simultaneously with your GNSS data.
The IMU menu is the same as for the standard OpenLog Artemis. Using the Beta firmware, you will be able to log the GNSS data and the IMU quaternion data at 25Hz.
You can not use Examples 6 and 7 from the ICM20948 library directly on OpenLog Artemis. Extra code is required to configure the board correctly (enable power for the IMU, enable the POCI pull-up). If you want to experiment, please use the dedicated “IMU_DMP_Quat6” and “IMU_DMP_Quat9” examples from here:
I regret you will need to convert the quaternions to Euler angles manually, on the logged data. You will be able to do it in a spreadsheet like Excel. The logged data is in Comma Separated Value format which Excel will understand. Or you could use the Python CSV library.
Another solution would be to change my configuration toward a “Sparkfun 9DoF ImU” (20948), which seems to produce Euler angles, connected with the NEO-M9N to a basic Qwiic OpenLog.
But I think that this would require firmware works …
Am I correct in assuming that the Quaternion numbers provided are Q1, Q2, Q3, such that Q0 would be sqrt(1 - (Q1^2 + Q2^2 + Q3^2)) with the full quaternion as [Q0, Q1, Q2, Q3]?