Community news, upcoming events and general discussions
Threads: 29 Posts: 76
Get technical support from the community
Threads: 841 Posts: 4557
Threads: 15 Posts: 54
Tell us how to make XDK better!
Threads: 34 Posts: 112
Share and discuss community member projects
Threads: 32 Posts: 155
i started my first project off with a friend here: https://xdk.bosch-connectivity.com/community/-/message_boards/message/320751
So that Franjo said it would be nice to make a new thread we are here now. :-)
It took approx. 2 weeks now to inform me about the orientation data (quarternions) and their calculation. Despite the fact that i found a few dissertations about this i could not get any calculation to work.
So i ask you guys to help me.
We want to calculate the orientation data with the accelerometer to an x,y,z coordination system (x,y would work also). At the beginning we need to set a zero reference point.
Did anyone face this problem already and would provide us any code examples or something?
How to calculate this would also help very much.
I know thats much to ask for but I am not getting forward and we are running out of time.
Thank you very much in advance.
Hello Christian, I think I can provide some guidance on the way to implement your use case. Please note that calculating movement in the three-dimensional room is not quite an easy task to solve, as you probably have realized so far. As far as I know, there is, unfortunately, no example code from a similar use case in the XDK community available yet. Since you mentioned that you have spent two weeks on researching how to work with quaternion values, I assume that you know how to read the orientation and map the dimensions x, y and z to the new orientation. With that, you would need to calculate the velocity and distance vector to keep track of the movement of the XDK with the following equation:
S(t) = s0 + v(t)*t + 0.5*a(t)*t^2