Subversion Repositories FlightCtrl

Rev

Rev 2062 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2062 Rev 2065
Line 170... Line 170...
170
          >> LOG_MATH_UNIT_FACTOR);
170
          >> LOG_MATH_UNIT_FACTOR);
Line 171... Line 171...
171
 
171
 
172
  ACYawRate =
172
  ACYawRate =
173
      ((int32_t) rate_ATT[PITCH] * sinroll + (int32_t) yawRate * cosroll)
173
      ((int32_t) rate_ATT[PITCH] * sinroll + (int32_t) yawRate * cosroll)
174
          / cospitch;
-
 
175
 
-
 
176
  ACYawRate =
-
 
177
      ((int32_t) rate_ATT[PITCH] * sinroll + (int32_t) yawRate * cosroll)
-
 
178
          / cospitch;
174
          / cospitch;
Line 179... Line 175...
179
}
175
}
180
 
176
 
181
// 480 usec with axis coupling - almost no time without.
177
// 480 usec with axis coupling - almost no time without.
Line 212... Line 208...
212
    }
208
    }
213
  }
209
  }
214
}
210
}
Line 215... Line 211...
215
 
211
 
216
void correctIntegralsByAcc0thOrder_old(void) {
-
 
217
  // TODO: Consider changing this to: Only correct when integrals are less than ...., or only correct when angular velocities
-
 
218
  // are less than ....., or reintroduce Kalman.
-
 
219
  // Well actually the Z axis acc. check is not so silly.
212
void correctIntegralsByAcc0thOrder_old(void) {
220
  uint8_t axis;
213
  uint8_t axis;
Line 221... Line 214...
221
  int32_t temp;
214
  int32_t temp;
222
 
215
 
Line 230... Line 223...
230
  }
223
  }
Line 231... Line 224...
231
 
224
 
232
  if (accVector <= staticParams.maxAccVector) {
225
  if (accVector <= staticParams.maxAccVector) {
Line 233... Line 226...
233
    debugOut.digital[0] &= ~DEBUG_ACC0THORDER;
226
    debugOut.digital[0] &= ~DEBUG_ACC0THORDER;
234
 
227
 
Line 235... Line 228...
235
    uint8_t permilleAcc = staticParams.zerothOrderCorrection;
228
    uint8_t permilleAcc = staticParams.zerothOrderCorrection / 8;
236
    int32_t accDerived;
229
    int32_t accDerived;
237
 
230