Conf cleaning (#2327)

* [cleaning] remove PBN module
* [cleaning] remove ENOSE module
* [cleaning] update ENAC conf

* Cleaning on flight plans

* [cleaning] clean example and test conf

* add gazebo to the install step and compile example airframe
This commit is contained in:
Gautier Hattenberger
2018-09-27 11:15:27 +02:00
committed by GitHub
parent f264db7a34
commit 26b66809b0
51 changed files with 54 additions and 3062 deletions

1
.gitmodules vendored
View File

@@ -41,7 +41,6 @@
[submodule "sw/ext/tudelft_gazebo_models"]
path = sw/ext/tudelft_gazebo_models
url = https://github.com/tudelft/gazebo_models.git
shallow = true
[submodule "sw/ext/eigen"]
path = sw/ext/eigen
url = https://github.com/eigenteam/eigen-git-mirror.git

View File

@@ -7,9 +7,11 @@ compiler:
before_install:
- sudo add-apt-repository ppa:paparazzi-uav/ppa -y
- sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa -y
- sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
- wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
- sudo apt-get update -q
install:
- sudo apt-get install -y --force-yes paparazzi-dev paparazzi-jsbsim gcc-arm-embedded gcc-arm-linux-gnueabi libipc-run-perl rustc cargo
- sudo apt-get install -y --force-yes paparazzi-dev paparazzi-jsbsim gcc-arm-embedded gcc-arm-linux-gnueabi libipc-run-perl rustc cargo libgazebo7-dev
script:
- arm-none-eabi-gcc --version
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then make test_all_confs; else make test; fi; fi

View File

@@ -21,28 +21,6 @@
settings_modules="modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps_ubx_ucenter.xml modules/gps.xml modules/imu_common.xml"
gui_color="yellow"
/>
<aircraft
name="ARD2_104"
ac_id="104"
airframe="airframes/ENAC/quadrotor/ard2_basic_adhoc.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/estimation/ins_float_invariant.xml"
settings_modules="modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps_ubx_ucenter.xml modules/gps.xml modules/imu_common.xml"
gui_color="pink"
/>
<aircraft
name="BEBOP_201"
ac_id="201"
airframe="airframes/ENAC/quadrotor/bebop_201.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="#ffff00000000"
/>
<aircraft
name="BLACK_CAT"
ac_id="2"
@@ -55,15 +33,15 @@
gui_color="white"
/>
<aircraft
name="BLENDER"
ac_id="3"
airframe="airframes/ENAC/quadrotor/blender.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/rotorcraft_cam.xml modules/switch_servo.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="#3cf2d51335a7"
name="CHIMERA"
ac_id="23"
airframe="airframes/ENAC/fixed-wing/chimera.xml"
radio="radios/T10CG_SBUS.xml"
telemetry="telemetry/fixedwing_flight_recorder.xml"
flight_plan="flight_plans/basic.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/airspeed_ms45xx_i2c.xml modules/air_data.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_full_pid_fw.xml modules/stabilization_adaptive_fw.xml modules/ahrs_float_dcm.xml modules/imu_common.xml"
gui_color="#fdeb90060000"
/>
<aircraft
name="CYFOAM"
@@ -76,17 +54,6 @@
settings_modules="modules/guidance_indi.xml modules/stabilization_indi.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/air_data.xml modules/imu_common.xml modules/airspeed_ms45xx_i2c.xml"
gui_color="#ffff7f7f0000"
/>
<aircraft
name="FJ2"
ac_id="8"
airframe="airframes/ENAC/fixed-wing/funjet2.xml"
radio="radios/T10CG_SBUS.xml"
telemetry="telemetry/fixedwing_flight_recorder.xml"
flight_plan="flight_plans/basic.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/gps.xml modules/nav_basic_fw.xml modules/guidance_full_pid_fw.xml modules/stabilization_adaptive_fw.xml modules/ahrs_float_dcm.xml modules/imu_common.xml"
gui_color="#0000fffff0ed"
/>
<aircraft
name="G1"
ac_id="9"
@@ -109,39 +76,6 @@
settings_modules="[modules/gps_ubx_ucenter.xml] modules/gps.xml modules/nav_basic_fw.xml modules/guidance_full_pid_fw.xml modules/stabilization_adaptive_fw.xml modules/airspeed_adc.xml modules/imu_common.xml modules/ahrs_float_dcm.xml"
gui_color="#ffff7d7d0000"
/>
<aircraft
name="LADY"
ac_id="18"
airframe="airframes/ENAC/quadrotor/ladybird_lisa_s.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/superbitrf.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps_ubx_ucenter.xml modules/gps.xml modules/imu_common.xml"
gui_color="#ffff7f7f0000"
/>
<aircraft
name="MERLIN"
ac_id="13"
airframe="airframes/ENAC/fixed-wing/merlin.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing.xml"
flight_plan="flight_plans/basic.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/nav_basic_fw.xml modules/gps.xml [modules/infrared_adc.xml] modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="#feed4f854f85"
/>
<aircraft
name="MJ6"
ac_id="14"
airframe="airframes/examples/microjet.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing.xml"
flight_plan="flight_plans/basic.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/nav_survey_poly_osam.xml modules/nav_smooth.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/infrared_adc.xml modules/gps.xml modules/imu_common.xml modules/tune_airspeed.xml"
gui_color="#ffffac1f0000"
/>
<aircraft
name="WEASEL"
ac_id="19"

View File

@@ -8,25 +8,17 @@
Digital camera
-->
<airframe name="Funjet II">
<airframe name="CRRCSIM demo">
<firmware name="fixedwing">
<define name="USE_I2C0"/>
<define name="USE_I2C1"/>
<define name="AGR_CLIMB"/>
<define name="LOITER_TRIM"/>
<define name="USE_AIRSPEED"/>
<target name="sim" board="pc">
<module name="imu" type="umarim"/>
</target>
<target name="nps" board="pc">
<module name="fdm" type="crrcsim"/>
<module name="imu" type="nps"/>
</target>
<target name="ap" board="umarim_lite_2.0">
<module name="imu" type="umarim"/>
</target>
<module name="radio_control" type="ppm"/>
@@ -47,15 +39,6 @@
</module>
<module name="navigation"/>
<!--module name="light">
<define name="LIGHT_LED_STROBE" value="5"/>
<define name="LIGHT_LED_NAV" value="3"/>
</module-->
<!--module name="baro_board">
<define name="BARO_ABS_EVENT" value="BaroPbnUpdate"/>
</module-->
<module name="pbn"/>
</firmware>
<servos>

View File

@@ -1,247 +0,0 @@
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
<!-- Funjet Multiplex (http://www.multiplex-rc.de/)
Apogee 1.0
Radiotronix modem
UBX GPS
Airspeed sensor
Digital camera
-->
<airframe name="Funjet II">
<firmware name="fixedwing">
<configure name="PERIODIC_FREQUENCY" value="125"/>
<target name="ap" board="apogee_1.0">
<module name="radio_control" type="sbus"/>
</target>
<target name="sim" board="pc">
<module name="radio_control" type="ppm"/>
</target>
<!-- Communication -->
<module name="telemetry" type="transparent"/>
<!-- Actuators are automatically chosen according to board-->
<module name="imu" type="apogee">
<!--define name="USE_MAGNETOMETER"/-->
<define name="APOGEE_LOWPASS_FILTER" value="MPU60X0_DLPF_20HZ"/>
<define name="APOGEE_SMPLRT_DIV" value="7"/>
</module>
<!--module name="ins" type="float_invariant">
<configure name="AHRS_PROPAGATE_FREQUENCY" value="125"/>
<configure name="AHRS_CORRECT_FREQUENCY" value="125"/>
<define name="BARO_BOARD_APOGEE_FREQ" value="50"/>
<define name="MPL3115_OVERSAMPLING" value="2"/>
</module-->
<module name="ahrs" type="float_dcm"/>
<module name="ins" type="alt_float"/>
<module name="control" type="new"/>
<module name="navigation"/>
<!-- Sensors -->
<module name="gps" type="ublox">
<configure name="GPS_BAUD" value="B57600"/>
</module>
<module name="current_sensor">
<configure name="ADC_CURRENT_SENSOR" value="ADC_1"/>
</module>
<module name="mag" type="hmc58xx">
<define name="MODULE_HMC58XX_UPDATE_AHRS"/>
<configure name="MAG_HMC58XX_I2C_DEV" value="i2c2"/>
</module>
<!--module name="sys_mon"/-->
<!--module name="light">
<define name="LIGHT_LED_STROBE" value="5"/>
<define name="LIGHT_LED_NAV" value="3"/>
</module-->
<!--module name="pbn"/-->
</firmware>
<!-- commands section -->
<servos>
<servo name="MOTOR" no="0" min="1040" neutral="1040" max="2000"/>
<servo name="AILEVON_RIGHT" no="1" min="1120" neutral="1760" max="1980"/>
<servo name="AILEVON_LEFT" no="2" min="1900" neutral="1500" max="1050"/>
</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>
<section name="AUTO1" prefix="AUTO1_">
<define name="MAX_ROLL" value="45" unit="deg"/>
<define name="MAX_PITCH" value="30" unit="deg"/>
</section>
<section name="IMU" prefix="IMU_">
<!-- Calibration Neutral -->
<define name="GYRO_P_SIGN" value="1"/>
<define name="GYRO_Q_SIGN" value="-1"/>
<define name="GYRO_R_SIGN" value="-1"/>
<define name="ACCEL_X_SIGN" value="1"/>
<define name="ACCEL_Y_SIGN" value="-1"/>
<define name="ACCEL_Z_SIGN" value="-1"/>
<define name="ACCEL_X_NEUTRAL" value="-20"/>
<define name="ACCEL_Y_NEUTRAL" value="41"/>
<define name="ACCEL_Z_NEUTRAL" value="170"/>
<define name="ACCEL_X_SENS" value="2.44857790576" integer="16"/>
<define name="ACCEL_Y_SENS" value="2.46450311739" integer="16"/>
<define name="ACCEL_Z_SENS" value="2.44257470231" integer="16"/>
<define name="MAG_X_SIGN" value="-1"/>
<define name="MAG_Y_SIGN" value="1"/>
<define name="MAG_Z_SIGN" value="-1"/>
<define name="MAG_X_NEUTRAL" value="-21"/>
<define name="MAG_Y_NEUTRAL" value="-137"/>
<define name="MAG_Z_NEUTRAL" value="67"/>
<define name="MAG_X_SENS" value="3.91383504208" integer="16"/>
<define name="MAG_Y_SENS" value="3.91521306757" integer="16"/>
<define name="MAG_Z_SENS" value="4.55239350329" integer="16"/>
<define name="BODY_TO_IMU_PHI" value="0" unit="deg"/>
<define name="BODY_TO_IMU_THETA" value="0" unit="deg"/>
<define name="BODY_TO_IMU_PSI" value="0" unit="deg"/>
</section>
<section name="INS" prefix="INS_">
<define name="ROLL_NEUTRAL_DEFAULT" value="0." unit="deg"/>
<define name="PITCH_NEUTRAL_DEFAULT" value="5.32701781054" unit="deg"/>
<define name="H_X" value="0.5180"/>
<define name="H_Y" value="-0.0071"/>
<define name="H_Z" value="0.8554"/>
</section>
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
<define name="MilliAmpereOfAdc(_adc)" value="(_adc-406)*6.7"/>
</section>
<section name="MISC">
<define name="NOMINAL_AIRSPEED" value="15." unit="m/s"/>
<define name="CARROT" value="5." unit="s"/>
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
<define name="DEFAULT_CIRCLE_RADIUS" value="80."/>
<define name="UNLOCKED_HOME_MODE" value="TRUE"/>
</section>
<section name="VERTICAL CONTROL" prefix="V_CTL_">
<!-- outer loop proportional gain -->
<define name="ALTITUDE_PGAIN" value="0.1"/>
<!-- outer loop saturation -->
<define name="ALTITUDE_MAX_CLIMB" value="4."/>
<!-- disable climb rate limiter -->
<define name="AUTO_CLIMB_LIMIT" value="2*V_CTL_ALTITUDE_MAX_CLIMB"/>
<!-- Cruise throttle + limits -->
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.45"/>
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.25"/>
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.85"/>
<!-- Climb loop (throttle) -->
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.073" unit="%/(m/s)"/>
<define name="AUTO_THROTTLE_PGAIN" value="0.005"/>
<define name="AUTO_THROTTLE_DGAIN" value="0.0"/>
<define name="AUTO_THROTTLE_IGAIN" value="0.001"/>
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.02"/>
<!-- Climb loop (pitch) -->
<define name="AUTO_PITCH_PGAIN" value="0.03"/>
<define name="AUTO_PITCH_DGAIN" value="0.03"/>
<define name="AUTO_PITCH_IGAIN" value="0.0"/>
<!--define name="AUTO_PITCH_CLIMB_THROTTLE_INCREMENT" value="0.14"/-->
<define name="AUTO_PITCH_MAX_PITCH" value="20" unit="deg"/>
<define name="AUTO_PITCH_MIN_PITCH" value="-20" unit="deg"/>
<!-- airspeed control -->
<define name="AUTO_AIRSPEED_SETPOINT" value="16."/>
<define name="AUTO_AIRSPEED_THROTTLE_PGAIN" value="0.1"/>
<define name="AUTO_AIRSPEED_THROTTLE_DGAIN" value="0.12"/>
<define name="AUTO_AIRSPEED_THROTTLE_IGAIN" value="0.0"/>
<define name="AUTO_AIRSPEED_PITCH_PGAIN" value="0.06"/>
<define name="AUTO_AIRSPEED_PITCH_DGAIN" value="0.0"/>
<define name="AUTO_AIRSPEED_PITCH_IGAIN" value="0.042"/>
<define name="AIRSPEED_MAX" value="30"/>
<define name="AIRSPEED_MIN" value="10"/>
<!-- groundspeed control -->
<define name="AUTO_GROUNDSPEED_SETPOINT" value="15"/>
<define name="AUTO_GROUNDSPEED_PGAIN" value="1."/>
<define name="AUTO_GROUNDSPEED_IGAIN" value="0."/>
<!-- pitch trim -->
<define name="PITCH_LOITER_TRIM" value="0." unit="deg"/>
<define name="PITCH_DASH_TRIM" value="0." unit="deg"/>
<define name="THROTTLE_SLEW" value="0.1"/>
</section>
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
<define name="COURSE_PGAIN" value="0.6"/>
<define name="ROLL_MAX_SETPOINT" value="0.8" unit="rad"/>
<define name="PITCH_MAX_SETPOINT" value="0.5" unit="rad"/>
<define name="PITCH_MIN_SETPOINT" value="-0.5" unit="rad"/>
<define name="ROLL_ATTITUDE_GAIN" value="10000."/>
<define name="ROLL_RATE_GAIN" value="1000."/>
<define name="ROLL_IGAIN" value="50."/>
<define name="ROLL_KFFA" value="0"/>
<define name="ROLL_KFFD" value="0"/>
<define name="PITCH_PGAIN" value="18000."/>
<define name="PITCH_DGAIN" value="500."/>
<define name="PITCH_IGAIN" value="50."/>
<define name="PITCH_KFFA" value="0."/>
<define name="PITCH_KFFD" value="0."/>
<define name="PITCH_OF_ROLL" value="1." unit="deg"/>
</section>
<section name="NAV">
<define name="NAV_GLIDE_PITCH_TRIM" value="0"/>
</section>
<section name="FAILSAFE" prefix="FAILSAFE_">
<define name="DELAY_WITHOUT_GPS" value="2" unit="s"/>
<define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
<define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
<define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
<define name="HOME_RADIUS" value="100" unit="m"/>
</section>
<section name="SIMU">
<!--define name="ROLL_RESPONSE_FACTOR" value="10"/>
<define name="MAX_ROLL_DOT" value="20" unit="rad/s"/-->
<define name="JSBSIM_MODEL" value="Malolo1" type="string"/>
<!--define name="JSBSIM_INIT" value="Malolo1-IC"/-->
<define name="JSBSIM_LAUNCHSPEED" value="15.0"/>
<define name="JSBSIM_IR_ROLL_NEUTRAL" value="RadOfDeg(0.)"/>
<define name="JSBSIM_IR_PITCH_NEUTRAL" value="RadOfDeg(0.)"/>
</section>
</airframe>

View File

@@ -1,198 +0,0 @@
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
<!-- Merlin
Tiny 2.11
Tilted infrared sensor
XBee modem
LEA 5H
-->
<airframe name="Merlin">
<firmware name="fixedwing">
<define name="PITCH_TRIM"/>
<target name="ap" board="tiny_2.11"/>
<target name="sim" board="pc"/>
<module name="radio_control" type="ppm"/>
<module name="telemetry" type="transparent"/>
<module name="control"/>
<module name="infrared" type="adc"/>
<module name="ahrs" type="infrared"/>
<!--module name="ins" type="vn100"/-->
<module name="ins" type="alt_float"/>
<module name="gps" type="ublox"/>
<module name="navigation"/>
<!--module name="spi">
<define name="USE_SPI_SLAVE0"/>
<define name="USE_SPI1"/>
</module-->
</firmware>
<modules>
</modules>
<!-- commands section -->
<servos>
<servo name="AILERON_RIGHT" no="0" min="1900" neutral="1500" max="1100"/>
<servo name="AILERON_LEFT" no="2" min="1900" neutral="1500" max="1100"/>
<servo name="ELEVATOR" no="6" min="1100" neutral="1500" max="1900"/>
<servo name="RUDDER" no="7" min="1100" neutral="1500" max="1900"/>
<servo name="MOTOR" no="3" min="1000" neutral="1000" max="2000"/>
</servos>
<commands>
<axis name="THROTTLE" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="PITCH" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
</commands>
<rc_commands>
<set command="THROTTLE" value="@THROTTLE"/>
<set command="ROLL" value="@ROLL"/>
<set command="PITCH" value="@PITCH"/>
<set command="YAW" value="@YAW"/>
</rc_commands>
<section name="MIXER">
<define name="AILERON_DIFF" value="0.8"/>
</section>
<command_laws>
<set servo="MOTOR" value="@THROTTLE"/>
<set servo="ELEVATOR" value="@PITCH"/>
<set servo="RUDDER" value="@YAW"/>
<let var="roll" value="@ROLL"/>
<set servo="AILERON_LEFT" value="($roll > 0 ? 1 : AILERON_DIFF) * $roll"/>
<set servo="AILERON_RIGHT" value="($roll > 0 ? AILERON_DIFF : 1) * $roll"/>
</command_laws>
<section name="AUTO1" prefix="AUTO1_">
<define name="MAX_ROLL" value="0.85"/>
<define name="MAX_PITCH" value="0.6"/>
</section>
<section name="INFRARED" prefix="IR_">
<define name="ADC_IR1_NEUTRAL" value="512"/>
<define name="ADC_IR2_NEUTRAL" value="512"/>
<define name="ADC_TOP_NEUTRAL" value="512"/>
<define name="LATERAL_CORRECTION" value="1"/>
<define name="LONGITUDINAL_CORRECTION" value="1"/>
<define name="VERTICAL_CORRECTION" value="1"/>
<define name="HORIZ_SENSOR_TILTED" value="1"/>
<define name="IR1_SIGN" value="1"/>
<define name="IR2_SIGN" value="1"/>
<define name="TOP_SIGN" value="1"/>
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
</section>
<section name="BAT">
<define name="MILLIAMP_AT_FULL_THROTTLE" value="20000"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
<!-- 0.0247311828 -->
<!-- 0.02432905 -->
<define name="VoltageOfAdc(adc)" value="(0.02454*adc)"/>
</section>
<section name="MISC">
<define name="MINIMUM_AIRSPEED" value="10." unit="m/s"/>
<define name="NOMINAL_AIRSPEED" value="12." unit="m/s"/>
<define name="MAXIMUM_AIRSPEED" value="18." unit="m/s"/>
<define name="CARROT" value="5." unit="s"/>
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
<!-- <define name="XBEE_INIT" value="ATPL2\rATRN1\rATTT80\r" type="string"/> -->
<!-- <define name="NO_XBEE_API_INIT" value="TRUE"/> -->
<define name="TRIGGER_DELAY" value="1."/>
<define name="DEFAULT_CIRCLE_RADIUS" value="120."/>
</section>
<section name="VERTICAL CONTROL" prefix="V_CTL_">
<define name="POWER_CTL_BAT_NOMINAL" value="11.1" unit="volt"/>
<!-- outer loop proportional gain -->
<define name="ALTITUDE_PGAIN" value="0.06"/>
<!-- outer loop saturation -->
<define name="ALTITUDE_MAX_CLIMB" value="2."/>
<!-- auto throttle inner loop -->
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.45"/>
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.25"/>
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.85"/>
<define name="AUTO_THROTTLE_LOITER_TRIM" value="1000"/>
<define name="AUTO_THROTTLE_DASH_TRIM" value="-1200"/>
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.2" unit="%/(m/s)"/>
<define name="AUTO_THROTTLE_PGAIN" value="0.023"/>
<define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.05"/>
<!-- auto pitch inner loop -->
<define name="AUTO_PITCH_PGAIN" value="0.06"/>
<define name="AUTO_PITCH_IGAIN" value="0.0"/>
<define name="AUTO_PITCH_DGAIN" value="0.0"/>
<define name="AUTO_PITCH_MAX_PITCH" value="0.35"/>
<define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>
<!-- pitch trim -->
<define name="PITCH_LOITER_TRIM" value="RadOfDeg(5.)"/>
<define name="PITCH_DASH_TRIM" value="RadOfDeg(-5.)"/>
<define name="THROTTLE_SLEW" value="0.1"/>
</section>
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
<define name="COURSE_PGAIN" value="1.0"/>
<define name="ROLL_MAX_SETPOINT" value="0.60" unit="rad"/>
<define name="PITCH_MAX_SETPOINT" value="0.5" unit="rad"/>
<define name="PITCH_MIN_SETPOINT" value="-0.5" unit="rad"/>
<define name="ROLL_ATTITUDE_GAIN" value="5900"/>
<define name="ROLL_RATE_GAIN" value="2900"/>
<define name="ROLL_IGAIN" value="500"/>
<define name="ROLL_KFFA" value="500"/>
<define name="ROLL_KFFD" value="500"/>
<define name="PITCH_PGAIN" value="9000."/>
<define name="PITCH_DGAIN" value="1.5"/>
<define name="PITCH_IGAIN" value="500"/>
<define name="PITCH_KFFA" value="0."/>
<define name="PITCH_KFFD" value="0."/>
<define name="PITCH_OF_ROLL" value="RadOfDeg(0.2)"/>
<define name="ELEVATOR_OF_ROLL" value="0"/>
</section>
<section name="NAV">
<define name="NAV_GLIDE_PITCH_TRIM" value="0"/>
</section>
<section name="AGGRESSIVE" prefix="AGR_">
<define name="BLEND_START" value="50"/><!-- Altitude Error to Initiate Aggressive Climb CANNOT BE ZERO!!-->
<define name="BLEND_END" value="15"/><!-- Altitude Error to Blend Aggressive to Regular Climb Modes CANNOT BE ZERO!!-->
<define name="CLIMB_THROTTLE" value="0.9"/><!-- Gaz for Aggressive Climb -->
<define name="CLIMB_PITCH" value="0.35"/><!-- Pitch for Aggressive Climb -->
<define name="DESCENT_THROTTLE" value="0.05"/><!-- Gaz for Aggressive Decent -->
<define name="DESCENT_PITCH" value="-0.35"/><!-- Pitch for Aggressive Decent -->
<define name="CLIMB_NAV_RATIO" value="0.8"/><!-- Percent Navigation for Altitude Error Equal to Start Altitude -->
<define name="DESCENT_NAV_RATIO" value="1.0"/>
</section>
<section name="FAILSAFE" prefix="FAILSAFE_">
<define name="DELAY_WITHOUT_GPS" value="2" unit="s"/>
<define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
<define name="DEFAULT_ROLL" value="0.17" unit="rad"/>
<define name="DEFAULT_PITCH" value="0.08" unit="rad"/>
<define name="HOME_RADIUS" value="100" unit="m"/>
</section>
</airframe>

View File

@@ -1,265 +0,0 @@
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
<!-- Mythe
Umarim
XBee modem
LEA 5H GPS
-->
<airframe name="Funjet">
<firmware name="fixedwing">
<!--define name="AGR_CLIMB"/-->
<define name="USE_AIRSPEED"/>
<!--define name="LOITER_TRIM"/-->
<!--define name="PITCH_TRIM"/-->
<define name="SENSOR_SYNC_SEND"/>
<target name="sim" board="pc"/>
<target name="ap" board="umarim_1.0"/>
<module name="radio_control" type="ppm">
<define name="USE_PPM_RSSI_GPIO"/>
<define name="PPM_RSSI_IOPIN" value="IO0PIN"/>
<define name="PPM_RSSI_PIN" value="10"/>
<define name="PPM_RSSI_VALID_LEVEL" value="0"/>
</module>
<!-- Communication -->
<module name="telemetry" type="xbee_api"/>
<module name="airspeed" type="adc">
<configure name="ADC_AIRSPEED" value="ADC_0"/>
<define name="AIRSPEED_ADC_QUADRATIC_SCALE" value="1.09378"/>
<define name="AIRSPEED_ADC_BIAS" value="110"/>
</module>
<!--module name="airspeed" type="ads1114"/-->
<module name="AOA" type="adc">
<configure name="ADC_AOA" value="ADC_2"/>
</module>
<!--module name="adc" type="generic">
<configure name="ADC_CHANNEL_GENERIC1" value="ADC_2"/>
</module-->
<!--module name="baro" type="hca">
<define name="I2C0_SCLL" value="25"/>
<define name="I2C0_SCLH" value="25"/>
</module-->
<!--module name="baro" type="bmp">
<configure name="BMP_I2C_DEV" value="i2c1"/>
</module-->
<!--module name="baro" type="ms5611_i2c">
<configure name="MS5611_I2C_DEV" value="i2c0"/>
</module-->
<!--module name="baro" type="mpl3115">
<configure name="MPL3115_I2C_DEV" value="i2c0"/>
<define name="SENSOR_SYNC_SEND"/>
</module-->
<!--module name="mcp355x"/-->
<!--module name="sys_mon"/-->
<!-- Actuators are automatically chosen according to board-->
<module name="imu" type="umarim"/>
<module name="ahrs" type="float_dcm"/>
<module name="ins" type="alt_float"/>
<module name="control" type="new"/>
<module name="navigation"/>
<!-- Sensors -->
<module name="gps" type="ublox"/>
<module name="current_sensor">
<configure name="ADC_CURRENT_SENSOR" value="ADC_1"/>
</module>
<!--module name="spi"/-->
</firmware>
<!-- commands section -->
<servos>
<servo name="MOTOR" no="7" min="1040" neutral="1040" max="2000"/>
<servo name="AILEVON_LEFT" no="6" min="1900" neutral="1543" max="1100"/>
<servo name="AILEVON_RIGHT" no="3" 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>
<section name="AUTO1" prefix="AUTO1_">
<define name="MAX_ROLL" value="0.85"/>
<define name="MAX_PITCH" value="0.6"/>
</section>
<section name="IMU" prefix="IMU_">
<define name="GYRO_P_SIGN" value="-1"/>
<define name="GYRO_Q_SIGN" value="-1"/>
<define name="GYRO_R_SIGN" value="1"/>
<!-- Calibration Neutral -->
<define name="GYRO_P_NEUTRAL" value="-83"/>
<define name="GYRO_Q_NEUTRAL" value="81"/>
<define name="GYRO_R_NEUTRAL" value="77 "/>
<!-- SENS ITG3200 1/14.375 (deg/s)/LSB, rate frac 12bit => 1/14.375 * pi / 180 * 2^12 -->
<define name="GYRO_P_SENS" value="4.97312" integer="16"/>
<define name="GYRO_Q_SENS" value="4.97312" integer="16"/>
<define name="GYRO_R_SENS" value="4.97312" integer="16"/>
<define name="ACCEL_X_SIGN" value="-1"/>
<define name="ACCEL_Y_SIGN" value="-1"/>
<define name="ACCEL_Z_SIGN" value="1"/>
<define name="ACCEL_X_NEUTRAL" value="1"/>
<define name="ACCEL_Y_NEUTRAL" value="6"/>
<define name="ACCEL_Z_NEUTRAL" value="-18"/>
<define name="ACCEL_X_SENS" value="38.2761110243" integer="16"/>
<define name="ACCEL_Y_SENS" value="38.9101161196" integer="16"/>
<define name="ACCEL_Z_SENS" value="39.8204157329" integer="16"/>
<!-- Just to compile -->
<define name="MAG_X_NEUTRAL" value="0"/>
<define name="MAG_Y_NEUTRAL" value="0"/>
<define name="MAG_Z_NEUTRAL" value="0"/>
<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>
<section name="INS" prefix="INS_">
<define name="ROLL_NEUTRAL_DEFAULT" value="0." unit="deg"/>
<define name="PITCH_NEUTRAL_DEFAULT" value="4." unit="deg"/>
</section>
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
<define name="MilliAmpereOfAdc(_adc)" value="(_adc-158)*16.5698"/>
</section>
<section name="MISC">
<define name="NOMINAL_AIRSPEED" value="15." unit="m/s"/>
<define name="CARROT" value="5." unit="s"/>
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
<define name="TRIGGER_DELAY" value="1."/>
<define name="DEFAULT_CIRCLE_RADIUS" value="80."/>
<define name="UNLOCKED_HOME_MODE" value="TRUE"/>
</section>
<section name="VERTICAL CONTROL" prefix="V_CTL_">
<!--define name="POWER_CTL_BAT_NOMINAL" value="11.1" unit="volt"/-->
<!-- outer loop proportional gain -->
<define name="ALTITUDE_PGAIN" value="0.18"/> <!-- 0.024 -->
<!-- outer loop saturation -->
<define name="ALTITUDE_MAX_CLIMB" value="5."/>
<!-- Cruise throttle + limits -->
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.45"/>
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.25"/>
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.85"/>
<define name="AUTO_PITCH_MAX_PITCH" value="RadOfDeg(20.)"/>
<define name="AUTO_PITCH_MIN_PITCH" value="-RadOfDeg(20.)"/>
<!-- Climb loop (throttle) -->
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.1" unit="%/(m/s)"/>
<define name="AUTO_THROTTLE_PGAIN" value="0.002"/> <!-- 0.005 -->
<define name="AUTO_THROTTLE_DGAIN" value="0.0"/> <!-- 0.005 -->
<define name="AUTO_THROTTLE_IGAIN" value="0.004"/> <!-- 0.005 -->
<!-- Climb loop (pitch) -->
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.03"/>
<define name="AUTO_PITCH_PGAIN" value="0.04"/> <!-- 0.03 -->
<define name="AUTO_PITCH_DGAIN" value="0.04"/> <!-- 0.03 -->
<define name="AUTO_PITCH_IGAIN" value="0.0"/>
<!-- airspeed control -->
<define name="AUTO_AIRSPEED_SETPOINT" value="16."/>
<define name="AUTO_AIRSPEED_THROTTLE_PGAIN" value="0.1"/>
<define name="AUTO_AIRSPEED_THROTTLE_DGAIN" value="0.12"/>
<define name="AUTO_AIRSPEED_THROTTLE_IGAIN" value="0.0"/>
<define name="AUTO_AIRSPEED_PITCH_PGAIN" value="0.06"/>
<define name="AUTO_AIRSPEED_PITCH_DGAIN" value="0.0"/>
<define name="AUTO_AIRSPEED_PITCH_IGAIN" value="0.042"/>
<define name="AIRSPEED_MAX" value="30"/>
<define name="AIRSPEED_MIN" value="10"/>
<!-- groundspeed control -->
<define name="AUTO_GROUNDSPEED_SETPOINT" value="15"/>
<define name="AUTO_GROUNDSPEED_PGAIN" value="1."/>
<define name="AUTO_GROUNDSPEED_IGAIN" value="0."/>
<!-- pitch trim --> <!-- 5 deg -->
<define name="PITCH_LOITER_TRIM" value="RadOfDeg(0.)"/>
<define name="PITCH_DASH_TRIM" value="RadOfDeg(-0.)"/>
<define name="THROTTLE_SLEW" value="0.1"/>
</section>
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
<define name="COURSE_PGAIN" value="0.7"/>
<define name="ROLL_MAX_SETPOINT" value="0.8" unit="radians"/>
<define name="PITCH_MAX_SETPOINT" value="0.5" unit="radians"/>
<define name="PITCH_MIN_SETPOINT" value="-0.5" unit="radians"/>
<define name="ROLL_ATTITUDE_GAIN" value="8800."/>
<define name="ROLL_RATE_GAIN" value="500."/>
<define name="ROLL_IGAIN" value="150."/>
<define name="ROLL_KFFA" value="0"/>
<define name="ROLL_KFFD" value="0"/>
<define name="PITCH_PGAIN" value="14000."/>
<define name="PITCH_DGAIN" value="0."/>
<define name="PITCH_IGAIN" value="250."/>
<define name="PITCH_KFFA" value="0."/>
<define name="PITCH_KFFD" value="0."/>
<define name="PITCH_OF_ROLL" value="RadOfDeg(0.0)"/>
<define name="AILERON_OF_THROTTLE" value="0.0"/>
<!--define name="ELEVATOR_OF_ROLL" value="1400"/-->
</section>
<section name="NAV">
<define name="NAV_GLIDE_PITCH_TRIM" value="0"/>
</section>
<section name="FAILSAFE" prefix="FAILSAFE_">
<define name="DELAY_WITHOUT_GPS" value="2" unit="s"/>
<define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
<define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
<define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
<define name="HOME_RADIUS" value="100" unit="m"/>
</section>
<section name="SIMU">
<!--define name="ROLL_RESPONSE_FACTOR" value="10"/>
<define name="MAX_ROLL_DOT" value="20" unit="rad/s"/-->
<define name="JSBSIM_MODEL" value="Malolo1" type="string"/>
<!--define name="JSBSIM_INIT" value="Malolo1-IC"/-->
<define name="JSBSIM_LAUNCHSPEED" value="15.0"/>
<define name="JSBSIM_IR_ROLL_NEUTRAL" value="RadOfDeg(0.)"/>
<define name="JSBSIM_IR_PITCH_NEUTRAL" value="RadOfDeg(0.)"/>
</section>
</airframe>

View File

@@ -1,214 +0,0 @@
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
<airframe name="Quark">
<firmware name="fixedwing">
<define name="USE_I2C0"/>
<define name="USE_I2C1"/>
<!--define name="AGR_CLIMB"/-->
<define name="USE_AIRSPEED"/>
<!--define name="LOITER_TRIM"/-->
<!--define name="PITCH_TRIM"/-->
<configure name="PERIODIC_FREQUENCY" value="125"/>
<configure name="AHRS_PROPAGATE_FREQUENCY" value="125"/>
<define name="CONTROL_FREQUENCY" value="125"/>
<target name="sim" board="pc"/>
<target name="ap" board="umarim_lite_2.0"/>
<module name="radio_control" type="datalink"/>
<!-- Communication -->
<module name="telemetry" type="transparent"/>
<!-- Actuators are automatically chosen according to board-->
<module name="imu" type="umarim"/>
<module name="ahrs" type="float_dcm"/>
<module name="ins" type="alt_float"/>
<module name="control" type="new"/>
<module name="navigation"/>
<!-- Sensors -->
<module name="gps" type="ublox"/>
<module name="gps" type="ubx_ucenter"/>
</firmware>
<!-- commands section -->
<servos>
<servo name="MOTOR" no="2" min="1040" neutral="1040" max="2000"/>
<servo name="AILEVON_LEFT" no="0" min="1900" neutral="1394" max="1100"/>
<servo name="AILEVON_RIGHT" no="1" min="1100" neutral="1369" 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>
<command_laws>
<let var="aileron" value="@ROLL"/>
<let var="elevator" value="@PITCH"/>
<set servo="MOTOR" value="@THROTTLE"/>
<set servo="AILEVON_LEFT" value="$elevator - $aileron"/>
<set servo="AILEVON_RIGHT" value="$elevator + $aileron"/>
</command_laws>
<section name="AUTO1" prefix="AUTO1_">
<define name="MAX_ROLL" value="0.85"/>
<define name="MAX_PITCH" value="0.6"/>
</section>
<section name="IMU" prefix="IMU_">
<define name="GYRO_P_SIGN" value="1"/>
<define name="GYRO_Q_SIGN" value="-1"/>
<define name="GYRO_R_SIGN" value="-1"/>
<!-- Calibration Neutral -->
<define name="GYRO_P_NEUTRAL" value="0"/>
<define name="GYRO_Q_NEUTRAL" value="0"/>
<define name="GYRO_R_NEUTRAL" value="0"/>
<!-- SENS ITG3200 1/14.375 (deg/s)/LSB, rate frac 12bit => 1/14.375 * pi / 180 * 2^12 -->
<define name="GYRO_P_SENS" value="4.97312" integer="16"/>
<define name="GYRO_Q_SENS" value="4.97312" integer="16"/>
<define name="GYRO_R_SENS" value="4.97312" integer="16"/>
<define name="ACCEL_X_SIGN" value="1"/>
<define name="ACCEL_Y_SIGN" value="-1"/>
<define name="ACCEL_Z_SIGN" value="-1"/>
<define name="ACCEL_X_NEUTRAL" value="-13"/>
<define name="ACCEL_Y_NEUTRAL" value="-14"/>
<define name="ACCEL_Z_NEUTRAL" value="-34"/>
<define name="ACCEL_X_SENS" value="38.8302353809" integer="16"/>
<define name="ACCEL_Y_SENS" value="38.6959597569" integer="16"/>
<define name="ACCEL_Z_SENS" value="39.2279525433" integer="16"/>
<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>
<section name="UMARIM IMU" prefix="UMARIM_">
<define name="ACCEL_RANGE" value="ADXL345_RANGE_8G"/>
<define name="GYRO_LOWPASS" value="ITG3200_DLPF_20HZ"/>
<define name="GYRO_SMPLRT_DIV" value="7"/> <!-- 125 Hz -->
</section>
<section name="INS" prefix="INS_">
<define name="ROLL_NEUTRAL_DEFAULT" value="0." unit="deg"/>
<define name="PITCH_NEUTRAL_DEFAULT" value="0." unit="deg"/>
</section>
<section name="BAT">
<define name="MILLIAMP_AT_FULL_THROTTLE" value="10000."/>
<define name="MAX_BAT_LEVEL" value="8.0" unit="V"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="6.3" unit="V"/>
</section>
<section name="MISC">
<define name="NOMINAL_AIRSPEED" value="15." unit="m/s"/>
<define name="CARROT" value="5." unit="s"/>
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
<define name="TRIGGER_DELAY" value="1."/>
<define name="DEFAULT_CIRCLE_RADIUS" value="50."/>
<define name="UNLOCKED_HOME_MODE" value="TRUE"/>
</section>
<section name="VERTICAL CONTROL" prefix="V_CTL_">
<!--define name="POWER_CTL_BAT_NOMINAL" value="11.1" unit="volt"/-->
<!-- outer loop proportional gain -->
<define name="ALTITUDE_PGAIN" value="0.15"/> <!-- -0.024 -->
<!-- outer loop saturation -->
<define name="ALTITUDE_MAX_CLIMB" value="3." unit="m/s"/>
<!-- Cruise throttle + limits -->
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.5"/>
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.25"/>
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.85"/>
<define name="AUTO_PITCH_MAX_PITCH" value="20." unit="deg"/>
<define name="AUTO_PITCH_MIN_PITCH" value="-20." unit="deg"/>
<!-- Climb loop (throttle) -->
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.1" unit="%/(m/s)"/>
<define name="AUTO_THROTTLE_PGAIN" value="0.004"/> <!-- -0.005 -->
<define name="AUTO_THROTTLE_DGAIN" value="0.01"/> <!-- 0.005 -->
<define name="AUTO_THROTTLE_IGAIN" value="0.004"/> <!-- 0.005 -->
<!-- Climb loop (pitch) -->
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.02"/>
<define name="AUTO_PITCH_PGAIN" value="0.038"/> <!-- -0.03 -->
<define name="AUTO_PITCH_DGAIN" value="0.036"/> <!-- -0.03 -->
<define name="AUTO_PITCH_IGAIN" value="0.0"/>
<!-- airspeed control -->
<define name="AUTO_AIRSPEED_SETPOINT" value="16."/>
<define name="AUTO_AIRSPEED_THROTTLE_PGAIN" value="0.1"/>
<define name="AUTO_AIRSPEED_THROTTLE_DGAIN" value="0.12"/>
<define name="AUTO_AIRSPEED_THROTTLE_IGAIN" value="0.0"/>
<define name="AUTO_AIRSPEED_PITCH_PGAIN" value="0.06"/>
<define name="AUTO_AIRSPEED_PITCH_DGAIN" value="0.0"/>
<define name="AUTO_AIRSPEED_PITCH_IGAIN" value="0.042"/>
<define name="AIRSPEED_MAX" value="30" unit="m/s"/>
<define name="AIRSPEED_MIN" value="10" unit="m/s"/>
<!-- groundspeed control -->
<define name="AUTO_GROUNDSPEED_SETPOINT" value="15" unit="m/s"/>
<define name="AUTO_GROUNDSPEED_PGAIN" value="1."/>
<define name="AUTO_GROUNDSPEED_IGAIN" value="0."/>
<!-- pitch trim --> <!-- 5 deg -->
<define name="PITCH_LOITER_TRIM" value="0." unit="deg"/>
<define name="PITCH_DASH_TRIM" value="0." unit="deg"/>
<define name="THROTTLE_SLEW" value="0.1"/>
</section>
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
<define name="COURSE_PGAIN" value="0.7"/>
<define name="ROLL_MAX_SETPOINT" value="0.8" unit="rad"/>
<define name="PITCH_MAX_SETPOINT" value="0.5" unit="rad"/>
<define name="PITCH_MIN_SETPOINT" value="-0.5" unit="rad"/>
<define name="ROLL_ATTITUDE_GAIN" value="3800."/>
<define name="ROLL_RATE_GAIN" value="500."/>
<define name="ROLL_IGAIN" value="150."/>
<define name="ROLL_KFFA" value="0"/>
<define name="ROLL_KFFD" value="0"/>
<define name="PITCH_PGAIN" value="10000."/>
<define name="PITCH_DGAIN" value="100."/>
<define name="PITCH_IGAIN" value="250."/>
<define name="PITCH_KFFA" value="0."/>
<define name="PITCH_KFFD" value="0."/>
<define name="PITCH_OF_ROLL" value="0.0" unit="deg"/>
<define name="AILERON_OF_THROTTLE" value="0.0"/>
<!--define name="ELEVATOR_OF_ROLL" value="1400"/-->
</section>
<section name="FAILSAFE" prefix="FAILSAFE_">
<define name="DELAY_WITHOUT_GPS" value="2" unit="s"/>
<define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
<define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
<define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
<define name="HOME_RADIUS" value="100" unit="m"/>
</section>
<section name="SIMU">
<!--define name="ROLL_RESPONSE_FACTOR" value="10"/>
<define name="MAX_ROLL_DOT" value="20" unit="rad/s"/-->
</section>
</airframe>

View File

@@ -1,34 +0,0 @@
<airframe>
<section name="IMU" prefix="IMU_">
<!-- Accelero -->
<define name="ACCEL_X_NEUTRAL" value="2033"/>
<define name="ACCEL_Y_NEUTRAL" value="2050"/>
<define name="ACCEL_Z_NEUTRAL" value="2045"/>
<define name="ACCEL_X_SENS" value="19.4125494887" integer="16"/>
<define name="ACCEL_Y_SENS" value="19.5801376185" integer="16"/>
<define name="ACCEL_Z_SENS" value="19.4761009738" integer="16"/>
<!-- Magneto calibration -->
<!--define name="MAG_X_NEUTRAL" value="64"/>
<define name="MAG_Y_NEUTRAL" value="7"/>
<define name="MAG_Z_NEUTRAL" value="-28"/>
<define name="MAG_X_SENS" value="15.0972908192" integer="16"/>
<define name="MAG_Y_SENS" value="14.9806854769" integer="16"/>
<define name="MAG_Z_SENS" value="16.0049628842" integer="16"/-->
<define name="MAG_X_NEUTRAL" value="48"/>
<define name="MAG_Y_NEUTRAL" value="-23"/>
<define name="MAG_Z_NEUTRAL" value="-9"/>
<define name="MAG_X_SENS" value="15.3920639363" integer="16"/>
<define name="MAG_Y_SENS" value="15.3302290802" integer="16"/>
<define name="MAG_Z_SENS" value="16.236687484" integer="16"/>
<!-- Magneto current calibration -->
<define name="MAG_X_CURRENT_COEF" value="0.0"/>
<define name="MAG_Y_CURRENT_COEF" value="0.0"/>
<define name="MAG_Z_CURRENT_COEF" value="0.0"/>
</section>
</airframe>

View File

@@ -1,219 +0,0 @@
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
<airframe name="bebop 201">
<firmware name="rotorcraft">
<target name="ap" board="bebop">
<module name="radio_control" type="datalink"/>
</target>
<target name="nps" board="pc">
<module name="fdm" type="jsbsim"/>
<module name="radio_control" type="ppm"/>
</target>
<!--define name="USE_SONAR" value="TRUE"/-->
<module name="telemetry" type="transparent_udp"/>
<!-- Subsystem section -->
<module name="motor_mixing"/>
<module name="actuators" type="bebop"/>
<module name="imu" type="bebop"/>
<module name="gps" type="furuno"/>
<module name="stabilization" type="int_quat"/>
<!--module name="ahrs" type="int_cmpl_quat"/>
<module name="ins" type="extended"/-->
<module name="ins" type="float_invariant"/>
<module name="sonar" type="bebop">
<define name="SENSOR_SYNC_SEND_SONAR"/>
</module>
<!--module name="send_imu_mag_current"/>
<module name="file_logger">
<define name="FILE_LOGGER_PATH" value="\\/data/ftp/internal_000/\\" type="string"/>
</module-->
<!--module name="video_rtp_stream">
<define name="VIEWVIDEO_FPS" value="60"/>
<define name="VIEWVIDEO_QUALITY_FACTOR" value="80"/>
<define name="VIEWVIDEO_DOWNSIZE_FACTOR" value="1"/>
<define name="VIEWVIDEO_RTP_TIME_INC" value="0"/>
<define name="VIEWVIDEO_DEVICE" value="/dev/video0"/>
<define name="VIEWVIDEO_SUBDEV" value="/dev/v4l-subdev0"/>
<define name="VIEWVIDEO_DEVICE_SIZE" value="320,240"/>
<define name="VIEWVIDEO_DEVICE_BUFFERS" value="60"/>
<define name="VIEWVIDEO_SHOT_PATH" value="/data/ftp/internal_000/images"/>
</module-->
</firmware>
<modules main_freq="512"/>
<commands>
<axis name="PITCH" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
<axis name="THRUST" failsafe_value="6000"/>
</commands>
<servos driver="Default">
<servo name="TOP_RIGHT" no="0" min="3000" neutral="3000" max="12000"/>
<servo name="TOP_LEFT" no="1" min="3000" neutral="3000" max="12000"/>
<servo name="BOTTOM_LEFT" no="2" min="3000" neutral="3000" max="12000"/>
<servo name="BOTTOM_RIGHT" no="3" min="3000" neutral="3000" max="12000"/>
</servos>
<section name="MIXING" prefix="MOTOR_MIXING_">
<define name="TRIM_ROLL" value="0"/>
<define name="TRIM_PITCH" value="0"/>
<define name="TRIM_YAW" value="0"/>
<define name="NB_MOTOR" value="4"/>
<define name="SCALE" value="255"/>
<define name="MAX_SATURATION_OFFSET" value="3*MAX_PPRZ"/>
<!-- Time cross layout (X), with order NW (CW), NE (CCW), SE (CW), SW (CCW) -->
<define name="ROLL_COEF" value="{ 256, -256, -256, 256 }"/>
<define name="PITCH_COEF" value="{ 256, 256, -256, -256 }"/>
<define name="YAW_COEF" value="{ -256, 256, -256, 256 }"/>
<define name="THRUST_COEF" value="{ 256, 256, 256, 256 }"/>
</section>
<command_laws>
<call fun="motor_mixing_run(autopilot_get_motors_on(),FALSE,values)"/>
<set servo="TOP_LEFT" value="motor_mixing.commands[0]"/>
<set servo="TOP_RIGHT" value="motor_mixing.commands[1]"/>
<set servo="BOTTOM_RIGHT" value="motor_mixing.commands[2]"/>
<set servo="BOTTOM_LEFT" value="motor_mixing.commands[3]"/>
</command_laws>
<section name="IMU" prefix="IMU_">
<!-- Magneto calibration -->
<define name="MAG_X_NEUTRAL" value="358"/>
<define name="MAG_Y_NEUTRAL" value="48"/>
<define name="MAG_Z_NEUTRAL" value="744"/>
<define name="MAG_X_SENS" value="7.76516794782" integer="16"/>
<define name="MAG_Y_SENS" value="8.23183938318" integer="16"/>
<define name="MAG_Z_SENS" value="8.59604596472" integer="16"/>
<!--define name="MAG_X_NEUTRAL" value="18"/>
<define name="MAG_Y_NEUTRAL" value="157"/>
<define name="MAG_Z_NEUTRAL" value="49"/>
<define name="MAG_X_SENS" value="10.5007722373" integer="16"/>
<define name="MAG_Y_SENS" value="11.1147400462" integer="16"/>
<define name="MAG_Z_SENS" value="11.6479371722" integer="16"/-->
<!-- Magneto current calibration -->
<define name="MAG_X_CURRENT_COEF" value="0.0"/>
<define name="MAG_Y_CURRENT_COEF" value="0.0"/>
<define name="MAG_Z_CURRENT_COEF" value="0.0"/>
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/>
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/>
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/>
</section>
<!-- local magnetic field -->
<!-- http://wiki.paparazziuav.org/wiki/Subsystem/ahrs#Local_Magnetic_Field -->
<section name="AHRS" prefix="INS_">
<!-- Toulouse -->
<define name="H_X" value="0.513081"/>
<define name="H_Y" value="-0.00242783"/>
<define name="H_Z" value="0.858336"/>
<!-- Delft -->
<!--define name="H_X" value="0.3892503"/>
<define name="H_Y" value="0.0017972"/>
<define name="H_Z" value="0.9211303"/-->
</section>
<section name="INS" prefix="INS_">
<define name="SONAR_MAX_RANGE" value="2.2"/>
<define name="SONAR_UPDATE_ON_AGL" value="TRUE"/>
<!-- Toulouse -->
<!--define name="H_X" value="0.513081"/>
<define name="H_Y" value="-0.00242783"/>
<define name="H_Z" value="0.858336"/-->
</section>
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
<!-- setpoints -->
<define name="SP_MAX_PHI" value="45" unit="deg"/>
<define name="SP_MAX_THETA" value="45" unit="deg"/>
<define name="SP_MAX_R" value="300" unit="deg/s"/>
<define name="DEADBAND_A" value="0"/>
<define name="DEADBAND_E" value="0"/>
<define name="DEADBAND_R" value="50"/>
<!-- reference -->
<define name="REF_OMEGA_P" value="450" unit="deg/s"/>
<define name="REF_ZETA_P" value="0.9"/>
<define name="REF_MAX_P" value="600." unit="deg/s"/>
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_Q" value="450" unit="deg/s"/>
<define name="REF_ZETA_Q" value="0.9"/>
<define name="REF_MAX_Q" value="600." unit="deg/s"/>
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_R" value="450" unit="deg/s"/>
<define name="REF_ZETA_R" value="0.9"/>
<define name="REF_MAX_R" value="600." unit="deg/s"/>
<define name="REF_MAX_RDOT" value="RadOfDeg(8000.)"/>
<!-- feedback -->
<define name="PHI_PGAIN" value="650"/>
<define name="PHI_DGAIN" value="300"/>
<define name="PHI_IGAIN" value="0"/>
<define name="THETA_PGAIN" value="650"/>
<define name="THETA_DGAIN" value="300"/>
<define name="THETA_IGAIN" value="0"/>
<define name="PSI_PGAIN" value="4000"/>
<define name="PSI_DGAIN" value="350"/>
<define name="PSI_IGAIN" value="0"/>
<!-- feedforward -->
<define name="PHI_DDGAIN" value="0"/>
<define name="THETA_DDGAIN" value="0"/>
<define name="PSI_DDGAIN" value="0"/>
</section>
<section name="GUIDANCE_V" prefix="GUIDANCE_V_">
<define name="HOVER_KP" value="82"/>
<define name="HOVER_KD" value="117"/>
<define name="HOVER_KI" value="0"/>
<define name="NOMINAL_HOVER_THROTTLE" value="0.53"/>
<define name="ADAPT_THROTTLE_ENABLED" value="TRUE"/>
</section>
<section name="GUIDANCE_H" prefix="GUIDANCE_H_">
<!-- Good weather -->
<define name="MAX_BANK" value="20" unit="deg"/>
<!-- Bad weather -->
<!-- define name="MAX_BANK" value="32" unit="deg"/ -->
<define name="PGAIN" value="79"/>
<define name="DGAIN" value="100"/>
<define name="IGAIN" value="30"/>
</section>
<section name="SIMULATOR" prefix="NPS_">
<define name="ACTUATOR_NAMES" value="nw_motor, ne_motor, se_motor, sw_motor" type="string[]"/>
<define name="JSBSIM_MODEL" value="simple_x_quad_ccw" type="string"/>
<define name="SENSORS_PARAMS" value="nps_sensors_params_default.h" type="string"/>
</section>
<section name="AUTOPILOT">
<define name="MODE_STARTUP" value="AP_MODE_NAV"/>
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/>
<define name="MODE_AUTO1" value="AP_MODE_ATTITUDE_Z_HOLD"/>
<define name="MODE_AUTO2" value="AP_MODE_NAV"/>
</section>
<section name="BAT">
<define name="MILLIAMP_AT_FULL_THROTTLE" value="8700"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="9.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="9.7" unit="V"/>
<define name="MAX_BAT_LEVEL" value="12.4" unit="V"/>
</section>
</airframe>

View File

@@ -1,246 +0,0 @@
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
<airframe name="Blender">
<firmware name="rotorcraft">
<define name="USE_INS_NAV_INIT"/>
<target name="ap" board="navgo_1.0">
<define name="FAILSAFE_GROUND_DETECT"/>
<define name="USE_GPS_ACC4R"/>
<define name="ACTUATORS_START_DELAY" value="3"/>
</target>
<module name="radio_control" type="ppm"/>
<module name="telemetry" type="transparent"/>
<module name="actuators" type="skiron">
<configure name="ACTUATORS_SKIRON_I2C_SCL_TIME" value="25"/>
</module>
<module name="motor_mixing"/>
<module name="actuators" type="pwm">
<define name="USE_PWM0"/>
</module>
<module name="imu" type="navgo"/>
<module name="gps" type="ublox">
<configure name="GPS_BAUD" value="B57600"/>
</module>
<module name="stabilization" type="int_euler"/>
<module name="ahrs" type="int_cmpl_quat"/>
<module name="ins" type="hff"/>
<module name="switch" type="servo"/>
<module name="rotorcraft_cam"/>
<!--module name="sonar" type="adc"/-->
<!--module name="adc_generic">
<configure name="ADC_CHANNEL_GENERIC1" value="ADC_0"/>
</module-->
</firmware>
<modules main_freq="512"/>
<section name="MIXING" prefix="MOTOR_MIXING_">
<define name="TRIM_ROLL" value="-50"/>
<define name="TRIM_PITCH" value="-150"/>
<define name="TRIM_YAW" value="-100"/>
<define name="NB_MOTOR" value="4"/>
<define name="SCALE" value="256"/>
<define name="ROLL_COEF" value="{ 0, -256, 0, 256}"/>
<define name="PITCH_COEF" value="{ 256, 0, -256, 0}"/>
<define name="YAW_COEF" value="{ -256, 256, -256, 256}"/>
<define name="THRUST_COEF" value="{ 256, 256, 256, 256}"/>
</section>
<servos driver="Skiron">
<servo name="FRONT" no="0" min="0" neutral="20" max="255"/>
<servo name="RIGHT" no="1" min="0" neutral="20" max="255"/>
<servo name="BACK" no="2" min="0" neutral="20" max="255"/>
<servo name="LEFT" no="3" min="0" neutral="20" max="255"/>
</servos>
<servos driver="Pwm">
<servo name="DROP" no="0" min="1000" neutral="1500" max="2000"/>
</servos>
<commands>
<axis name="PITCH" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
<axis name="THRUST" failsafe_value="0"/>
</commands>
<command_laws>
<call fun="motor_mixing_run(autopilot_get_motors_on(),FALSE,values)"/>
<set servo="FRONT" value="motor_mixing.commands[0]"/>
<set servo="BACK" value="motor_mixing.commands[1]"/>
<set servo="RIGHT" value="motor_mixing.commands[2]"/>
<set servo="LEFT" value="motor_mixing.commands[3]"/>
</command_laws>
<section name="IMU" prefix="IMU_">
<define name="GYRO_P_NEUTRAL" value="10"/>
<define name="GYRO_Q_NEUTRAL" value="-32"/>
<define name="GYRO_R_NEUTRAL" value="11"/>
<!-- SENS ITG3200 1/14.375 (deg/s)/LSB, rate frac 12bit => 1/14.375 * pi / 180 * 2^12 -->
<define name="GYRO_P_SENS" value="4.97312" integer="16"/>
<define name="GYRO_Q_SENS" value="4.97312" integer="16"/>
<define name="GYRO_R_SENS" value="4.97312" integer="16"/>
<define name="ACCEL_X_NEUTRAL" value="9"/>
<define name="ACCEL_Y_NEUTRAL" value="14"/>
<define name="ACCEL_Z_NEUTRAL" value="-16"/>
<!-- SENS ADXL345 16G 31.2 mg/LSB, accel frac 10bit => 31.2 * 2^10 / 1000 = 31.9488-->
<define name="ACCEL_X_SENS" value="38.5866088465" integer="16"/>
<define name="ACCEL_Y_SENS" value="38.7212932023" integer="16"/>
<define name="ACCEL_Z_SENS" value="39.403098907" integer="16"/>
<!-- Calib Toulouse -->
<!--define name="MAG_X_NEUTRAL" value="80"/>
<define name="MAG_Y_NEUTRAL" value="-271"/>
<define name="MAG_Z_NEUTRAL" value="112"/>
<define name="MAG_X_SENS" value="4.44131219218" integer="16"/>
<define name="MAG_Y_SENS" value="4.56234629213" integer="16"/>
<define name="MAG_Z_SENS" value="5.298653926" integer="16"/-->
<!-- Calid IMAV -->
<define name="MAG_X_NEUTRAL" value="308"/>
<define name="MAG_Y_NEUTRAL" value="-395"/>
<define name="MAG_Z_NEUTRAL" value="156"/>
<define name="MAG_X_SENS" value="4.04127878147" integer="16"/>
<define name="MAG_Y_SENS" value="3.99918458069" integer="16"/>
<define name="MAG_Z_SENS" value="4.79859595184" integer="16"/>
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/>
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/>
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/>
</section>
<!-- Magnetic field for Toulouse (declination -16°) -->
<!--section name="AHRS" prefix="AHRS_">
<define name="PROPAGATE_LOW_PASS_RATES" value="1"/>
<define name="H_X" value=" 0.513081"/>
<define name="H_Y" value="-0.00242783"/>
<define name="H_Z" value=" 0.858336"/>
</section-->
<!-- Magnetic field for Gifhorn (declination 2°) -->
<section name="AHRS" prefix="AHRS_">
<define name="PROPAGATE_LOW_PASS_RATES" value="1"/>
<define name="H_X" value="0.3794131"/>
<define name="H_Y" value="0.0141005"/>
<define name="H_Z" value="0.9251199"/>
</section>
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
<!-- setpoints -->
<define name="SP_MAX_PHI" value="45." unit="deg"/>
<define name="SP_MAX_THETA" value="45." unit="deg"/>
<define name="SP_MAX_R" value="90." unit="deg/s"/>
<define name="DEADBAND_R" value="250"/>
<!-- reference -->
<define name="REF_OMEGA_P" value="800" unit="deg/s"/>
<define name="REF_ZETA_P" value="0.85"/>
<define name="REF_MAX_P" value="300." unit="deg/s"/>
<define name="REF_MAX_PDOT" value="RadOfDeg(7000.)"/>
<define name="REF_OMEGA_Q" value="800" unit="deg/s"/>
<define name="REF_ZETA_Q" value="0.85"/>
<define name="REF_MAX_Q" value="300." unit="deg/s"/>
<define name="REF_MAX_QDOT" value="RadOfDeg(7000.)"/>
<define name="REF_OMEGA_R" value="500" unit="deg/s"/>
<define name="REF_ZETA_R" value="0.85"/>
<define name="REF_MAX_R" value="90." unit="deg/s"/>
<define name="REF_MAX_RDOT" value="RadOfDeg(900.)"/>
<!-- feedback -->
<define name="PHI_PGAIN" value="1800"/>
<define name="PHI_DGAIN" value="240"/>
<define name="PHI_IGAIN" value="200"/>
<define name="THETA_PGAIN" value="1800"/>
<define name="THETA_DGAIN" value="240"/>
<define name="THETA_IGAIN" value="200"/>
<define name="PSI_PGAIN" value="1000"/>
<define name="PSI_DGAIN" value="350"/>
<define name="PSI_IGAIN" value="20"/>
<!-- feedforward -->
<define name="PHI_DDGAIN" value="170"/>
<define name="THETA_DDGAIN" value="170"/>
<define name="PSI_DDGAIN" value="170"/>
<define name="PHI_AGAIN" value="0"/>
<define name="THETA_AGAIN" value="0"/>
<define name="PSI_AGAIN" value="0"/>
</section>
<section name="GUIDANCE_V" prefix="GUIDANCE_V_">
<define name="REF_MIN_ZDD" value="-0.5*9.81"/>
<define name="REF_MAX_ZDD" value=" 0.5*9.81"/>
<define name="REF_MIN_ZD" value="-1.5"/>
<define name="REF_MAX_ZD" value=" 1.5"/>
<define name="HOVER_KP" value="130"/>
<define name="HOVER_KD" value="80"/>
<define name="HOVER_KI" value="0"/>
<!-- SPEED_BFP_OF_REAL(1.5) / (MAX_PPRZ/2) -->
<!-- SPEED_BFP_OF_REAL(1.5) * 20% -->
<define name="ADAPT_NOISE_FACTOR" value="1.5"/>
</section>
<section name="GUIDANCE_H" prefix="GUIDANCE_H_">
<define name="MAX_BANK" value="30" unit="deg"/>
<define name="PGAIN" value="50"/>
<define name="DGAIN" value="80"/>
<define name="IGAIN" value="20"/>
<define name="NGAIN" value="0"/>
<!-- feedforward -->
<define name="AGAIN" value="0"/>
</section>
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
</section>
<section name="AUTOPILOT">
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/>
<define name="MODE_AUTO1" value="AP_MODE_ATTITUDE_Z_HOLD"/>
<!--define name="MODE_AUTO2" value="AP_MODE_ATTITUDE_Z_HOLD"/-->
<define name="MODE_AUTO2" value="AP_MODE_NAV"/>
</section>
<section name="FMS">
<define name="BOOZ_FMS_TIMEOUT" value="0"/>
</section>
<section name="CAM" prefix="ROTORCRAFT_CAM_">
<define name="DEFAULT_MODE" value="ROTORCRAFT_CAM_MODE_MANUAL"/>
</section>
<section name="SWITCH_SERVO">
<define name="SWITCH_SERVO_SERVO" value="DROP"/>
<define name="SWITCH_SERVO_ON_VALUE" value="SERVO_DROP_MIN"/>
<define name="SWITCH_SERVO_OFF_VALUE" value="SERVO_DROP_MAX"/>
<define name="DropOpen()" value="SwitchServoOn()"/>
<define name="DropClose()" value="SwitchServoOff()"/>
</section>
<section name="MISC">
<define name="DEFAULT_CIRCLE_RADIUS" value="10."/>
</section>
<section name="GCS">
<define name="ALT_SHIFT_PLUS_PLUS" value="5"/>
<define name="ALT_SHIFT_PLUS" value="1"/>
<define name="ALT_SHIFT_MINUS" value="-1"/>
</section>
</airframe>

View File

@@ -1,241 +0,0 @@
<!-- this is a LadyBird quadrotor frame equiped with Lisa/S 1.0 -->
<!-- The LadyBird frame comes with four brushed motors in an X configuration. -->
<!--
The motor and rotor configuration is the following:
Front
^
|
Motor3(NW) Motor0(NE)
CW CCW
\ /
,___,
| |
| |
|___|
/ \
CCW CW
Motor2(SW) Motor1(SE)
The Lisa/S is rotated by 13deg CCW against the frame.
-->
<!--
Applicable configuration:
airframe="airframes/examples/ladybird_lisa_s"
radio="radios/cockpitSX"
telemetry="telemetry/default_rotorcraft"
flight_plan="flight_plans/rotorcraft_basic"
settings="settings/rotorcraft_basic settings/control/rotorcraft_guidance settings/control/stabilization_att_int"
-->
<airframe name="quadrotor_lisa_s">
<servos driver="Pwm">
<servo name="NE" no="0" min="0" neutral="50" max="1000"/>
<servo name="SE" no="1" min="0" neutral="50" max="1000"/>
<servo name="SW" no="2" min="0" neutral="50" max="1000"/>
<servo name="NW" no="3" min="0" neutral="50" max="1000"/>
</servos>
<commands>
<axis name="PITCH" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
<axis name="THRUST" failsafe_value="0"/>
</commands>
<command_laws>
<call fun="motor_mixing_run(autopilot_get_motors_on(),FALSE,values)"/>
<set servo="NE" value="motor_mixing.commands[0]"/>
<set servo="SE" value="motor_mixing.commands[1]"/>
<set servo="SW" value="motor_mixing.commands[2]"/>
<set servo="NW" value="motor_mixing.commands[3]"/>
</command_laws>
<section name="MIXING" prefix="MOTOR_MIXING_">
<define name="TRIM_ROLL" value="0"/>
<define name="TRIM_PITCH" value="0"/>
<define name="TRIM_YAW" value="0"/>
<define name="NB_MOTOR" value="4"/>
<define name="SCALE" value="256"/>
<define name="ROLL_COEF" value="{ -256, -256, 256, 256 }"/>
<define name="PITCH_COEF" value="{ 256, -256, -256, 256 }"/>
<define name="YAW_COEF" value="{ 256, -256, 256, -256 }"/>
<define name="THRUST_COEF" value="{ 256, 256, 256, 256 }"/>
</section>
<section name="IMU" prefix="IMU_">
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/>
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/>
<define name="BODY_TO_IMU_PSI" value="-13." unit="deg"/>
<define name="ACCEL_X_NEUTRAL" value="0"/>
<define name="ACCEL_Y_NEUTRAL" value="0"/>
<define name="ACCEL_Z_NEUTRAL" value="0"/>
<!-- MAGNETO CALIBRATION DELFT -->
<define name="MAG_X_NEUTRAL" value="286"/>
<define name="MAG_Y_NEUTRAL" value="-72"/>
<define name="MAG_Z_NEUTRAL" value="97"/>
<define name="MAG_X_SENS" value="3.94431833863" integer="16"/>
<define name="MAG_Y_SENS" value="4.14629702271" integer="16"/>
<define name="MAG_Z_SENS" value="4.54518768636" integer="16"/>
<!-- MAGNETO CURRENT CALIBRATION -->
<define name="MAG_X_CURRENT_COEF" value="0.0103422023767"/>
<define name="MAG_Y_CURRENT_COEF" value="0.0084568317783"/>
<define name="MAG_Z_CURRENT_COEF" value="-0.01935617335"/>
</section>
<section name="AUTOPILOT">
<define name="MODE_STARTUP" value="AP_MODE_NAV"/>
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/>
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/>
<define name="MODE_AUTO2" value="AP_MODE_NAV"/>
</section>
<section name="BAT">
<define name="MILLIAMP_AT_FULL_THROTTLE" value="14000"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="3.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="3.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="3.5" unit="V"/>
<define name="MAX_BAT_LEVEL" value="4.1" unit="V"/>
</section>
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
<!-- setpoints -->
<define name="SP_MAX_PHI" value="45." unit="deg"/>
<define name="SP_MAX_THETA" value="45." unit="deg"/>
<define name="SP_MAX_PSI" value="45." unit="deg"/>
<define name="SP_MAX_R" value="90." unit="deg/s"/>
<define name="SP_MAX_P" value="90." unit="deg/s"/>
<define name="DEADBAND_R" value="250"/>
<define name="DEADBAND_A" value="250"/>
<!-- reference -->
<define name="REF_OMEGA_P" value="800" unit="deg/s"/>
<define name="REF_ZETA_P" value="0.85"/>
<define name="REF_MAX_P" value="400." unit="deg/s"/>
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_Q" value="800" unit="deg/s"/>
<define name="REF_ZETA_Q" value="0.85"/>
<define name="REF_MAX_Q" value="400." unit="deg/s"/>
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_R" value="500" unit="deg/s"/>
<define name="REF_ZETA_R" value="0.85"/>
<define name="REF_MAX_R" value="90." unit="deg/s"/>
<define name="REF_MAX_RDOT" value="RadOfDeg(900.)"/>
<!-- feedback -->
<define name="PHI_PGAIN" value="400"/>
<define name="PHI_DGAIN" value="200"/>
<define name="PHI_IGAIN" value="100"/>
<define name="THETA_PGAIN" value="400"/>
<define name="THETA_DGAIN" value="200"/>
<define name="THETA_IGAIN" value="100"/>
<define name="PSI_PGAIN" value="500"/>
<define name="PSI_DGAIN" value="300"/>
<define name="PSI_IGAIN" value="10"/>
<!-- feedforward -->
<define name="PHI_DDGAIN" value="0"/>
<define name="THETA_DDGAIN" value="0"/>
<define name="PSI_DDGAIN" value=" 300"/>
<define name="PHI_AGAIN" value="0"/>
<define name="THETA_AGAIN" value="0"/>
<define name="PSI_AGAIN" value="0"/>
</section>
<section name="INS" prefix="INS_">
</section>
<section name="GUIDANCE_V" prefix="GUIDANCE_V_">
<define name="HOVER_KP" value="276"/>
<define name="HOVER_KD" value="455"/>
<define name="HOVER_KI" value="100"/>
<define name="GUIDANCE_V_NOMINAL_HOVER_THROTTLE" value="0.5"/>
</section>
<section name="AHRS" prefix="AHRS_">
<define name="H_X" value=" 0.47577"/>
<define name="H_Y" value=" 0.11811"/>
<define name="H_Z" value=" 0.87161"/>
</section>
<section name="GUIDANCE_H" prefix="GUIDANCE_H_">
<define name="PGAIN" value="39"/>
<define name="DGAIN" value="50"/>
<define name="IGAIN" value="19"/>
</section>
<section name="SIMULATOR" prefix="NPS_">
<define name="ACTUATOR_NAMES" value="ne_motor, se_motor, sw_motor, nw_motor" type="string[]"/>
<define name="JSBSIM_INIT" value="reset00" type="string"/>
<define name="JSBSIM_MODEL" value="simple_x_quad_ccw" type="string"/>
<define name="SENSORS_PARAMS" value="nps_sensors_params_default.h" type="string"/>
</section>
<modules main_freq="512"/>
<firmware name="rotorcraft">
<target name="ap" board="lisa_s_1.0">
<module name="radio_control" type="superbitrf_rc">
<!-- To store the binding parameters for the superbit radio in your -->
<!-- airframe file uncomment the following three lines and set the -->
<!-- correct values based on the output of the superbitrf telemetry messages. -->
<!--define name="RADIO_TRANSMITTER_ID" value="3028580352"/--> <!-- Esden (1BitSquared) Dx6i: TX 1 -->
<!--define name="RADIO_TRANSMITTER_CHAN" value="8"/>
<define name="RADIO_TRANSMITTER_PROTOCOL" value="18"/-->
<define name="RADIO_MODE" value="RADIO_FLAP"/>
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/>
<!--define name="SUPERBITRF_FORCE_DSM2" value="TRUE"/-->
</module>
<configure name="AHRS_PROPAGATE_FREQUENCY" value="500"/>
<define name="USE_PERSISTENT_SETTINGS" value="TRUE"/>
</target>
<target name="nps" board="pc">
<module name="fdm" type="jsbsim"/>
<module name="radio_control" type="ppm"/>
</target>
<module name="motor_mixing"/>
<module name="actuators" type="pwm">
<!-- This airframe is using the servo PWM outputs directly to drive mosfets, which in turn directly drive brushed motors.
With the following settings we will be driving the motors with a 36KHz signal that should be well above anyone's hearing range.
If we went with the 500Hz that woul be the default we would be hearing a very annoying high pitched sound coming from the motors.
-->
<!-- Setting the PWM timer base frequency to 36MHz -->
<define name="PWM_BASE_FREQ" value="36000000"/>
<!-- Setting the PWM interval to 36KHz -->
<define name="SERVO_HZ" value="36000"/>
<define name="USE_SERVOS_1AND2"/>
</module>
<module name="telemetry" type="superbitrf"/>
<!-- Comment the previous line and uncomment the following one if you need
to use the debug serial interface for telemetry. -->
<!--module name="telemetry" type="transparent"/-->
<module name="imu" type="lisa_s_v1.0">
<define name="LISA_S_UPSIDE_DOWN"/> <!-- Upside down is a relative term. :) -->
</module>
<module name="gps" type="ublox"/>
<module name="gps" type="ubx_ucenter"/>
<module name="stabilization" type="int_quat"/>
<module name="ahrs" type="int_cmpl_quat"/>
<module name="ins"/>
<!--module name="send_imu_mag_current"/-->
</firmware>
</airframe>

View File

@@ -1,26 +1,4 @@
<conf>
<aircraft
name="Ark_Quad"
ac_id="41"
airframe="airframes/AGGIEAIR/aggieair_ark_quad_lisa_mx.xml"
radio="radios/AGGIEAIR/aggieair_taranis.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/lidar_lite.xml modules/gps.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml"
gui_color="#ffff954c0000"
/>
<aircraft
name="BOOZ2"
ac_id="1"
airframe="airframes/examples/booz2.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/dummy.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/ahrs_int_cmpl_euler.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="Bixler"
ac_id="2"
@@ -43,17 +21,6 @@
settings_modules="modules/gps_ubx_ucenter.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="EasyStar_ETS"
ac_id="4"
airframe="airframes/examples/easystar_ets.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing_imu.xml"
flight_plan="flight_plans/basic.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/gps_ubx_ucenter.xml modules/geo_mag.xml modules/air_data.xml modules/ahrs_int_cmpl_quat.xml modules/nav_basic_fw.xml modules/gps.xml modules/imu_common.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="red"
/>
<aircraft
name="Hexa_LisaL"
ac_id="5"
@@ -98,17 +65,6 @@
settings_modules="modules/nav_survey_poly_osam.xml modules/nav_smooth.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/infrared_adc.xml modules/gps.xml modules/imu_common.xml modules/tune_airspeed.xml"
gui_color="#6293ba"
/>
<aircraft
name="Microjet_LisaM"
ac_id="15"
airframe="airframes/examples/microjet_lisa_m.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing_imu.xml"
flight_plan="flight_plans/nav_modules.xml"
settings="settings/fixedwing_basic.xml settings/control/ctl_dash_loiter_trim.xml settings/nps.xml"
settings_modules="modules/nav_survey_poly_osam.xml modules/nav_smooth.xml modules/air_data.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/ahrs_int_cmpl_quat.xml modules/gps.xml modules/imu_common.xml"
gui_color="blue"
/>
<aircraft
name="Minion_Lia"
ac_id="42"
@@ -153,28 +109,6 @@
settings_modules="modules/air_data.xml modules/geo_mag.xml modules/gps_ubx_ucenter.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="Quad_LisaS"
ac_id="163"
airframe="airframes/examples/quadrotor_lisa_s.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/superbitrf.xml settings/nps.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml modules/radio_control_superbitrf_rc.xml modules/gps_ubx_ucenter.xml"
gui_color="white"
/>
<aircraft
name="Quad_NavGo"
ac_id="23"
airframe="airframes/examples/quadrotor_navgo.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml modules/nav_survey_rectangle_rotorcraft.xml modules/digital_cam.xml modules/rotorcraft_cam.xml modules/switch_servo.xml"
gui_color="white"
/>
<aircraft
name="Quad_Navstik"
ac_id="24"
@@ -186,17 +120,6 @@
settings_modules="modules/gps_ubx_ucenter.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_indi_simple.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="#710080"
/>
<aircraft
name="Twinjet"
ac_id="25"
airframe="airframes/examples/twinjet.xml"
radio="radios/cockpitMM.xml"
telemetry="telemetry/default_fixedwing.xml"
flight_plan="flight_plans/versatile.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/infrared_adc.xml modules/nav_basic_fw.xml modules/gps.xml modules/imu_common.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="#ba6293"
/>
<aircraft
name="Twinstar_energyadaptive"
ac_id="26"
@@ -208,17 +131,6 @@
settings_modules="modules/digital_cam.xml modules/air_data.xml modules/nav_basic_fw.xml modules/guidance_energy.xml modules/stabilization_adaptive_fw.xml modules/ahrs_int_cmpl_quat.xml modules/imu_common.xml modules/gps.xml"
gui_color="blue"
/>
<aircraft
name="Twog_IMU"
ac_id="27"
airframe="airframes/examples/twog_analogimu.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing_imu.xml"
flight_plan="flight_plans/versatile.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/nav_basic_fw.xml modules/gps.xml modules/ahrs_float_dcm.xml modules/imu_common.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="blue"
/>
<aircraft
name="Umarim_Lite"
ac_id="28"
@@ -241,39 +153,6 @@
settings_modules="modules/video_rtp_stream.xml modules/geo_mag.xml modules/air_data.xml modules/gps_ubx_ucenter.xml modules/ins_extended.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="red"
/>
<aircraft
name="ardrone2_flightplan_guided_gazebo"
ac_id="35"
airframe="airframes/examples/ardrone2_gazebo.xml"
radio="radios/dummy.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_guided_flightplan.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/video_rtp_stream.xml modules/cv_colorfilter.xml modules/geo_mag.xml modules/air_data.xml modules/gps_ubx_ucenter.xml modules/ins_extended.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="red"
/>
<aircraft
name="ardrone2_gazebo"
ac_id="32"
airframe="airframes/examples/ardrone2_gazebo.xml"
radio="radios/dummy.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_optitrack.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/video_rtp_stream.xml modules/cv_colorfilter.xml modules/cv_opticflow.xml modules/geo_mag.xml modules/air_data.xml modules/ins_extended.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="red"
/>
<aircraft
name="bebop"
ac_id="33"
airframe="airframes/examples/bebop.xml"
radio="radios/dummy.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/video_rtp_stream.xml modules/air_data.xml modules/geo_mag.xml modules/ins_extended.xml modules/ahrs_float_mlkf.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="red"
/>
<aircraft
name="bebop2"
ac_id="203"
@@ -318,26 +197,4 @@
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/guidance_hybrid.xml modules/stabilization_indi_simple.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml modules/gps_ubx_ucenter.xml"
gui_color="blue"
/>
<aircraft
name="setup_elle0"
ac_id="17"
airframe="airframes/examples/setup_elle0.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/dummy.xml"
flight_plan="flight_plans/dummy.xml"
settings="settings/setup_actuators.xml"
settings_modules=""
gui_color="blue"
/>
<aircraft
name="setup_lisam2"
ac_id="38"
airframe="airframes/examples/setup_lisam2.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/dummy.xml"
flight_plan="flight_plans/dummy.xml"
settings="settings/setup_actuators.xml"
settings_modules=""
gui_color="blue"
/>
</conf>

View File

@@ -1,37 +1,4 @@
<conf>
<aircraft
name="Ark_Quad"
ac_id="41"
airframe="airframes/AGGIEAIR/aggieair_ark_quad_lisa_mx.xml"
radio="radios/AGGIEAIR/aggieair_taranis.xml"
telemetry="telemetry/AGGIEAIR/aggieair_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/lidar_lite.xml modules/gps.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml"
gui_color="#ffff954c0000"
/>
<aircraft
name="BOOZ2"
ac_id="1"
airframe="airframes/examples/booz2.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/dummy.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/ahrs_int_cmpl_euler.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="Bixler"
ac_id="2"
airframe="airframes/examples/bixler_lisa_m_2.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing_imu.xml"
flight_plan="flight_plans/versatile.xml"
settings="settings/fixedwing_basic.xml settings/nps.xml"
settings_modules="modules/nav_basic_fw.xml modules/gps.xml modules/ahrs_float_dcm.xml modules/imu_common.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="blue"
/>
<aircraft
name="DelftaCopter"
ac_id="48"
@@ -87,17 +54,6 @@
settings_modules="modules/ahrs_int_cmpl_euler.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="Iris"
ac_id="44"
airframe="airframes/tudelft/iris_indi.xml"
radio="radios/FrSky3dr.xml"
telemetry="telemetry/default_rotorcraft_slow.xml"
flight_plan="flight_plans/tudelft/delft_basic.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="[modules/air_data.xml] modules/geo_mag.xml modules/ins_extended.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_indi_simple.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps_ubx_ucenter.xml modules/gps.xml modules/imu_common.xml"
gui_color="#ffffcccaccca"
/>
<aircraft
name="Iris_chibios"
ac_id="45"
@@ -120,17 +76,6 @@
settings_modules="modules/gps_ubx_ucenter.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_full_pid_fw.xml modules/stabilization_adaptive_fw.xml modules/airspeed_adc.xml modules/imu_common.xml modules/ahrs_float_dcm.xml"
gui_color="#ffff7d7d0000"
/>
<aircraft
name="LadyLisa"
ac_id="7"
airframe="airframes/examples/ladybird_lisa_s.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/superbitrf.xml settings/nps.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml modules/radio_control_superbitrf_rc.xml modules/gps_ubx_ucenter.xml"
gui_color="white"
/>
<aircraft
name="LadyLisaBluetooth"
ac_id="8"
@@ -142,39 +87,6 @@
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml modules/gps_ubx_ucenter.xml"
gui_color="white"
/>
<aircraft
name="LisaLv11_Aspirinv15_FW"
ac_id="9"
airframe="airframes/testhardware/LisaL_v1.1_aspirin_v1.5_fw.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing.xml"
flight_plan="flight_plans/dummy.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/nav_basic_fw.xml modules/ahrs_float_dcm.xml modules/gps.xml modules/imu_common.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="blue"
/>
<aircraft
name="LisaLv11_Aspirinv15_RC"
ac_id="10"
airframe="airframes/testhardware/LisaL_v1.1_aspirin_v1.5_rc.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/dummy.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="LisaLv11_Booz2v12_FW"
ac_id="11"
airframe="airframes/testhardware/LisaL_v1.1_b2_v1.2_fw.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing.xml"
flight_plan="flight_plans/dummy.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/nav_basic_fw.xml modules/ahrs_float_dcm.xml modules/gps.xml modules/imu_common.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="blue"
/>
<aircraft
name="LisaLv11_Booz2v12_RC"
ac_id="12"
@@ -230,17 +142,6 @@
settings_modules="modules/nav_survey_poly_osam.xml modules/nav_smooth.xml modules/air_data.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/ahrs_int_cmpl_quat.xml modules/gps.xml modules/imu_common.xml"
gui_color="blue"
/>
<aircraft
name="Microjet_Twog_Aspirin"
ac_id="16"
airframe="airframes/examples/microjet_twog_aspirin.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing_imu.xml"
flight_plan="flight_plans/basic.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/gps.xml modules/ahrs_float_dcm.xml modules/imu_common.xml"
gui_color="blue"
/>
<aircraft
name="Microjet_xsens_imu"
ac_id="17"
@@ -318,17 +219,6 @@
settings_modules="modules/air_data.xml modules/geo_mag.xml modules/gps_ubx_ucenter.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="Quad_NavGo"
ac_id="23"
airframe="airframes/examples/quadrotor_navgo.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml modules/nav_survey_rectangle_rotorcraft.xml modules/digital_cam.xml modules/rotorcraft_cam.xml modules/switch_servo.xml"
gui_color="white"
/>
<aircraft
name="Quad_Navstik"
ac_id="24"
@@ -351,17 +241,6 @@
settings_modules="modules/air_data.xml modules/geo_mag.xml modules/gps_ubx_ucenter.xml modules/ahrs_float_mlkf.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="blue"
/>
<aircraft
name="Twinjet"
ac_id="25"
airframe="airframes/examples/twinjet.xml"
radio="radios/cockpitMM.xml"
telemetry="telemetry/default_fixedwing.xml"
flight_plan="flight_plans/versatile.xml"
settings="settings/fixedwing_basic.xml"
settings_modules="modules/infrared_adc.xml modules/nav_basic_fw.xml modules/gps.xml modules/imu_common.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="#ba6293"
/>
<aircraft
name="Twinstar_energyadaptive"
ac_id="26"
@@ -428,17 +307,6 @@
settings_modules="modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/ahrs_float_dcm.xml modules/imu_common.xml"
gui_color="blue"
/>
<aircraft
name="ardrone2"
ac_id="31"
airframe="airframes/examples/ardrone2.xml"
radio="radios/dummy.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/video_rtp_stream.xml modules/geo_mag.xml modules/air_data.xml modules/gps_ubx_ucenter.xml modules/ins_extended.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="red"
/>
<aircraft
name="ardrone2_opticflow"
ac_id="32"
@@ -472,17 +340,6 @@
settings_modules="modules/geo_mag.xml modules/gps_ubx_ucenter.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="blue"
/>
<aircraft
name="lisa_l_chimu"
ac_id="35"
airframe="airframes/examples/lisa_l_chimu.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/default_fixedwing_imu.xml"
flight_plan="flight_plans/basic.xml"
settings="settings/fixedwing_basic.xml settings/control/ctl_dash_loiter_trim.xml"
settings_modules="modules/nav_basic_fw.xml modules/gps.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/ahrs_int_cmpl_quat.xml"
gui_color="blue"
/>
<aircraft
name="quad_mavlink"
ac_id="36"
@@ -538,4 +395,26 @@
settings_modules="modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/gps.xml modules/ahrs_int_cmpl_quat.xml"
gui_color="blue"
/>
<aircraft
name="setup_elle0"
ac_id="41"
airframe="airframes/examples/setup_elle0.xml"
radio="radios/cockpitSX.xml"
telemetry="telemetry/dummy.xml"
flight_plan="flight_plans/dummy.xml"
settings="settings/setup_actuators.xml"
settings_modules=""
gui_color="blue"
/>
<aircraft
name="ardrone2_gazebo"
ac_id="44"
airframe="airframes/examples/ardrone2_gazebo.xml"
radio="radios/dummy.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_optitrack.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/video_rtp_stream.xml modules/cv_colorfilter.xml modules/cv_opticflow.xml modules/geo_mag.xml modules/air_data.xml modules/ins_extended.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="red"
/>
</conf>

View File

@@ -1,160 +0,0 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<flight_plan ground_alt="0" alt="75" lat0="43.2375" lon0="1.3277" max_dist_from_home="3500" name="Intelligent Surveillance" qfu="270" security_height="35">
<header>
#include "subsystems/datalink/datalink.h"
</header>
<waypoints>
<waypoint name="HOME" x="0" y="0"/>
<waypoint name="AF" x="200" y="-10" alt="215"/>
<waypoint name="TOD" x="-150" y="0"/>
<waypoint name="TD" x="80" y="20" alt="185"/>
<waypoint name="1" x="-75" y="75"/>
<waypoint name="2" x="75" y="75"/>
<waypoint name="MOB" x="200" y="200"/>
<waypoint name="S1" x="-200" y="-200"/>
<waypoint name="S2" x="300" y="400"/>
<waypoint name="C" x="-250" y="-200"/>
<waypoint name="C1" x="-250" y="-200"/>
<waypoint name="C2" x="350" y="400"/>
<waypoint name="PLUME" x="400" y="300"/>
<waypoint name="BASELEG" x="400" y="350"/>
<waypoint name="CAM_TARGET" x="100" y="-200" alt="0"/>
</waypoints>
<blocks>
<block name="wait GPS">
<while cond="!GpsFixValid()"/>
</block>
<block name="init">
<while cond="LessThan(NavBlockTime(), 10)"/>
<call_once fun="NavSetGroundReferenceHere()"/>
<deroute block="wait"/>
</block>
<block name="wait" strip_button="0">
<circle radius="nav_radius" wp="1"/>
</block>
<block name="ground speed">
<!-- <exception cond="nav_ground_speed_loop()" deroute="ground speed"/> -->
<circle radius="nav_radius" wp="1"/>
</block>
<block name="eight 1" strip_button="8">
<eight radius="nav_radius" center="1" turn_around="2"/>
</block>
<block name="Line">
<call_once fun="nav_line_setup()"/>
<call fun="nav_line_run(WP_1, WP_2, nav_radius)"/>
</block>
<block name="oval">
<oval p1="1" p2="2" radius="nav_radius"/>
</block>
<block name="MOB" strip_button="MOB">
<call_once fun="NavSetWaypointHere(WP_MOB)"/>
<circle wp="MOB" radius="nav_radius"/>
</block>
<block name="Anemotaxis" strip_button="Anem">
<call fun="nav_anemotaxis_downwind(WP_C, 300)"/>
<go from="HOME" wp="C" hmode="route" approaching_time="0"/>
<call_once fun="nav_anemotaxis_init(WP_C)"/>
<call fun="nav_anemotaxis(WP_C, WP_C1, WP_C2, WP_PLUME)"/>
</block>
<block name="Chemotaxis">
<call_once fun="nav_chemotaxis_init(WP_C, WP_PLUME)"/>
<call fun="nav_chemotaxis(WP_C, WP_PLUME)"/>
</block>
<block name="ChemotaxisHere">
<set var="waypoints[WP_C].x" value="GetPosX()"/>
<set var="waypoints[WP_C].y" value="GetPosY()"/>
<deroute block="Chemotaxis"/>
</block>
<block name="Disc survey" strip_button="DS">
<exception cond="chemo_sensor > 0" deroute="ChemotaxisHere"/>
<call_once fun="nav_survey_disc_setup(150)"/>
<call fun="nav_survey_disc_run(WP_HOME, 350)"/>
</block>
<!--
<block name="circle 1 auto pitch">
<circle radius="75" wp="1" pitch="auto" throttle="0.7"/>
</block>
-->
<block name="far away">
<exception cond="datalink_time > 22" deroute="wait"/>
<go approaching_time="0" from="1" hmode="route" wp="2"/>
<go approaching_time="0" from="2" hmode="route" wp="1"/>
</block>
<block name="circle left 1">
<circle radius="-75" wp="1"/>
</block>
<block name="climb 75">
<circle radius="50+(GetPosAlt()-GetAltRef())/2" wp="1" throttle="0.75" pitch="15" vmode="throttle" until="10 > PowerVoltage()"/>
</block>
<block name="climb 1">
<circle radius="50+(GetPosAlt()-GetAltRef())/2" wp="1" climb="1" pitch="5" vmode="climb" until="10 > PowerVoltage()"/>
</block>
<block name="descent 0">
<circle radius="50+(GetPosAlt()-GetAltRef())/2" wp="1" throttle="0.0" pitch="-15" vmode="throttle" until="GetAltRef()+50 > GetPosAlt()"/>
<deroute block="wait"/>
</block>
<block name="route12">
<go approaching_time="0" from="1" hmode="route" wp="2"/>
</block>
<block name="glide12">
<go from="1" hmode="route" vmode="glide" wp="2"/>
</block>
<block name="stack 2">
<circle radius="75" wp="2"/>
</block>
<block name="route21">
<go approaching_time="0" from="2" hmode="route" wp="1"/>
</block>
<block name="stack 1">
<circle radius="75" wp="1"/>
</block>
<block name="survey">
<survey_rectangle grid="nav_survey_shift" wp1="S1" wp2="S2"/>
</block>
<block name="land">
<call_once fun="nav_compute_baseleg(WP_AF, WP_TD, WP_BASELEG)"/>
<circle radius="nav_radius" until="NavCircleCount() > 0.5" wp="BASELEG"/>
<set value="V_CTL_AUTO_THROTTLE_MIN_CRUISE_THROTTLE" var="v_ctl_auto_throttle_cruise_throttle"/>
<circle radius="nav_radius"
until="NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10) && 10 > fabs(GetPosAlt() - WaypointAlt(WP_BASELEG))"
wp="BASELEG"/>
</block>
<block name="final">
<exception cond="GetAltRef() + 10 > GetPosAlt()" deroute="flare"/>
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
</block>
<block name="flare">
<go approaching_time="0" from="AF" hmode="route" throttle="0.0" vmode="throttle" wp="TD"/>
<attitude roll="0.0" throttle="0.0" until="FALSE" vmode="throttle"/>
</block>
</blocks>
</flight_plan>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="250" ground_alt="185" lat0="43.46223" lon0="1.27289" max_dist_from_home="400" name="test laas" qfu="270" security_height="25">
<waypoints>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="250" ground_alt="185" lat0="43.46223" lon0="1.27289" max_dist_from_home="400" name="formation flight" qfu="270" security_height="25">
<waypoints>

View File

@@ -1,50 +0,0 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<flight_plan alt="450" ground_alt="400" lat0="43.4624" lon0="1.2727" max_dist_from_home="1000" name="Generic" qfu="270" security_height="25">
<waypoints>
<waypoint name="HOME" x="0" y="0"/>
<waypoint name="1" x="200" y="0"/>
<waypoint name="2" x="0" y="200"/>
<waypoint name="S1" x="-200" y="-200"/>
<waypoint name="S2" x="300" y="400"/>
</waypoints>
<blocks>
<block name="Wait GPS">
<set value="1" var="autopilot.kill_throttle"/>
<while cond="!GpsFixValid()"/>
</block>
<block name="Geo init">
<while cond="LessThan(NavBlockTime(), 10)"/>
<call_once fun="NavSetGroundReferenceHere()"/>
</block>
<block name="circlehome">
<circle radius="75" wp="HOME"/>
</block>
<block name="circle left home">
<circle radius="-75" wp="HOME"/>
</block>
<block name="climb 75">
<circle radius="50+(GetPosAlt()-GetAltRef())/2" wp="1" throttle="0.75" pitch="15" vmode="throttle" until="10>PowerVoltage()"/>
</block>
<block name="stack 1">
<circle radius="GetPosAlt()/2" wp="1"/>
</block>
<block name="descent 0" strip_button="Descent">
<circle radius="GetPosAlt()/2" wp="1" throttle="0.0" pitch="-15" vmode="throttle"/>
</block>
<block name="route12">
<go approaching_time="0" from="1" hmode="route" wp="2"/>
<deroute block="stack 2"/>
</block>
<block name="route21">
<go approaching_time="0" from="2" hmode="route" wp="1"/>
<deroute block="stack 1"/>
</block>
<block name="stack 2">
<circle radius="75" wp="2"/>
</block>
<block name="survey">
<survey_rectangle grid="150" wp1="S1" wp2="S2"/>
</block>
</blocks>
</flight_plan>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<!--flight_plan alt="120" ground_alt="0" lat0="42.644957" lon0="9.015701" max_dist_from_home="200000" name="Corsica" security_height="70"-->
<flight_plan alt="80" ground_alt="0" lat0="43.771918" lon0="7.499057" max_dist_from_home="200000" name="Corsica" security_height="70" qfu="130">

View File

@@ -1,4 +1,4 @@
<!DOCTYPE procedure SYSTEM "flight_plan.dtd">
<!DOCTYPE procedure SYSTEM "../flight_plan.dtd">
<procedure>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="420" ground_alt="360" lat0="50.230060" lon0="10.990449" max_dist_from_home="1500" name="Flugplatz Steinruecken" security_height="25" QFU="210">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="75" ground_alt="0" lat0="43.4622" lon0="1.2729" max_dist_from_home="1500" name="Versatile" qfu="270" security_height="25">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="170" ground_alt="68" lat0="52.26483" lon0="9.99394" max_dist_from_home="1500" name="Gross Lobke Demo" qfu="270" security_height="60">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="1000" ground_alt="840" lat0="65.007419" lon0="-18.895916" max_dist_from_home="4500" name="Ingolfsskali" qfu="0" security_height="160">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="100" ground_alt="0" lat0="38.9159" lon0="-95.3207" max_dist_from_home="1500" name="KalScott" security_height="25">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="250" ground_alt="185" lat0="43.46223" lon0="1.27289" max_dist_from_home="1000" name="example - Muret for loops" qfu="270" security_height="25">

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="150" ground_alt="10" lat0="78.202961" lon0="15.8310" max_dist_from_home="3000" name="Nordlysstasjonen" qfu="270" security_height="60">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="40" ground_alt="0" lat0="52.170867" lon0="4.412194" max_dist_from_home="1000" name="Transitioning test" security_height="2">
<!-- <flight_plan alt="40" ground_alt="0" lat0="51.979438" lon0="4.390148" max_dist_from_home="1000" name="Transitioning test" security_height="2"> -->

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="35" ground_alt="0" lat0="54.117477" lon0="12.184862" max_dist_from_home="100" name="Krooz Test" security_height="10">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="152" ground_alt="147" lat0="43 33 50.83" lon0="1 28 52.61" max_dist_from_home="150" name="Rotorcraft Basic (Enac)" security_height="2">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="75" ground_alt="0" lat0="43.4622" lon0="1.2729" max_dist_from_home="800" name="Versatile" qfu="270" security_height="25">
<header>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="240" ground_alt="190" lat0="43.4622" lon0="1.2729" max_dist_from_home="1200" name="Versatile" qfu="270" security_height="60">

View File

@@ -1,102 +0,0 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<flight_plan alt="1450" ground_alt="1350" lat0="41.820661" lon0="-111.987935" max_dist_from_home="1500" name="Basic" security_height="25">
<header>
#include "datalink.h"
</header>
<waypoints>
<waypoint name="HOME" x="0" y="0"/>
<waypoint name="STDBY" x="49.5" y="100.1"/>
<waypoint name="1" x="61.1" y="-227.6"/>
<waypoint name="2" x="51.7" y="243.8"/>
<waypoint name="MOB" x="137.0" y="-11.6"/>
<waypoint name="S1" x="-131.2" y="-154.4"/>
<waypoint name="S2" x="304.7" y="242.1"/>
<waypoint name="S3" x="-800" y="-800"/>
<waypoint name="S4" x="800" y="800"/>
<waypoint name="S5" x="800" y="-800"/>
<waypoint name="AF" x="177.4" y="45.1" alt="1380"/>
<waypoint name="TD" x="28.8" y="57.0" alt="1350"/>
<waypoint name="_BASELEG" x="168.8" y="-13.8"/>
<waypoint name="CLIMB" x="-114.5" y="162.3"/>
</waypoints>
<exceptions/>
<blocks>
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
<exception cond="GetPosAlt() > GetAltRef()+25" deroute="Standby"/>
<set value="0" var="autopilot.kill_throttle"/>
<set value="0" var="autopilot.flight_time"/>
<go from="HOME" pitch="15" throttle="1.0" vmode="throttle" wp="CLIMB"/>
</block>
<block name="Standby" strip_button="Standby" strip_icon="home.png">
<circle radius="nav_radius" wp="STDBY"/>
</block>
<block name="Figure 8 around wp 1" strip_button="Figure 8 (wp 1-2)" strip_icon="eight.png">
<eight center="1" radius="nav_radius" turn_around="2"/>
</block>
<block name="Oval 1-2" strip_button="Oval (wp 1-2)" strip_icon="oval.png">
<oval p1="1" p2="2" radius="nav_radius"/>
</block>
<block name="MOB" strip_button="Circle around here" strip_icon="mob.png">
<call_once fun="NavSetWaypointHere(WP_MOB)"/>
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
<circle radius="nav_radius" wp="MOB"/>
</block>
<block name="Line 1-2" strip_button="Line (wp 1-2)" strip_icon="line.png">
<exception cond="datalink_time > 22" deroute="Standby"/>
<call_once fun="nav_line_setup()"/>
<call fun="nav_line_run(WP_1, WP_2, nav_radius)"/>
</block>
<block name="Survey S1-S2" strip_button="Survey (wp S1-S2)" strip_icon="survey.png">
<survey_rectangle grid="35" wp1="S1" wp2="S2"/>
</block>
<block name="Line S4-5" strip_button="Line (S 4-5)">
<exception cond="datalink_time > 22" deroute="Standby"/>
<call_once fun="nav_line_setup()"/>
<call fun="nav_line_run(WP_S4, WP_S5, nav_radius)"/>
</block>
<block name="Steps roll -10, +10">
<while cond="TRUE">
<attitude alt="1410" roll="10.0" until=" stage_time > 6" vmode="alt"/>
<attitude alt="1410" roll="-10.0" until="stage_time > 6" vmode="alt"/>
</while>
</block>
<block name="Steps roll -20, +20">
<while cond="TRUE">
<attitude alt="1410" roll="20.0" until=" stage_time > 3" vmode="alt"/>
<attitude alt="1410" roll="-20.0" until="stage_time > 3" vmode="alt"/>
</while>
</block>
<block name="Steps pitch -10, +10">
<while cond="TRUE">
<attitude alt="1410" pitch="40" roll="0.0" vmode="alt"/>
<set value="1" var="autopilot.kill_throttle"/>
</while>
<set value="0" var="autopilot.kill_throttle"/>
</block>
<block name="Survey S3-S4" strip_button="Survey (wp S3-S4)">
<survey_rectangle grid="150" wp1="S3" wp2="S4"/>
</block>
<block name="Land Right AF-TD" strip_button="Land right (wp AF-TD)" strip_icon="land-right.png">
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
<deroute block="land"/>
</block>
<block name="Land Left AF-TD" strip_button="Land left (wp AF-TD)" strip_icon="land-left.png">
<set value="-DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
<deroute block="land"/>
</block>
<block name="land">
<call_once fun="nav_compute_baseleg(WP_AF, WP_TD, WP__BASELEG, nav_radius)"/>
<circle radius="nav_radius" until="NavCircleCount() > 0.5" wp="_BASELEG"/>
<circle radius="nav_radius" until="NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10) && 10 > fabs(GetPosAlt() - WaypointAlt(WP__BASELEG))" wp="_BASELEG"/>
</block>
<block name="final">
<exception cond="GetAltRef() + 10 > GetPosAlt()" deroute="flare"/>
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
</block>
<block name="flare">
<go approaching_time="0" from="AF" hmode="route" throttle="0.0" vmode="throttle" wp="TD"/>
<attitude roll="0.0" throttle="0.0" until="FALSE" vmode="throttle"/>
</block>
</blocks>
</flight_plan>

View File

@@ -1,34 +0,0 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="enose" dir="enose">
<doc>
<description>Chemical Enose sensor</description>
</doc>
<header>
<file name="enose.h"/>
<file name="chemo_detect.h"/>
</header>
<settings>
<dl_settings NAME="control">
<dl_settings name="enose">
<dl_setting MAX="5000" MIN="0" STEP="1" VAR="enose_val[0]" module="enose/enose" shortname="val0" handler="DecreaseVal0"/>
<dl_setting MAX="5000" MIN="0" STEP="1" VAR="enose_val[1]" module="enose/enose" shortname="val1" handler="DecreaseVal1"/>
<dl_setting MAX="5000" MIN="0" STEP="1" VAR="enose_val[2]" module="enose/enose" shortname="val2" handler="DecreaseVal2"/>
</dl_settings>
</dl_settings>
</settings>
<init fun="enose_init()"/>
<init fun="chemo_init()"/>
<periodic fun="enose_periodic()" freq="4." delay="4" autorun="TRUE"/>
<periodic fun="chemo_periodic()" freq="4." delay="4" autorun="TRUE"/>
<makefile target="ap">
<file name="enose.c"/>
<file name="chemo_detect.c"/>
</makefile>
<makefile target="sim">
<!--file name="$(SRC_ARCH)/sim_enose.c"/-->
<file_arch name="sim_enose.c"/>
<file name="chemo_detect.c"/>
</makefile>
</module>

View File

@@ -1,39 +0,0 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="pbn" dir="sensors">
<doc>
<description>
Pressure Board Navarro.
by Matthieu Navarro (2010)
combine differential and absolute pressure sensor (ETS raw sensors)
controlled by a dspic
return scaled values over I2C
</description>
<define name="PBN_AIRSPEED_SCALE" value="(1./0.54)" description="quadratic scale factor to convert differential pressure to airspeed"/>
<define name="PBN_ALTITUDE_SCALE" value="0.32" description="linear scale factor for altitude"/>
<define name="PBN_PRESSURE_OFFSET" value="101325.0" description="pressure offset"/>
<define name="USE_AIRSPEED_PBN" value="TRUE|FALSE" description="set airspeed in state interface"/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="pbn">
<dl_setting MAX="30" MIN="0" STEP="1" module="sensors/pressure_board_navarro" VAR="pbn.airspeed_filter"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="pressure_board_navarro.h"/>
</header>
<init fun="pbn_init()"/>
<periodic fun="pbn_periodic()" freq="10"/>
<event fun="PbnEvent()"/>
<makefile>
<file name="pressure_board_navarro.c"/>
</makefile>
</module>

View File

@@ -1,29 +0,0 @@
#include "enose/enose.h"
uint8_t enose_status;
uint8_t enose_heat[ENOSE_NB_SENSOR];
uint16_t enose_val[ENOSE_NB_SENSOR];
uint16_t enose_PID_val;
uint16_t nominal_val[ENOSE_NB_SENSOR] = {1500, 1500, 4000};
uint16_t min_val[ENOSE_NB_SENSOR] = {1100, 1200, 2500};
void enose_init(void)
{
int i;
for (i = 0; i < ENOSE_NB_SENSOR; i++) {
enose_val[i] = nominal_val[i];
}
}
void enose_set_heat(uint8_t no_sensor, uint8_t value) { }
void enose_periodic(void)
{
int i;
for (i = 0; i < ENOSE_NB_SENSOR; i++) {
if (enose_val[i] < min_val[i]) {
enose_val[i] = min_val[i];
}
int d = nominal_val[i] - enose_val[i];
enose_val[i] += d / 10.;
}
}

View File

@@ -18,6 +18,9 @@
#define USE_BARO_BOARD 0
#endif
#endif
#include "peripherals/video_device.h"
extern struct video_config_t webcam;
// Simulated cameras, see modules/computer_vision/video_thread_nps.c

View File

@@ -1,108 +0,0 @@
#include "modules/enose/anemotaxis.h"
#include "generated/airframe.h"
#include "state.h"
#include "std.h"
#include "firmwares/fixedwing/nav.h"
#include "generated/flight_plan.h"
#include "subsystems/datalink/downlink.h"
#include "modules/enose/chemo_detect.h"
enum status { UTURN, CROSSWIND };
static enum status status;
static int8_t sign;
static struct point last_plume;
static void last_plume_was_here(void)
{
last_plume.x = stateGetPositionEnu_f()->x;
last_plume.y = stateGetPositionEnu_f()->y;
}
bool nav_anemotaxis_downwind(uint8_t c, float radius)
{
struct FloatVect2 *wind = stateGetHorizontalWindspeed_f();
float wind_dir = atan2(wind->x, wind->y);
waypoints[c].x = waypoints[WP_HOME].x + radius * cos(wind_dir);
waypoints[c].y = waypoints[WP_HOME].y + radius * sin(wind_dir);
return false;
}
bool nav_anemotaxis_init(uint8_t c)
{
status = UTURN;
sign = 1;
struct FloatVect2 *wind = stateGetHorizontalWindspeed_f();
float wind_dir = atan2(wind->x, wind->y);
waypoints[c].x = stateGetPositionEnu_f()->x + DEFAULT_CIRCLE_RADIUS * cos(wind_dir + M_PI);
waypoints[c].y = stateGetPositionEnu_f()->y + DEFAULT_CIRCLE_RADIUS * sin(wind_dir + M_PI);
last_plume_was_here();
return false;
}
bool nav_anemotaxis(uint8_t c, uint8_t c1, uint8_t c2, uint8_t plume)
{
if (chemo_sensor) {
last_plume_was_here();
waypoints[plume].x = stateGetPositionEnu_f()->x;
waypoints[plume].y = stateGetPositionEnu_f()->y;
// DownlinkSendWpNr(plume);
}
struct FloatVect2 *wind = stateGetHorizontalWindspeed_f();
float wind_dir = atan2(wind->x, wind->y) + M_PI;
/** Not null even if wind_east=wind_north=0 */
float upwind_x = cos(wind_dir);
float upwind_y = sin(wind_dir);
switch (status) {
case UTURN:
NavCircleWaypoint(c, DEFAULT_CIRCLE_RADIUS * sign);
if (NavQdrCloseTo(DegOfRad(M_PI_2 - wind_dir))) {
float crosswind_x = - upwind_y;
float crosswind_y = upwind_x;
waypoints[c1].x = waypoints[c].x + DEFAULT_CIRCLE_RADIUS * upwind_x;
waypoints[c1].y = waypoints[c].y + DEFAULT_CIRCLE_RADIUS * upwind_y;
float width = Max(2 * ScalarProduct(upwind_x, upwind_y, stateGetPositionEnu_f()->x - last_plume.x,
stateGetPositionEnu_f()->y - last_plume.y), DEFAULT_CIRCLE_RADIUS);
waypoints[c2].x = waypoints[c1].x - width * crosswind_x * sign;
waypoints[c2].y = waypoints[c1].y - width * crosswind_y * sign;
// DownlinkSendWpNr(c1);
// DownlinkSendWpNr(c2);
status = CROSSWIND;
nav_init_stage();
}
break;
case CROSSWIND:
NavSegment(c1, c2);
if (NavApproaching(c2, CARROT)) {
waypoints[c].x = waypoints[c2].x + DEFAULT_CIRCLE_RADIUS * upwind_x;
waypoints[c].y = waypoints[c2].y + DEFAULT_CIRCLE_RADIUS * upwind_y;
// DownlinkSendWpNr(c);
sign = -sign;
status = UTURN;
nav_init_stage();
}
if (chemo_sensor) {
waypoints[c].x = stateGetPositionEnu_f()->x + DEFAULT_CIRCLE_RADIUS * upwind_x;
waypoints[c].y = stateGetPositionEnu_f()->y + DEFAULT_CIRCLE_RADIUS * upwind_y;
// DownlinkSendWpNr(c);
sign = -sign;
status = UTURN;
nav_init_stage();
}
break;
}
chemo_sensor = 0;
return true;
}

View File

@@ -1,10 +0,0 @@
#ifndef ANEMOTAXIS_H
#define ANEMOTAXIS_H
#include "std.h"
extern bool nav_anemotaxis_downwind(uint8_t c, float radius);
extern bool nav_anemotaxis_init(uint8_t c);
extern bool nav_anemotaxis(uint8_t c, uint8_t c1, uint8_t c2, uint8_t plume);
#endif /** ANEMOTAXIS_H */

View File

@@ -1,38 +0,0 @@
#include "chemo_detect.h"
#include "enose.h"
#define DETECT_PERIOD 8 /* *4Hz */
#define THRESHOLD 150
uint16_t chemo_sensor;
void chemo_init(void)
{
chemo_sensor = 0;
}
void chemo_periodic(void)
{
#ifdef ENOSE
static uint16_t vals[ENOSE_NB_SENSOR][DETECT_PERIOD];
static int idx;
/* Detection on the first sensor */
int dval = enose_val[0] - vals[0][idx];
if (dval < -THRESHOLD) {
chemo_sensor = -dval;
} else {
chemo_sensor = 0;
}
int i;
for (i = 0; i < ENOSE_NB_SENSOR; i++) {
vals[i][idx] = enose_val[i];
}
idx++;
if (idx > DETECT_PERIOD) {
idx = 0;
}
#endif /* ENOSE */
}

View File

@@ -1,12 +0,0 @@
#ifndef CHEMO_DETECT_H
#define CHEMO_DETECT_H
#include "std.h"
extern uint16_t chemo_sensor;
#define MAX_CHEMO 400
void chemo_init(void);
void chemo_periodic(void);
#endif /* CHEMO_DETECT_H */

View File

@@ -1,57 +0,0 @@
#include "modules/enose/chemotaxis.h"
#include "generated/airframe.h"
#include "state.h"
#include "std.h"
#include "firmwares/fixedwing/nav.h"
#include "generated/flight_plan.h"
#include "subsystems/datalink/downlink.h"
#include "modules/enose/chemo_detect.h"
#define MAX_RADIUS 250
#define ALPHA 0.5
static uint8_t last_plume_value;
static float radius;
static int8_t sign;
bool nav_chemotaxis_init(uint8_t c, uint8_t plume)
{
radius = MAX_RADIUS;
last_plume_value = 0;
sign = 1;
waypoints[plume].x = waypoints[c].x;
waypoints[plume].y = waypoints[c].y;
return false;
}
bool nav_chemotaxis(uint8_t c, uint8_t plume)
{
if (chemo_sensor > last_plume_value) {
/* Move the circle in this direction */
float x = stateGetPositionEnu_f()->x - waypoints[plume].x;
float y = stateGetPositionEnu_f()->y - waypoints[plume].y;
waypoints[c].x = waypoints[plume].x + ALPHA * x;
waypoints[c].y = waypoints[plume].y + ALPHA * y;
// DownlinkSendWpNr(c);
/* Turn in the right direction */
float dir_x = cos(M_PI_2 - stateGetHorizontalSpeedDir_f());
float dir_y = sin(M_PI_2 - stateGetHorizontalSpeedDir_f());
float pvect = dir_x * y - dir_y * x;
sign = (pvect > 0 ? -1 : 1);
/* Reduce the radius */
radius = sign * (DEFAULT_CIRCLE_RADIUS + (MAX_CHEMO - chemo_sensor) / (float)MAX_CHEMO *
(MAX_RADIUS - DEFAULT_CIRCLE_RADIUS));
/* Store this plume */
waypoints[plume].x = stateGetPositionEnu_f()->x;
waypoints[plume].y = stateGetPositionEnu_f()->y;
// DownlinkSendWpNr(plume);
last_plume_value = chemo_sensor;
}
NavCircleWaypoint(c, radius);
return true;
}

View File

@@ -1,9 +0,0 @@
#ifndef CHEMOTAXIS_H
#define CHEMOTAXIS_H
#include "std.h"
extern bool nav_chemotaxis_init(uint8_t c, uint8_t plume);
extern bool nav_chemotaxis(uint8_t c, uint8_t plume);
#endif /** CHEMOTAXIS_H */

View File

@@ -1,92 +0,0 @@
#include <string.h>
#include "modules/enose/enose.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/adc.h"
#include BOARD_CONFIG
uint8_t enose_status;
uint8_t enose_heat[ENOSE_NB_SENSOR];
uint16_t enose_val[ENOSE_NB_SENSOR];
uint16_t enose_PID_val;
#define ENOSE_SLAVE_ADDR 0xAE
#define ENOSE_PWM_ADDR 0x06
#define ENOSE_DATA_ADDR 0x00
#define ENOSE_HEAT_INIT 237
static uint8_t enose_conf_requested;
static volatile bool enose_i2c_done;
static struct adc_buf buf_PID;
void enose_init(void)
{
uint8_t i;
for (i = 0; i < ENOSE_NB_SENSOR; i++) {
enose_heat[i] = ENOSE_HEAT_INIT;
enose_val[i] = 0;
}
enose_status = ENOSE_IDLE;
enose_conf_requested = true;
enose_i2c_done = true;
#ifdef ADC_CHANNEL_PID
adc_buf_channel(ADC_CHANNEL_PID, &buf_PID, ADC_CHANNEL_PID_NB_SAMPLES);
#endif
}
void enose_set_heat(uint8_t no_sensor, uint8_t value)
{
enose_heat[no_sensor] = value;
enose_conf_requested = true;
}
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
void enose_periodic(void)
{
enose_PID_val = buf_PID.sum / buf_PID.av_nb_sample;
if (enose_i2c_done) {
if (enose_conf_requested) {
const uint8_t msg[] = { ENOSE_PWM_ADDR, enose_heat[0], enose_heat[1], enose_heat[2] };
memcpy((void *)i2c0_buf, msg, sizeof(msg));
i2c0_transmit(ENOSE_SLAVE_ADDR, sizeof(msg), &enose_i2c_done);
enose_i2c_done = false;
enose_conf_requested = false;
} else if (enose_status == ENOSE_IDLE) {
enose_status = ENOSE_MEASURING_WR;
const uint8_t msg[] = { ENOSE_DATA_ADDR };
memcpy((void *)i2c0_buf, msg, sizeof(msg));
i2c0_transmit(ENOSE_SLAVE_ADDR, sizeof(msg), &enose_i2c_done);
enose_i2c_done = false;
} else if (enose_status == ENOSE_MEASURING_WR) {
enose_status = ENOSE_MEASURING_RD;
i2c0_receive(ENOSE_SLAVE_ADDR, 6, &enose_i2c_done);
enose_i2c_done = false;
} else if (enose_status == ENOSE_MEASURING_RD) {
uint16_t val = (i2c0_buf[0] << 8) | i2c0_buf[1];
if (val < 5000) {
enose_val[0] = val;
}
val = (i2c0_buf[2] << 8) | i2c0_buf[3];
if (val < 5000) {
enose_val[1] = val;
}
val = (i2c0_buf[4] << 8) | i2c0_buf[5];
if (val < 5000) {
enose_val[2] = val;
}
enose_status = ENOSE_IDLE;
}
}
DOWNLINK_SEND_ENOSE_STATUS(DefaultChannel, DefaultDevice, &enose_val[0], &enose_val[1], &enose_val[2], &enose_PID_val,
3, enose_heat);
}

View File

@@ -1,34 +0,0 @@
#ifndef ENOSE_H
#define ENOSE_H
#include "std.h"
#define ENOSE_NB_SENSOR 3
extern uint8_t enose_heat[ENOSE_NB_SENSOR];
extern uint16_t enose_val[ENOSE_NB_SENSOR];
extern uint16_t enose_PID_val;
#define ENOSE_IDLE 0
#define ENOSE_SETTINGS 1
#define ENOSE_MEASURING_WR 2
#define ENOSE_MEASURING_RD 3
extern uint8_t enose_status;
extern void enose_init(void);
extern void enose_set_heat(uint8_t no_sensor, uint8_t value);
extern void enose_periodic(void);
#define enose_SetHeat0(val) {enose_set_heat(0, val);}
#define enose_SetHeat1(val) {enose_set_heat(1, val);}
#define enose_SetHeat2(val) {enose_set_heat(2, val);}
#define enose_DecreaseVal0(_x) { enose_val[0] -= _x; }
#define enose_DecreaseVal1(_x) { enose_val[1] -= _x; }
#define enose_DecreaseVal2(_x) { enose_val[2] -= _x; }
#endif /* ENOSE_H */

View File

@@ -1,161 +0,0 @@
/*
* Copyright (C) 2010 ENAC
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
/** @file modules/sensors/pressure_board_navarro.c
* Pressure Board Navarro
*/
#include "pressure_board_navarro.h"
#include "subsystems/abi.h"
#ifndef USE_AIRSPEED_PBN
#if USE_AIRSPEED
#define USE_AIRSPEED_PBN TRUE
PRINT_CONFIG_MSG("USE_AIRSPEED_PBN automatically set to TRUE")
#endif
#endif
#if USE_AIRSPEED_PBN
#include "state.h"
#endif
/** Default I2C device on tiny is i2c0
*/
#ifndef PBN_I2C_DEV
#define PBN_I2C_DEV i2c0
#endif
/** Sensor I2C slave address */
#define PBN_I2C_ADDR 0x28
/** Number of values to compute an offset at startup */
#define OFFSET_NBSAMPLES_AVRG 100
/** Number of loops before starting to store data */
#define PBN_START_DELAY 30
/** Weight for offset IIR filter */
#define PBN_OFFSET_FILTER 7
/** Quadratic scale factor for airspeed */
#ifndef PBN_AIRSPEED_SCALE
#define PBN_AIRSPEED_SCALE (1./0.54)
#endif
/** Linear scale factor for altitude */
#ifndef PBN_ALTITUDE_SCALE
#define PBN_ALTITUDE_SCALE 0.32
#endif
#ifndef PBN_PRESSURE_OFFSET
#define PBN_PRESSURE_OFFSET 101325.0
#endif
// Global variables
struct PBNState pbn;
struct i2c_transaction pbn_trans;
static uint16_t offset_cnt;
static uint16_t startup_delay;
void pbn_init(void)
{
startup_delay = PBN_START_DELAY;
pbn.altitude_offset = 0;
pbn.airspeed_offset = 0;
pbn.airspeed_adc = 0;
pbn.altitude_adc = 0;
pbn.data_valid = true;
offset_cnt = OFFSET_NBSAMPLES_AVRG;
pbn.airspeed = 0.;
pbn.altitude = 0.;
pbn.airspeed_filter = PBN_OFFSET_FILTER;
}
void pbn_periodic(void)
{
if (startup_delay > 0) {
--startup_delay;
return;
}
// Initiate next read
pbn_trans.buf[0] = 0;
i2c_transceive(&PBN_I2C_DEV, &pbn_trans, PBN_I2C_ADDR, 1, 4);
}
void pbn_read_event(void)
{
pbn_trans.status = I2CTransDone;
// Get raw values from buffer
pbn.airspeed_adc = ((uint16_t)(pbn_trans.buf[0]) << 8) | (uint16_t)(pbn_trans.buf[1]);
pbn.altitude_adc = ((uint16_t)(pbn_trans.buf[2]) << 8) | (uint16_t)(pbn_trans.buf[3]);
// Consider 0 as a wrong value
if (pbn.airspeed_adc == 0 || pbn.altitude_adc == 0) {
pbn.data_valid = false;
} else {
pbn.data_valid = true;
if (offset_cnt > 0) {
// IIR filter to compute an initial offset
#ifndef PBN_AIRSPEED_OFFSET
pbn.airspeed_offset = (PBN_OFFSET_FILTER * pbn.airspeed_offset + pbn.airspeed_adc) /
(PBN_OFFSET_FILTER + 1);
#else
pbn.airspeed_offset = PBN_AIRSPEED_OFFSET;
#endif
#ifndef PBN_ALTITUDE_OFFSET
pbn.altitude_offset = (PBN_OFFSET_FILTER * pbn.altitude_offset + pbn.altitude_adc) /
(PBN_OFFSET_FILTER + 1);
#else
pbn.altitude_offset = PBN_ALTITUDE_OFFSET;
#endif
// decrease init counter
--offset_cnt;
} else {
// Compute pressure
float pressure = PBN_ALTITUDE_SCALE * (float) pbn.altitude_adc + PBN_PRESSURE_OFFSET;
AbiSendMsgBARO_ABS(BARO_PBN_SENDER_ID, pressure);
// Compute airspeed and altitude
//pbn_airspeed = (-4.45 + sqrtf(19.84-0.57*(float)(airspeed_offset-airspeed_adc)))/0.28;
uint16_t diff = Max(pbn.airspeed_adc - pbn.airspeed_offset, 0);
float tmp_airspeed = sqrtf((float)diff * PBN_AIRSPEED_SCALE);
pbn.airspeed = (pbn.airspeed_filter * pbn.airspeed + tmp_airspeed) /
(pbn.airspeed_filter + 1.);
#if USE_AIRSPEED_PBN
stateSetAirspeed_f(pbn.airspeed);
#endif
pbn.altitude = PBN_ALTITUDE_SCALE * (float)(pbn.altitude_adc - pbn.altitude_offset);
}
}
}

View File

@@ -1,62 +0,0 @@
/*
* Copyright (C) 2010 ENAC
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
/** @file modules/sensors/pressure_board_navarro.h
*
* Pressure Board Navarro (2010)
*
* by Matthieu Navarro
*
* combine differential and absolute pressure sensor (ETS raw sensors)
* controlled by a dspic
* return scaled values over I2C
*
*/
#ifndef PRESSURE_BOARD_NAVARRO_H
#define PRESSURE_BOARD_NAVARRO_H
#include "std.h"
#include "mcu_periph/i2c.h"
struct PBNState {
uint16_t altitude_adc;
uint16_t airspeed_adc;
uint16_t altitude_offset;
uint16_t airspeed_offset;
float altitude;
float airspeed;
float airspeed_filter;
bool data_valid;
};
extern struct PBNState pbn;
extern struct i2c_transaction pbn_trans;
extern void pbn_init(void);
extern void pbn_periodic(void);
extern void pbn_read_event(void);
#define PbnEvent() { if (pbn_trans.status == I2CTransSuccess) pbn_read_event(); }
#endif // PRESSURE_BOARD_NAVARRO_H

Some files were not shown because too many files have changed in this diff Show More