diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-29 15:53:11 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-29 15:53:11 +0200 |
commit | 7cd89520cc8846e5ca00f251311e6c4a50b1f7e5 (patch) | |
tree | 87b373384315b8244edc88356cdc56324649e71f /apps/px4/attitude_estimator_bm | |
parent | 7d87f2b06e1b7ee71c132e84cfda263a5207e4d9 (diff) | |
download | px4-firmware-7cd89520cc8846e5ca00f251311e6c4a50b1f7e5.tar.gz px4-firmware-7cd89520cc8846e5ca00f251311e6c4a50b1f7e5.tar.bz2 px4-firmware-7cd89520cc8846e5ca00f251311e6c4a50b1f7e5.zip |
More black magic put into the attitude estimation - works nicely now
Diffstat (limited to 'apps/px4/attitude_estimator_bm')
-rw-r--r-- | apps/px4/attitude_estimator_bm/attitude_bm.c | 6 | ||||
-rw-r--r-- | apps/px4/attitude_estimator_bm/attitude_estimator_bm.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/apps/px4/attitude_estimator_bm/attitude_bm.c b/apps/px4/attitude_estimator_bm/attitude_bm.c index cb17a356d..29908ddd5 100644 --- a/apps/px4/attitude_estimator_bm/attitude_bm.c +++ b/apps/px4/attitude_estimator_bm/attitude_bm.c @@ -147,9 +147,9 @@ void attitude_blackmagic_init(void) // }; static m_elem kal_gain[12 * 9] = { - 0.0006f , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, - 0 , 0.0006f , 0 , 0 , 0 , 0 , 0 , 0 , 0, - 0 , 0 , 0.0006f , 0 , 0 , 0 , 0 , 0 , 0, + 0.001f , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, + 0 , 0.001f , 0 , 0 , 0 , 0 , 0 , 0 , 0, + 0 , 0 , 0.001f , 0 , 0 , 0 , 0 , 0 , 0, 0 , 0 , 0 , 0.015f, 0 , 0 , 0 , 0 , 0, 0 , 0 , 0 , 0 , 0.015f, 0 , 0 , 0 , 0, 0 , 0 , 0 , 0 , 0 , 0.015f, 0 , 0 , 0, diff --git a/apps/px4/attitude_estimator_bm/attitude_estimator_bm.c b/apps/px4/attitude_estimator_bm/attitude_estimator_bm.c index 97d7d39b7..1174a7524 100644 --- a/apps/px4/attitude_estimator_bm/attitude_estimator_bm.c +++ b/apps/px4/attitude_estimator_bm/attitude_estimator_bm.c @@ -87,14 +87,14 @@ int attitude_estimator_bm_update(struct sensor_combined_s *raw, float_vect3 *eul gyro_values.z = raw->gyro_rad_s[2]; float_vect3 accel_values; - accel_values.x = (raw->accelerometer_m_s2[0] / 9.81f) * 100; - accel_values.y = (raw->accelerometer_m_s2[1] / 9.81f) * 100; - accel_values.z = (raw->accelerometer_m_s2[2] / 9.81f) * 100; + accel_values.x = (raw->accelerometer_m_s2[0] / 9.81f) * 120; + accel_values.y = (raw->accelerometer_m_s2[1] / 9.81f) * 120; + accel_values.z = (raw->accelerometer_m_s2[2] / 9.81f) * 120; float_vect3 mag_values; - mag_values.x = raw->magnetometer_ga[0]*456.0f; - mag_values.y = raw->magnetometer_ga[1]*456.0f; - mag_values.z = raw->magnetometer_ga[2]*456.0f; + mag_values.x = raw->magnetometer_ga[0]*1500.0f; + mag_values.y = raw->magnetometer_ga[1]*1500.0f; + mag_values.z = raw->magnetometer_ga[2]*1500.0f; // static int i = 0; |