Browse Source

Hotfix: Rely on gyro calibration

sbg
Lorenz Meier 12 years ago
parent
commit
87f7ebdd75
  1. 26
      src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp

26
src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp

@ -308,18 +308,20 @@ const unsigned int loop_interval_alarm = 6500; // loop interval in microseconds
orb_copy(ORB_ID(sensor_combined), sub_raw, &raw); orb_copy(ORB_ID(sensor_combined), sub_raw, &raw);
if (!initialized) { if (!initialized) {
// XXX disabling init for now
gyro_offsets[0] += raw.gyro_rad_s[0]; initialized = true;
gyro_offsets[1] += raw.gyro_rad_s[1];
gyro_offsets[2] += raw.gyro_rad_s[2]; // gyro_offsets[0] += raw.gyro_rad_s[0];
offset_count++; // gyro_offsets[1] += raw.gyro_rad_s[1];
// gyro_offsets[2] += raw.gyro_rad_s[2];
if (hrt_absolute_time() - start_time > 3000000LL) { // offset_count++;
initialized = true;
gyro_offsets[0] /= offset_count; // if (hrt_absolute_time() - start_time > 3000000LL) {
gyro_offsets[1] /= offset_count; // initialized = true;
gyro_offsets[2] /= offset_count; // gyro_offsets[0] /= offset_count;
} // gyro_offsets[1] /= offset_count;
// gyro_offsets[2] /= offset_count;
// }
} else { } else {

Loading…
Cancel
Save