LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

quanterion to yaw pitch roll

Hi!
I'm working on a VI to controll a quadcopter.

I get my feedback from Optitrack's TrackingTools, so the quadcopter's orientation is given in quanterion. is there an easy way to get the quad's pitch, yaw and roll?
I tried writing a subVI to convert quanterion to euyler angles but got the orientation in a fixed axes system, rather then in an axes system which rotates with the quad.

 

I'd really appriciate any feedback, wether a ready made vi or suggestions regarding how to create one.

 

Thanks!

0 Kudos
Message 1 of 3
(3,250 Views)

OK, this answer falls at the outermost limits of available memory (mine not the computer's) but a few years back I was working on an aero project and the math is not very hard. At the time I had access to a book that explained in simple terms (and I needed very simple terms indeed) how to do it.

Try Googling "convert quaternion to pitch yaw roll" there are many examples of how to do it. I remember that when I wrote a VI to do it I used a formula node to do the calculation because it made it easier to verify that I got it implemented right.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(3,215 Views)

thanks a lot for your comment!

I actually just solved the problem a minute ago- after converting the quanternions to euler angles using a formula I found on the net, the trick was to rotate the angular state vector by 'yaw' degrees around the z axis.

 

The two VI's I built are attached in case anyone should search for something like that in the future

Message 3 of 3
(3,205 Views)