WorldViz User Forum angle conversion
 Register FAQ Search Today's Posts Mark Forums Read

#1
04-20-2004, 08:02 PM
 DSparrow Member Join Date: Apr 2004 Posts: 2
angle conversion

Hello,
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.
#2
04-21-2004, 10:52 AM
 farshizzo WorldViz Team Member Join Date: Mar 2003 Posts: 2,849
Hi,

The data coming from the inertiacube should be the yaw,pitch, and roll in degrees by default. Example:
Code:
```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!
#3
04-21-2004, 11:49 AM
 DSparrow Member Join Date: Apr 2004 Posts: 2
data question

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)
-4.51560783386
-4.51560783386
-5.21056461334
-6.53081417084
-6.53005409241
-6.64580345154
-7.05755376816
-9.14772891998
-11.3136796951
-12.8152256012
-14.2895698547
-15.4270544052
-17.0076580048
-18.5268325806
-18.4219417572
-16.7005977631
-10.3614425659

should I just ignore the negative sign?
Thanks again for the help.
#4
04-21-2004, 12:41 PM
 farshizzo WorldViz Team Member Join Date: Mar 2003 Posts: 2,849
Hi,

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:
Code:
```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.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements Vizard Precision Position Tracker (PPT) Plug-in development

All times are GMT -7. The time now is 03:50 PM.