02-27-2017 02:02 AM
Hi, i am trying to get rotation angle of my robot with PmodCMPS. But i have only 3 coords X, Y and Z and don`t know what to do with it. How can i convert this coords to global rotation angle? I am using default example for compass in "Part II - NI myRIO Mechatronics Kit"
02-28-2017 08:44 AM
Just for clarification, are you wanting to convert the x, y, and z (Cartesian) coordinates to spherical coordinates? If so, there is a VI that you can use for that:
3D Coordinate Conversion VI
http://zone.ni.com/reference/en-XX/help/371361J-01/gmath/3d_coordinate_conversion/
It is under Mathematics > Geometry.
02-28-2017 08:22 PM
I just want to get angle to the global North to create rotation on some value of degrees for my robot. It`s like if I want to rotate on 90 degrees I have to move my motors and getting value from compass while delta of degrees is less then 90. Or maybe you have some better ideas how to rotate my robot? (I think getting value from encoders is not right way because it`s not too accurate if I will change size between wheels)
Thank you for your help
03-01-2017 05:35 PM
I actually haven't worked with the PmodCMPS before, so I may need to do a bit more research. In the meantime, have you taken a look at any of these examples?
Pmod CMPS
https://reference.digilentinc.com/reference/pmod/pmodcmps/start