Calculating forward distance in reference to a fixed point


by SophieK5

Calculating forward distance in reference to a fixed point

I'm using the Myo in Unity to map the movement of an arm during a simple motor task such as picking up a ball off a table (in the real world not AR/VR), I'll later be turning the movement data into sound. I intend on centring my frame of reference at the beginning of the session - setting an origin for the orientation data so I only calculate relative orientations from this point. Like this post http://developerblog.myo.com/quaternions/

What I would like, ideally, is to get an idea of how far forwards the myo has moved to determine how close the user is to the ball on the table. If I had physically mapped the distance from the Myo origin point to the Ball in real world, is there any way of using the data I get from the myo to determine how far it is from the origin?

If it helps, I will be able to assume that the ball remains in the same position on the forward axis in relation to the origin each time due to a controlled testing environment . I've attached a link to a really rough “top down” 2D sketch to help visualise what I need. For example in the picture, if the user moved to point P, I would want to calculate the distance from the origin to point X.

Any help on this would be greatly appreciated!

Last edit: June 2, 2017 08:08 AM

by molleweide

Calculating forward distance in reference to a fixed point

I would also love to know how and if this is possible do.
Moderator control