1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

correction of calculation for throttle angle correction (should really just replace with cosf() at some point

This commit is contained in:
dongie 2013-11-26 11:31:23 +09:00
parent 4790bfc451
commit 4972770907

View file

@ -315,7 +315,7 @@ static void getEstimatedAttitude(void)
acc_calc(deltaT); // rotate acc vector into earth frame
if (cfg.throttle_angle_correction) {
int cosZ = EstG.V.Z / acc_1G * 100.0f;
int cosZ = EstG.V.Z / (acc_1G * 100.0f);
throttleAngleCorrection = cfg.throttle_angle_correction * constrain(100 - cosZ, 0, 100) / 8;
}
}