getRate(), Omnimount

19 views
Skip to first unread message

Tim Wilson

unread,
Mar 12, 2017, 9:16:16 PM3/12/17
to navx-mxp

Our Roborio is mounted vertically so we used Omnimount to re-orient the navX-MXP yaw axis. getAngle() works great, very stable & accurate, so thanks for that. BUT, I noticed that getRate() isn't reading correctly -- very low values ~2-3 when the robot is spinning around ~1 rev every 5 secs, ~72 deg/sec . I tried the 3 getRawGyro calls and got a significant signal only on getRawGyroZ(). BUT the value returned by getRawGyroZ() is obviously not degrees per sec, it's about a factor of 9 high -- i.e. return value is about 600 for the 72 deg/sec experiment. 

Not a huge deal since we mostly depend on getAngle() but I'm wondering if I'm missing something. 

Jeff Hutchison

unread,
Feb 24, 2018, 8:20:29 AM2/24/18
to navx-mxp
In testing getRate() yesterday, we noticed the same. Javadocs say it returns deg/sec but looking at the code, it returns deg/update. Can you confirm that the period of this update is the same as returned by getActualUpdateRate()?

admin

unread,
Feb 26, 2018, 10:47:54 AM2/26/18
to navx-mxp
Yes, getActualUpdateRate() is the actual clockrate used to generate data samples. It is not necessarily exactly what the user requested, since it needs to be rounded to the nearest available clock frequency setting.

Note that you can also use the getRawGyroX/Y/Z()methods of the AHRS class to return the exact rate of rotation from each individual gyro - these values are in degrees per second. If you use these methods, be sure to install the latest libraries for RoboRIO.

Reply all
Reply to author
Forward
0 new messages