aboutsummaryrefslogtreecommitdiff
path: root/apps/px4/attitude_estimator_bm/attitude_estimator_bm.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/px4/attitude_estimator_bm/attitude_estimator_bm.c')
-rw-r--r--apps/px4/attitude_estimator_bm/attitude_estimator_bm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/px4/attitude_estimator_bm/attitude_estimator_bm.c b/apps/px4/attitude_estimator_bm/attitude_estimator_bm.c
index c917ff7b2..feaed6695 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;
- accel_values.y = raw->accelerometer_m_s2[1] * 9.81f;
- accel_values.z = raw->accelerometer_m_s2[2] * 9.81f;
+ accel_values.x = raw->accelerometer_m_s2[0] * 9.81f * 9.0f;
+ accel_values.y = raw->accelerometer_m_s2[1] * 9.81f * 9.0f;
+ accel_values.z = raw->accelerometer_m_s2[2] * 9.81f * 9.0f;
float_vect3 mag_values;
- mag_values.x = raw->magnetometer_ga[0]*100.0f;
- mag_values.y = raw->magnetometer_ga[1]*100.0f;
- mag_values.z = raw->magnetometer_ga[2]*100.0f;
+ mag_values.x = raw->magnetometer_ga[0]*510.0f;
+ mag_values.y = raw->magnetometer_ga[1]*510.0f;
+ mag_values.z = raw->magnetometer_ga[2]*510.0f;
attitude_blackmagic(&accel_values, &mag_values, &gyro_values);