OSP Quadrocopter ACC/stable mode

Today I did my first outdoor testflight with the newly implemented ACC/stable-mode. ACC means it uses a accelerator sensor to level the quadrocopter if nick/roll stick is in middle position. Another mode is Heading Hold (HH) which means the copter hold its attitude if nick/roll stick is in middle position. For the HH mode only gyros are nessesary and the copter do not need to know where the bottom is. On the OSP you can switch between both modes while flying.

This is an easy and basic implementation of the ACC mode. Fusion of the gyro and acc sensor values are done with the following code.
int angle_diff_nick=IMU_CalcData.acc_angle_nick-CTRL_FlightParams.reserved[ACC_TRIM_NICK]-IMU_CalcData.angle_nick;
angle_diff_nick*=CTRL_FlightParams.approach_speed;
angle_diff_nick/=1000;
IMU_CalcData.angle_nick+=angle_diff_nick;