diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-31 11:38:29 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-31 11:38:29 +0200 |
commit | 87f7ebdd75ac11139f7b1ae568590ab1eabbd45c (patch) | |
tree | 272748bb8fa8625c3a27482c34e6d20add9989a4 /src | |
parent | fb4ca82b84c5c49a968cdaf7a9fa8098a9ed9e15 (diff) | |
download | px4-firmware-87f7ebdd75ac11139f7b1ae568590ab1eabbd45c.tar.gz px4-firmware-87f7ebdd75ac11139f7b1ae568590ab1eabbd45c.tar.bz2 px4-firmware-87f7ebdd75ac11139f7b1ae568590ab1eabbd45c.zip |
Hotfix: Rely on gyro calibration
Diffstat (limited to 'src')
-rwxr-xr-x | src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp b/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp index 65abcde1e..a70a14fe4 100755 --- a/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp +++ b/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); if (!initialized) { - - gyro_offsets[0] += raw.gyro_rad_s[0]; - gyro_offsets[1] += raw.gyro_rad_s[1]; - gyro_offsets[2] += raw.gyro_rad_s[2]; - offset_count++; - - if (hrt_absolute_time() - start_time > 3000000LL) { - initialized = true; - gyro_offsets[0] /= offset_count; - gyro_offsets[1] /= offset_count; - gyro_offsets[2] /= offset_count; - } + // XXX disabling init for now + initialized = true; + + // gyro_offsets[0] += raw.gyro_rad_s[0]; + // gyro_offsets[1] += raw.gyro_rad_s[1]; + // gyro_offsets[2] += raw.gyro_rad_s[2]; + // offset_count++; + + // if (hrt_absolute_time() - start_time > 3000000LL) { + // initialized = true; + // gyro_offsets[0] /= offset_count; + // gyro_offsets[1] /= offset_count; + // gyro_offsets[2] /= offset_count; + // } } else { |