|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#13
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
Due to several issues found in the invensense "motion processing library" (MPL), the rest of the work is performed on the very capable STM32F4 processor by Kauai Labs code. After acquiring a quaternion (line 596), this code in MPU9250/mpucontroller.cpp: - transforms the quaternion to yaw/pitch/roll - calculates the gravity vector from the quaternion, and subtracts that from the accelerometer data to yield linear acceleration. - acquires periodic magnetometer samples, time-averaging to reduce noise - applies magnetometer calibration to the raw magnetometer data to get a compass heading - tilt-corrects the compass heading based on the pitch/roll - calculates the "fused (9-axis) heading" from the yaw and the tilt-corrected, calibrated compass heading Then, in the navx-mxp/navx-mxp.cpp nav10_main(), it: - maintains statistics of linear acceleration to detect motion/no-motion - maintains a yaw history, to detect if rotating - if in startup calibration period, and not moving and not rotating, calculates a yaw offset, which is removed from subsequent yaw values - sends out updates, updates registers, and processes inbound requests You'll also come across some work-in-progress code for building and applying a temperature-compensation gyro bias which should someday completely eliminate the automatic gyro calibration after sufficient temp/bias values have been acquired and stored to flash memory. Last edited by slibert : 23-01-2015 at 14:24. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|