|
机身系统文件类型模板 | <!DOCTYPE airframe SYSTEM "../../airframe.dtd"> |
| <!-- |
备注 | Apogee test board |
| |
| |
机身名定义起始 | <airframe name="Apogee"> |
| |
固件类型 定义起始 | <firmware name="fixedwing"> |
| <configure name="RTOS_DEBUG" value="1"/> |
| |
编译固件目标定义
| <target name="ap" board="apogee_1.0_chibios"> |
| <module name="radio_control" type="sbus"/> |
| <configure name="PERIODIC_FREQUENCY" value="100"/> |
| </target> |
编译模拟目标定义
| <target name="sim" board="pc"> |
| <module name="radio_control" type="ppm"/> |
| </target> |
| |
| <define name="USE_I2C1"/> |
| <!--define name="USE_I2C2"/--> |
| <!--define name="AGR_CLIMB"/--> |
| <!--define name="LOITER_TRIM"/--> |
| <!--define name="PITCH_TRIM"/--> |
| |
| <!-- Communication --> |
| <module name="telemetry" type="xbee_api"/> |
| <module name="tlsf"/> |
| <module name="pprzlog"/> |
| <module name="logger" type="sd_chibios"/> |
| <module name="flight_recorder"/> |
| |
| <!-- Actuators are automatically chosen according to board--> |
| <module name="imu" type="apogee"/> |
| <module name="ahrs" type="float_dcm"/> |
| <module name="ins" type="alt_float"/> |
| <module name="control"/> |
| <module name="navigation"/> |
| <!-- Sensors --> |
| <module name="gps" type="ublox"/> |
| |
| <!--module name="sys_mon"/--> |
| |
| <!--module name="spi_master"/--> |
| <!-- <module name="mcp355x"> --> |
| <!-- <define name="USE_SPI1"/> --> |
| <!-- </module> --> |
| <!--module name="extra_dl"> |
| <configure name="EXTRA_DL_PORT" value="UART6"/> |
| <configure name="EXTRA_DL_BAUD" value="B57600"/> |
| </module> |
| <module name="meteo_france_DAQ"/--> |
固件类型 定义结束 | </firmware> |
| |
| <firmware name="test_chibios"> |
| <target name="test_sys_time_timer" board="apogee_1.0_chibios"/> |
| <target name="test_led" board="apogee_1.0_chibios"/> |
| <target name="test_sys_gpio" board="apogee_1.0_chibios"/> |
| </firmware> |
| |
| <!-- commands section --> |
伺服输出通道
| <servos> |
| <servo name="MOTOR" no="0" min="1040" neutral="1040" max="2000"/> |
| <servo name="AILEVON_LEFT" no="1" min="1900" neutral="1543" max="1100"/> |
| <servo name="AILEVON_RIGHT" no="2" min="1100" neutral="1561" max="1900"/> |
| </servos> |
| |
固定翼三轴控制设定
| <commands> |
油门安全保护值设定
| <axis name="THROTTLE" failsafe_value="0"/> |
横滚安全保护值设定
| <axis name="ROLL" failsafe_value="0"/> |
俯仰安全保护值设定
| <axis name="PITCH" failsafe_value="0"/> |
| </commands> |
| |
手动控制设定
| <rc_commands> |
| <set command="THROTTLE" value="@THROTTLE"/> |
| <set command="ROLL" value="@ROLL"/> |
| <set command="PITCH" value="@PITCH"/> |
| </rc_commands> |
| |
混控设置
| <section name="MIXER"> |
| <define name="AILEVON_AILERON_RATE" value="0.75"/> |
| <define name="AILEVON_ELEVATOR_RATE" value="0.75"/> |
| </section> |
| |
控制率设置
| <command_laws> |
| <let var="aileron" value="@ROLL * AILEVON_AILERON_RATE"/> |
| <let var="elevator" value="@PITCH * AILEVON_ELEVATOR_RATE"/> |
| <set servo="MOTOR" value="@THROTTLE"/> |
| <set servo="AILEVON_LEFT" value="$elevator - $aileron"/> |
| <set servo="AILEVON_RIGHT" value="$elevator + $aileron"/> |
| </command_laws> |
| |
自动1状态设定
| <section name="AUTO1" prefix="AUTO1_"> |
| <define name="MAX_ROLL" value="0.85"/> |
| <define name="MAX_PITCH" value="0.6"/> |
| </section> |
| |
IMU 设定
| <section name="IMU" prefix="IMU_"> |
| <!-- Calibration Neutral --> |
陀螺三轴中立位设定
| <define name="GYRO_P_NEUTRAL" value="0"/> |
| <define name="GYRO_Q_NEUTRAL" value="0"/> |
| <define name="GYRO_R_NEUTRAL" value="0 "/> |
| |
加速度三轴中立位设定
| <define name="ACCEL_X_NEUTRAL" value="0"/> |
| <define name="ACCEL_Y_NEUTRAL" value="0"/> |
| <define name="ACCEL_Z_NEUTRAL" value="0"/> |
| |
机身和IMU偏差修正
| <define name="BODY_TO_IMU_PHI" value="0"/> |
| <define name="BODY_TO_IMU_THETA" value="0"/> |
| <define name="BODY_TO_IMU_PSI" value="0"/> |
| </section> |
| |
| |