09-20-2021 07:25 PM - edited 09-20-2021 07:59 PM
Hi,
This might be a more "mathematical" or "algebraic" question, but I hope you can help me.
My project consists of a tiny device that gets attached to a stick. That tiny device includes a BHI260AB and an STM32 acting as the SPI host MCU.
The idea is that the user presses a button when the stick is in an horizontal position and which is considered the reference orientation.
Ideally the X axis would coincide with the gravity, but since this position is set manually that wouldn't be the real case.
Anyway, the stick is then moved and the device must show on a display in real-time the following two angles:
V and H are the angles that I must show on the display.
V angle is the angle between the initial reference orientation and the XY projection of the actual orientation.
H angle is the angle between the initial reference orientation and the ZY projection of the actual orientaiton.
I have the BHI260 running and I can configure any available virtual sensor successfuly. I'm now just using the Game Rotation Vector sensor, but I'm not sure how can I get the final H and V angles using the reference orientation set by the user.
Which would be the right approach to this?
Thanks!
Solved! Go to Solution.
12-15-2021 12:46 PM
Hi Rogin,
So, to clarify. In the beginning, the stick is placed horizontally and, due to that, the gravity is no longer coincident with the Z-axis of the sensor (as well as the PCB), but with the Y-axis of the sensor.
Let me know if that makes the things clearer.
BR
12-16-2021 09:03 AM
Hello btruden_henway,
coordinate system
You can see that in your previous structure diagram, the sensor's default coordinate system is like this, and stick is consistent with the Z axis.
An your first description in this topic, "The idea is that the user presses a button when the stick is in an horizontal position and which is considered the reference orientation. Ideally the X axis would coincide with the gravity, but since this position is set manually that wouldn't be the real case. "
I'm very confused about your description, could your, could you describe it again from the beginning? Thanks.
12-22-2021 06:47 AM
Hello btruden_henway,
Could you give further feedback?
01-06-2022 08:21 AM
Since there was no feedback for a long time, we close this topic first. You could update feedback in the future if you have.