06-02-2021 08:35 AM - edited 06-02-2021 08:35 AM
Hello,
I want to know how to remap the axes of all sensors including mag(ak09...).
There is some description of the re-map in the datasheet but I couldn't understand it. Please, help.
1. bhy2_hif_set_orientation_matrix : If it is the API to remap the axes, please let me know how to use it.
2. If there is an API for doing it, let me know it. please.
Solved! Go to Solution.
06-02-2021 06:34 PM
Hi,
Thanks for your inquiry.
After your PCB is placed inside your product casing, BHI260AB and AK mag sensor will be invisible. Axis remapping is to align sensors' x/y/z axes to the product body X/Y/Z axes.
In your drawing, assume that the product body X/Y/Z axes are the same as BHI260AB x/y/z axes. Then,
AK_x = BHI260AB_y;
AK_y = -BHI260AB_x;
AK_z = BHI260AB_z
So the remapping 3x3 matrix for AK mag sensor will be,
0 1 0
-1 0 0
0 0 1
Please see the attached PDF file for more information.
Thanks.
06-02-2021 11:17 PM
Appreciate your support.
I'm sorry but Still I don't understand.
1. How can you decide the value like...
0 1 0
-1 0 0
0 0 1
2. So, how do I use the API(bhy2_hif_set_orientation_matrix) for the value that you mentioned above?
Thanks again.
06-03-2021 06:56 PM
Hello Gideon,
1. How can you decide the value like...
0 1 0
-1 0 0
0 0 1
-> The value can be found when we assume below condition. The main point is AK sensor and BHI direction could be different due to your board design.
Then, we need to re-map.
AK_x = BHI260AB_y;
AK_y = -BHI260AB_x;
AK_z = BHI260AB_z
2. So, how do I use the API(bhy2_hif_set_orientation_matrix) for the value that you mentioned above?
You don't directly use it.
Check bhy2_set_orientation_matrix function.
The method is same as previous our API, and there is guide as below.
Thank you.