mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 20:38:27 +08:00
some unimportant work on ahrs....
This commit is contained in:
@@ -8,6 +8,12 @@
|
||||
<define name="ADC_ROLL_DOT_SIGN" value="+"/>
|
||||
<define name="ADC_PITCH_DOT_SIGN" value="-"/>
|
||||
<define name="ADC_YAW_DOT_SIGN" value="-"/>
|
||||
<define name="ADC_ROLL_DOT_ZERO" value="512"/>
|
||||
<define name="ADC_PITCH_DOT_ZERO" value="512"/>
|
||||
<define name="ADC_YAW_DOT_ZERO" value="512"/>
|
||||
<define name="ADC_ROLL_DOT_SCALE" value="(real_t) (0.9444 * 3.14159 / 180.0)"/>
|
||||
<define name="ADC_PITCH_DOT_SCALE" value="(real_t) (0.9444 * 3.14159 / 180.0)"/>
|
||||
<define name="ADC_YAW_DOT_SCALE" value="(real_t) (0.9444 * 3.14159 / 180.0)"/>
|
||||
<define name="ADC_ACCELX" value="3"/>
|
||||
<define name="ADC_ACCELY" value="4"/>
|
||||
<define name="ADC_ACCELZ" value="5"/>
|
||||
@@ -17,6 +23,10 @@
|
||||
<define name="ADC_ACCELX_ZERO" value="0x24A"/>
|
||||
<define name="ADC_ACCELY_ZERO" value="0x280"/>
|
||||
<define name="ADC_ACCELZ_ZERO" value="0x210"/>
|
||||
<define name="ADC_ACCELX_SCALE" value="0x24A"/>
|
||||
<define name="ADC_ACCELY_SCALE" value="0x280"/>
|
||||
<define name="ADC_ACCELZ_SCALE" value="0x210"/>
|
||||
|
||||
</section>
|
||||
<section name="RATE_LOOP">
|
||||
<define name="ROLL_DOT_PGAIN" value="-192."/>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* frequency with which ahrs_state_update() is called with the body
|
||||
* angular rates.
|
||||
*/
|
||||
#define dt 0.04
|
||||
#define dt 0.05 //0.04
|
||||
|
||||
#define CONFIG_SPLIT_COVARIANCE
|
||||
#ifdef CONFIG_SPLIT_COVARIANCE
|
||||
@@ -66,8 +66,8 @@
|
||||
//#define IMU_INIT_EULER_DOT_VARIANCE_MAX 2
|
||||
//#define IMU_INIT_EULER_DOT_NB_SAMPLES_MIN 10
|
||||
|
||||
#define GYRO_SCALE (real_t) (0.9444 * 3.14159 / 180.0)
|
||||
#define GYRO_ZERO 0x200
|
||||
//#define GYRO_SCALE (real_t) (0.9444 * 3.14159 / 180.0)
|
||||
//#define GYRO_ZERO 0x200
|
||||
|
||||
|
||||
/*
|
||||
@@ -1029,9 +1029,10 @@ void ahrs_save_pqr_from_fbw( void )
|
||||
{
|
||||
//we take the gyro data from the spi data
|
||||
//No transformation is needed for pqr
|
||||
pqr[0] = from_fbw.euler_dot[0];
|
||||
pqr[1] = from_fbw.euler_dot[1];
|
||||
pqr[2] = from_fbw.euler_dot[2];
|
||||
//FBW not scale the data for the moment so we transform here
|
||||
pqr[0] = from_fbw.euler_dot[0] /** IMU_ADC_ROLL_DOT_SIGN IMU_ADC_ROLL_DOT_SCALE*/;
|
||||
pqr[1] = from_fbw.euler_dot[1] /** IMU_ADC_PITCH_DOT_SIGN IMU_ADC_PITCH_DOT_SCALE*/;
|
||||
pqr[2] = from_fbw.euler_dot[2] /** IMU_ADC_YAW_DOT_SIGN IMU_ADC_YAW_DOT_SCALE*/;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user