2025-07-13 11:24 AM - edited 2025-07-13 11:27 AM
Hello fellow users!
I'm trying to implement the Fusion MOTIONFX library with the board X-NUCLEO-IKS02A1 and the nucleo board NUCLEO-U575ZI-Q so I can output via terminal all the values.
So far I can output the fusion values but they are wrong as I need to define the sensors orientation on the PCB board (real world) and there is no documentation that indicates this for the IKS02A1 (I also have the IKS4A1 and such info also is not avilable)
So will be nice of ST to have a:
1)definitive guide or schematic showing the physical orientation of the sensor axes (ISM330DHCX, IIS2MDC and IIS2DLPC) on the X-NUCLEO-IKS02A1.
2) The recommended orientation strings (acc_orientation, gyro_orientation, mag_orientation) for this specific board.
3) Clarification: Does the user need to remap the sensor axes manually in code to match the declared orientation strings? Or does MotionFX internally handle axis rotation based on the strings?
4) Ideally: an official reference example with working axis mapping + MotionFX configuration for terminal output
So here is the part of the code that I cant figure out what is the right one (Point 2 Above) if someone can point to the right declaration will be great.
strcpy((char *)MotionFX_knobs.acc_orientation, "swu"); //South/West/Up
strcpy((char *)MotionFX_knobs.gyro_orientation, "swu");
strcpy((char *)MotionFX_knobs.mag_orientation, "enu"); //East/North/Up
The information of sensor placement and axes orientation should be in all X-Nucleo with MEMs sensors boards, even the axes printed on the PCB
And if this is the correct way to map the sensor axes (Point 3)
data_in.acc[0] = (float)acc_axes.x / 1000.0f;
data_in.acc[1] = (float)acc_axes.y / 1000.0f;
data_in.acc[2] = (float)acc_axes.z / 1000.0f;
data_in.gyro[0] = (float)gyro_axes.x / 1000.0f;
data_in.gyro[1] = (float)gyro_axes.y / 1000.0f;
data_in.gyro[2] = (float)gyro_axes.z / 1000.0f;
data_in.mag[0] = (float)mag_axes.x / 500.0f;
data_in.mag[1] = (float)mag_axes.y / 500.0f;
data_in.mag[2] = (float)mag_axes.z / 500.0f;
Any help is appreciated, if the test is code is needed I can post it as is based on the Datalog terminal output for my boards combination.
Kind Regards