Abstract:
A method for compensating for a misalignment angle between an accelerometer and a magnetometer includes applying a corrective rotation to collected accelerometer data or magnetometer data based on an estimated misalignment angle between an axis of the accelerometer and an axis of the magnetometer. The method further includes estimating a gravity vector using the corrected accelerometer data and estimating a magnetic field vector using the corrected magnetometer data. Additionally, the method includes calculating a characteristic that is a function of a calculated angle between the estimated gravity vector and the estimated magnetic field. The method also includes calculating a figure of merit over the plurality of times that is a function of the characteristic, and dynamically adjusting the estimated misalignment angle during ordinary use of the electronic device such that the figure of merit converges to a value as the electronic device rotates.
Abstract:
A method for calibrating an accelerometer of an electronic device to reduce an error of the accelerometer includes estimating a gravity vector using the accelerometer and a magnetic field vector using a magnetometer at a plurality of times. The method also includes calculating a characteristic that is a function of an angle between the estimated gravity vector and the estimated magnetic field at each of the plurality of times. Additionally, the method includes calculating a figure of merit over the plurality of times that is a function of the characteristic. The method includes dynamically adjusting a calibration parameter of the accelerometer during ordinary use of the electronic device such that the figure of merit is minimized. Adjusting the calibration parameter reduces the error of the accelerometer. A system can include a accelerometer, a magnetometer, a processor, and a memory having instructions to execute the calibration method on the processor.
Abstract:
A system and method for estimating angular velocity are provided. The system and method use an accelerometer and magnetometer to estimate an angular velocity in place of a gyroscope in 9-axis sensor fusion to estimate angular orientation. The final angular velocity estimate is constructed from two partially independent angular velocity estimates, one using only magnetometer measurements and the other using only accelerometer measurements. The unobservable portion of each partial angular velocity estimate is provided by a projection from a third complete estimate that uses both accelerometer and magnetometer data.