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.
Yes, I was thinking the same thing.

Sent from my iPhone

> On Jun 18, 2014, at 22:18, Thomas Gubler <notifications@github.com> wrote:
> 
> In src/modules/sensors/sensors.cpp:
> 
> > @@ -970,7 +990,7 @@ Sensors::accel_poll(struct sensor_combined_s &raw)
> >  		orb_copy(ORB_ID(sensor_accel), _accel_sub, &accel_report);
> >  
> >  		math::Vector<3> vect(accel_report.x, accel_report.y, accel_report.z);
> > -		vect = _board_rotation * vect;
> > +		vect = _board_rotation * _board_rotation_offset * vect;
> can we precompute _board_rotation * _board_rotation_offset when one of these two changes? (same for gyro)
> 
> —
> Reply to this email directly or view it on GitHub.