mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
update airframe to new gyro system and fix ir_i2c in sim
This commit is contained in:
@@ -19,13 +19,6 @@
|
|||||||
</load>
|
</load>
|
||||||
<load name="infrared_i2c.xml"/>
|
<load name="infrared_i2c.xml"/>
|
||||||
<load name="pbn.xml"/>
|
<load name="pbn.xml"/>
|
||||||
<!--load name="airspeed_adc.xml">
|
|
||||||
<configure name="ADC_AIRSPEED" value="ADC_4"/>
|
|
||||||
<define name="AIRSPEED_SCALE" value="1"/>
|
|
||||||
<define name="AIRSPEED_BIAS" value="0"/>
|
|
||||||
</load-->
|
|
||||||
<!--load name="airspeed_ets.xml"/>
|
|
||||||
<load name="baro_ets.xml"/-->
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<firmware name="fixedwing">
|
<firmware name="fixedwing">
|
||||||
@@ -35,9 +28,7 @@
|
|||||||
<define name="LOITER_TRIM"/>
|
<define name="LOITER_TRIM"/>
|
||||||
|
|
||||||
<target name="sim" board="pc"/>
|
<target name="sim" board="pc"/>
|
||||||
<target name="ap" board="tiny_2.11">
|
<target name="ap" board="tiny_2.11"/>
|
||||||
<configure name="FLASH_MODE" value="IAP"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<subsystem name="radio_control" type="ppm"/>
|
<subsystem name="radio_control" type="ppm"/>
|
||||||
<!--subsystem name="joystick"/-->
|
<!--subsystem name="joystick"/-->
|
||||||
@@ -47,10 +38,11 @@
|
|||||||
|
|
||||||
<!-- Actuators are automatically chosen according to board-->
|
<!-- Actuators are automatically chosen according to board-->
|
||||||
<subsystem name="control"/>
|
<subsystem name="control"/>
|
||||||
|
<subsystem name="ahrs" type="infrared"/>
|
||||||
<!-- Sensors -->
|
<!-- Sensors -->
|
||||||
<subsystem name="gps" type="ublox"/>
|
<subsystem name="gps" type="ublox"/>
|
||||||
<subsystem name="gyro" type="roll">
|
<subsystem name="imu" type="analog">
|
||||||
<configure name="ADC_GYRO_ROLL" value="ADC_5"/>
|
<configure name="GYRO_P" value="ADC_5" />
|
||||||
</subsystem>
|
</subsystem>
|
||||||
|
|
||||||
<subsystem name="current_sensor">
|
<subsystem name="current_sensor">
|
||||||
@@ -60,13 +52,12 @@
|
|||||||
<subsystem name="navigation"/>
|
<subsystem name="navigation"/>
|
||||||
</firmware>
|
</firmware>
|
||||||
|
|
||||||
|
|
||||||
<firmware name="setup">
|
<firmware name="setup">
|
||||||
<target name="tunnel" board="tiny_2.11"/>
|
<target name="tunnel" board="tiny_2.11"/>
|
||||||
<target name="setup_actuators" board="tiny_2.11"/>
|
<target name="setup_actuators" board="tiny_2.11"/>
|
||||||
</firmware>
|
</firmware>
|
||||||
|
|
||||||
<!-- commands section -->
|
|
||||||
<servos>
|
<servos>
|
||||||
<servo name="MOTOR" no="0" min="1040" neutral="1040" max="2000"/>
|
<servo name="MOTOR" no="0" min="1040" neutral="1040" max="2000"/>
|
||||||
<servo name="AILEVON_LEFT" no="2" min="1900" neutral="1500" max="1050"/>
|
<servo name="AILEVON_LEFT" no="2" min="1900" neutral="1500" max="1050"/>
|
||||||
@@ -122,12 +113,14 @@
|
|||||||
<define name="PITCH_NEUTRAL_DEFAULT" value="2." unit="deg"/>
|
<define name="PITCH_NEUTRAL_DEFAULT" value="2." unit="deg"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="GYRO" prefix="GYRO_">
|
<!-- Gyro sensitivity : -->
|
||||||
<define name="ADC_ROLL_NEUTRAL" value="487"/>
|
<!-- GYRO_ADXRS300_RESISTOR_BRIDGE value="(3.3/(3.3+1.8))" -->
|
||||||
<define name="ADXRS300_RESISTOR_BRIDGE" value="(3.3/(3.3+1.8))"/>
|
<!-- GYRO_ADXRS300_SENSITIVITY value="5" unit="mV/(deg/s)" -->
|
||||||
<define name="ADXRS300_SENSITIVITY" value="5" unit="mV/(deg/s)"/>
|
<!-- ROLL_SCALE value="RadOfDeg(3.3*1000./1024./(GYRO_ADXRS300_SENSITIVITY*GYRO_ADXRS300_RESISTOR_BRIDGE))" unit="rad/s/adc_unit" -->
|
||||||
<define name="ROLL_SCALE" value="3.3*1000./1024./(GYRO_ADXRS300_SENSITIVITY*GYRO_ADXRS300_RESISTOR_BRIDGE)" unit="deg/s/adc_unit"/>
|
<section name="IMU" prefix="IMU_">
|
||||||
<define name="ROLL_DIRECTION" value="1."/>
|
<define name="GYRO_P_SIGN" value="1"/>
|
||||||
|
<define name="GYRO_P_NEUTRAL" value="487"/>
|
||||||
|
<define name="GYRO_P_SENS" value="0.0173851" integer="16"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="BAT">
|
<section name="BAT">
|
||||||
|
|||||||
@@ -121,10 +121,7 @@ void infrared_i2c_update( void ) {
|
|||||||
ir_i2c_data_ver_available = FALSE;
|
ir_i2c_data_ver_available = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /* SITL || HITL */
|
#endif /* SITL || HITL */
|
||||||
/** ir_roll and ir_pitch set by simulator in sim_ir.c */
|
|
||||||
estimator_update_state_infrared();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FilterIR(_ir_prev, _ir_next) (((1<<ir_i2c_conf_word)*_ir_prev + _ir_next) / ((1<<ir_i2c_conf_word) + 1))
|
#define FilterIR(_ir_prev, _ir_next) (((1<<ir_i2c_conf_word)*_ir_prev + _ir_next) / ((1<<ir_i2c_conf_word) + 1))
|
||||||
|
|||||||
Reference in New Issue
Block a user