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.
09-22-2021 09:48 AM
Hello btruden_henway,
Could we know your device model diagram and the placement of sensors on the device first?
09-22-2021 12:54 PM
Hi Robin,
Here you have a picture showing where's the sensor placed on the PCB and with respect to the stick.
Thanks!
12-13-2021 09:17 AM
Hello btruden_henway,
According you previous description "Ideally the X axis would coincide with the gravity, but since this position is set manually that wouldn't be the real case. " and PCB placement picture, there was conflict and need you to explain. Your previous description is X axis would coincide with the gravity, but in your PCB placement picture stick coincide with the gravity z axis. Could you check it?
And by the way, what is your target coordinate system for your PCB placement picture?
12-15-2021 09:15 AM
Hello btruden_henway,
Could you give feedback?