uh oh
On Apr 16, 2014 6:11 AM, "luggi" <notifications@github.com> wrote:

> In src/imu.c:
>
> > @@ -276,19 +278,24 @@ static void getEstimatedAttitude(void)
> >      // If accel magnitude >1.15G or <0.85G and ACC vector outside of the limit range => we neutralize the effect of accelerometers in the angle estimation.
> >      // To do that, we just skip filter, as EstV already rotated by Gyro
> >      if (72 < (uint16_t)accMag && (uint16_t)accMag < 133) {
> > -        for (axis = 0; axis < 3; axis++)
> > -            EstG.A[axis] = (EstG.A[axis] * (float)mcfg.gyro_cmpf_factor + accSmooth[axis]) * INV_GYR_CMPF_FACTOR;
> > +        t_fp_vector tmp = { .A = { accSmooth[0], accSmooth[1], accSmooth[2] } };
> > +        if (normalizeV(&tmp.V, &tmp.V)) {
> > +            for (axis = 0; axis < 3; axis++)
> > +                EstG.A[axis] = (EstG.A[axis] * (float)mcfg.gyro_cmpf_factor + tmp.A[axis]) * INV_GYR_CMPF_FACTOR;
> > +            normalizeV(&EstG.V, &EstG.V);
>
> could impose flight behaviour as it changes the weight of the
> complementary filter.
> not a good idea without changing the cmpf values imho
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/multiwii/baseflight/pull/79/files#r11682540>
> .
>