View Full Version : angle conversion

04-20-2004, 07:02 PM
For an experiment my team is conducting, we need to analyze data in the form of degrees. Is there any way to get the data from an Intersense Inertiacube to convert to degrees in Vizard? If so how can this be done? Any help at all is greatly appreciated.

04-21-2004, 09:52 AM

The data coming from the inertiacube should be the yaw,pitch, and roll in degrees by default. Example:isense = viz.add('intersense.dls')

data = isense.get()
yaw = data[3]
pitch = data[4]
roll = data[5]There is an option to have the inertiacube return quaternions, but if you didn't explicitly set that option, then it should be returning degrees by default. Let me know if the above code still doesn't return degrees. Good luck!

04-21-2004, 10:49 AM
I have been using the code, but the data i get in return is in negative numbers. Specifically, we are looking at the pitch, data[4] from the array i think, but it returns the following from a resting position with the person wearing the HMD loking up :
-4.51560783386 (resting point)

should I just ignore the negative sign?
Thanks again for the help.

04-21-2004, 11:41 AM

Is the inertiacube linked to a viewpoint? If it is, have you tried getting the euler angles from the viewpoint instead of the inertiacube. Example:euler = viz.get(viz.VIEW_EULER)
yaw = euler[0]
pitch = euler[1]
roll = euler[2]This method might return some more reasonable values. The problem with euler angles is that multiple combinations of (yaw,pitch,roll) can return the same orientation. So sometimes you can get pretty strange values.