PX4/Firmware — pull request #1063 by pigeonhunter (2014-06-18 13:56:40+00:00)
Title: Offset tuning implemented in sensors app

A continuation of the issue I tried to address with pull request https://github.com/PX4/Firmware/pull/1062 re-implemented based on Anton's advice via the sensors app. The gist of it is that the sensors app now accepts user-supplied x, y, and z rotational offset parameters, converts them to a rotation matrix and applies them to the raw sensor data just prior to publishing. These allow in-flight fine tuning of board and/or calibration placement errors. Because the rotations are applied to the raw sensor outputs, they should work for all attitude estimators.

New param names are SENS_BOARD_X_OFF, SENS_BOARD_Y_OFF, and SENS_BOARD_Z_OFF.

It's still a WIP. Need correctness review, and flight testing, but so far it seems to work well.
I have been able to alter the params and watch the kalman filter (slowly) apply the adjustments in QGC.

nsh> perf
sensor task update: 174063 events, 16994804us elapsed, 97 avg, min 53us max 2609us\

Feel free to take it for a whirl.