|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Class ADXRS450_Gyro output angles?
We're using the AD XRS450 gyro module from the KOP this year. We need to know how the angles are output (we're using LabView) from this WPI library function. According to the C++ documentation the get_angle method returns an angle that continues from 360 to 361 and so forth. If so then our drive straight routine will need some pre-processing of the angle data before we use it. I don't want to invent something that might not be needed.
Can anyone verify that the ADXRD450 GetAngle() method does indeed output angles in the 0-360 degree and beyond range? |
|
#2
|
||||
|
||||
|
Re: Class ADXRS450_Gyro output angles?
Quote:
(Disclaimer: We use Java, but that shouldn't matter) |
|
#3
|
||||
|
||||
|
Re: Class ADXRS450_Gyro output angles?
The angle is continuous, there is no code to wrap in the ADXRS library (so 360 to 361, or on the other hand, 0 to -1 etc). I attached the portion of code that does the actual accumulation which shows this is the case.
|
|
#4
|
||||
|
||||
|
Re: Class ADXRS450_Gyro output angles?
Thanks for verifying this for me. And thanks for the heads-up about the -360 degree aspect. I need to check to see if the pre-processing accounts for that possibility.
|
|
#5
|
||||
|
||||
|
Re: Class ADXRS450_Gyro output angles?
Quote:
Thanks, this explains a lot. |
|
#6
|
||||
|
||||
|
Re: Class ADXRS450_Gyro output angles?
You don't need to invent anything when dealing with a continuous angle sensor. It's already been invented. The IEEEremainder function (supported in Java and C++) can take any angle and convert it to the range -180 to +180 You can also use it to find the shortest angle (magnitude and sign) between a setpoint and a process variable. |
|
#7
|
||||
|
||||
|
Re: Class ADXRS450_Gyro output angles?
Quote:
However I believe the FPGA implementation is also all done in LabVIEW using LabVIEW FPGA. Due to the parallel nature of LabVIEW it actually lends itself quite well to being compiled onto the FPGA. Last edited by wt200999 : 23-01-2017 at 18:08. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|