mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 00:31:36 +08:00
Checkpoint - this is worth an AR.Drone flight test. Fixed thrust scaling in sensors for manual input, kind of fixed AR.Drone motor interface, very reliable now
This commit is contained in:
@@ -147,18 +147,18 @@ void attitude_blackmagic_init(void)
|
||||
// };
|
||||
|
||||
static m_elem kal_gain[12 * 9] = {
|
||||
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,
|
||||
0.0007f , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
|
||||
0 , 0.0007f , 0 , 0 , 0 , 0 , 0 , 0 , 0,
|
||||
0 , 0 , 0.0007f , 0 , 0 , 0 , 0 , 0 , 0,
|
||||
0 , 0 , 0 , 0.01f, 0 , 0 , 0 , 0 , 0,
|
||||
0 , 0 , 0 , 0 , 0.01f, 0 , 0 , 0 , 0,
|
||||
0 , 0 , 0 , 0 , 0 , 0.01f, 0 , 0 , 0,
|
||||
0.0000f , +0.00002f, 0 , 0 , 0, 0, 0, 0 , 0,
|
||||
-0.00002f, 0 , 0 , 0 , 0, 0, 0, 0, 0,
|
||||
0, 0 , 0 , 0, 0, 0, 0, 0, 0,
|
||||
0 , 0 , 0 , 0 , 0 , 0 , 0.6f , 0 , 0,
|
||||
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.6f , 0,
|
||||
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.6f
|
||||
0 , 0 , 0 , 0 , 0 , 0 , 0.4f , 0 , 0,
|
||||
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.4f , 0,
|
||||
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.4f
|
||||
};
|
||||
//offset update only correct if not upside down.
|
||||
|
||||
|
||||
@@ -87,9 +87,9 @@ 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) * 120;
|
||||
accel_values.y = (raw->accelerometer_m_s2[1] / 9.81f) * 120;
|
||||
accel_values.z = (raw->accelerometer_m_s2[2] / 9.81f) * 120;
|
||||
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;
|
||||
|
||||
float_vect3 mag_values;
|
||||
mag_values.x = raw->magnetometer_ga[0]*1500.0f;
|
||||
|
||||
Reference in New Issue
Block a user