Aggieair updates (#2081)

* Updated aggie air configs

* Updated configs and some small compilation fixes

* Added layouts and control_panel updates

* An example with a new flight plan. Note the plane doesn't fly very well because of the model mismatch.
This commit is contained in:
Michal Podhradsky
2017-06-21 10:51:53 -07:00
committed by GitHub
parent 979543cf53
commit 8806e853f3
21 changed files with 1161 additions and 93 deletions

View File

@@ -0,0 +1,342 @@
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
<!-- Minion Airframe
aileron, elevator, rudder, flaps (optional)
TWOG - 4S compliant
UGEAR 2.0
Xbee modem in API mode
Airspeed Sensor - with Airspeed warning
-->
<airframe name="Pinot Ummarine Lite V2">
<!-- Servo Configuration -->
<servos>
<servo name="THROTTLE" no="0" min="1100" neutral="1100" max="1900"/>
<servo name="AILERON_RIGHT" no="1" min="1900" neutral="1500" max="1100"/>
<servo name="AILERON_LEFT" no="2" min="1900" neutral="1500" max="1100"/>
<servo name="ELEVATOR" no="3" min="1100" neutral="1500" max="1900"/>
<servo name="RUDDER" no="4" min="1100" neutral="1500" max="1900"/>
<servo name="FLAP" no="5" min="1900" neutral="1900" max="1100"/>
<servo name="KNOB" no="6" min="1100" neutral="1500" max="1900"/>
</servos>
<!-- Servo Command Structure -->
<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"/>
<axis name="FLAP" failsafe_value="0"/>
<axis name="CROW" failsafe_value="0"/>
</commands>
<!-- RC Command Structure -->
<rc_commands>
<set command="THROTTLE" value="@THROTTLE"/>
<set command="ROLL" value="@ROLL"/>
<set command="PITCH" value="@PITCH"/>
<set command="YAW" value="@YAW"/>
<set command="FLAP" value="@FLAP"/>
<set command="CROW" value="@KNOB"/>
</rc_commands>
<!-- Define RC commands to Servo in Auto Mode -->
<auto_rc_commands>
<set command="YAW" value="@YAW"/>
<set command="FLAP" value="@FLAP"/>
<set command="CROW" value="@KNOB"/>
</auto_rc_commands>
<!-- Define Mixing Parameters -->
<section name="MIXER">
<define name="AILERON_AILERON_RATE" value="0.9"/>
<define name="AILERON_CROW_RATE" value="0.6"/>
<define name="FLAP_CROW_RATE" value="1.0"/>
<define name="ELEV_CROW_RATE" value="0.35"/>
<define name="ELEV_ELEV_RATE" value="0.8"/>
</section>
<!-- Define RC commands to Servos in Manual -->
<command_laws>
<let var="aileron" value="@ROLL * AILERON_AILERON_RATE"/>
<let var="crow" value="@CROW * AILERON_CROW_RATE"/>
<let var="crowf" value="@CROW * FLAP_CROW_RATE"/>
<let var="elevf" value="@CROW * ELEV_CROW_RATE"/>
<let var="elevator" value="@PITCH * ELEV_ELEV_RATE"/>
<set servo="THROTTLE" value="@THROTTLE"/>
<set servo="AILERON_RIGHT" value="$aileron + $crow"/> <!--flip signs if necessary -->
<set servo="AILERON_LEFT" value=" - $aileron + $crow"/>
<set servo="ELEVATOR" value="$elevator - $elevf"/>
<set servo="RUDDER" value="@YAW"/>
<set servo="FLAP" value="$crowf"/>
<set servo="KNOB" value="@FLAP"/>
</command_laws>
<!-- Define Max Roll and Pitch setpoints in Auto1 -->
<section name="AUTO1" prefix="AUTO1_">
<define name="MAX_ROLL" value="0.6"/>
<define name="MAX_PITCH" value="0.6"/>
</section>
<!-- Define Roll, Pitch Neutrals -->
<section name="INS" prefix="INS_">
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
</section>
<!-- Define current estimator and Battery Level Warnings -->
<section name="BAT">
<define name="MILLIAMP_AT_FULL_THROTTLE" value="50000"/>
<define name="CURRENT_ESTIMATION_NONLINEARITY" value="1.3"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="13.5" unit="V"/>
<define name="LOW_BAT_LEVEL" value="14.1" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="13.8" unit="V"/>
<define name="MAX_BAT_LEVEL" value="16.5" unit="V" />
<!--<define name="VoltageOfAdc(adc)" value="(0.029*adc)"/>-->
</section>
<!-- Define Airspeed Warnings for GCS (optional) -->
<section name="AIRSPEED_WARNING">
<define name="WARNING_AIRSPEED" value="12"/>
<define name="CRITIC_AIRSPEED" value="10"/>
<define name="CATASTROPHIC_AIRSPEED" value="8"/>
</section>
<section name="MISC">
<define name="NOMINAL_AIRSPEED" value="16." unit="m/s"/> <!-- GCS only -->
<define name="CARROT" value="5." unit="s"/> <!-- GCS only -->
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
<define name="CONTROL_RATE" value="60" unit="Hz"/>
<define name="XBEE_INIT" value="&quot;ATRN5\rATTT80\r&quot;"/>
<!-- ATRN - random delay for retransmits -->
<!-- ATTT - streaming limit before a delay is forced -->
<define name="ALT_KALMAN_ENABLED" value="TRUE"/>
<define name="DEFAULT_CIRCLE_RADIUS" value="150."/>
<define name="DEFAULT_LANDING_CIRCLE_RADIUS" value="150"/>
<define name="RC_LOST_MODE" value="AP_MODE_AUTO2"/>
</section>
<!-- Vertical Control done with Throttle and Pitch-->
<section name="VERTICAL CONTROL" prefix="V_CTL_">
<define name="POWER_CTL_BAT_NOMINAL" value="23.2" unit="volt"/>
<define name="ALTITUDE_PGAIN" value="0.136" unit="(m/s)/m"/> <!-- outer loop proportional gain -->
<define name="ALTITUDE_MAX_CLIMB" value="3." unit="m/s"/> <!-- outer loop saturation -->
<!-- auto throttle inner loop -->
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.42" unit="%"/>
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.20" unit="%"/>
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.70" unit="%"/>
<define name="AUTO_THROTTLE_LOITER_TRIM" value="1500" unit="pprz_t"/>
<define name="AUTO_THROTTLE_DASH_TRIM" value="-4000" unit="pprz_t"/>
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.05" unit="%/(m/s)"/>
<define name="AUTO_THROTTLE_PGAIN" value="0.010"/>
<define name="AUTO_THROTTLE_IGAIN" value="0.01"/>
<define name="AUTO_THROTTLE_DGAIN" value="0.00"/>
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.142"/>
<define name="AUTO_THROTTLE_PITCH_OF_VZ_DGAIN" value="0.00"/>
<define name="THROTTLE_SLEW_LIMITER" value="2" unit="s"/>
<!-- auto pitch inner loop -->
<define name="AUTO_PITCH_PGAIN" value="0.1"/>
<define name="AUTO_PITCH_IGAIN" value="0.025"/>
<define name="AUTO_PITCH_MAX_PITCH" value="0.31415" unit="rad"/>
<define name="AUTO_PITCH_MIN_PITCH" value="-0.31415" unit="rad"/>
<!-- landing control loop -->
<define name="LANDING_THROTTLE_PGAIN" value="600.0"/>
<define name="LANDING_THROTTLE_IGAIN" value="10.0"/>
<define name="LANDING_THROTTLE_MAX" value="0.65"/>
<define name="LANDING_DESIRED_SPEED" value="18" unit="m/s"/>
<define name="LANDING_PITCH_PGAIN" value="0.1"/>
<define name="LANDING_PITCH_IGAIN" value="0.1"/>
<define name="LANDING_PITCH_LIMITS" value="0.2" unit="rad"/>
<define name="LANDING_PITCH_FLARE" value="0.06"/>
<define name="LANDING_ALT_THROTTLE_KILL" value="15" unit="m"/>
<define name="LANDING_ALT_FLARE" value="5" unit="m"/>
</section>
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
<define name="COURSE_PGAIN" value="1.135"/>
<define name="COURSE_DGAIN" value="0.35"/>
<define name="ROLL_MAX_SETPOINT" value="0.6" unit="rad"/>
<define name="PITCH_MAX_SETPOINT" value="0.35" unit="rad"/>
<define name="PITCH_MIN_SETPOINT" value="-0.2" unit="rad"/>
<define name="PITCH_PGAIN" value="12900."/>
<define name="PITCH_DGAIN" value="1.5"/>
<define name="ROLL_ATTITUDE_GAIN" value="9000"/>
<define name="ROLL_RATE_GAIN" value="1600"/>
<define name="ELEVATOR_OF_ROLL" value="1250"/>
<define name="ROLL_SLEW" value="0.1"/>
</section>
<section name="AGGRESSIVE" prefix="AGR_">
<define name="BLEND_START" value="20"/> <!-- Altitude Error to Initiate Aggressive Climb CANNOT BE ZERO!!-->
<define name="BLEND_END" value="10"/> <!-- Altitude Error to Blend Aggressive to Regular Climb Modes CANNOT BE ZERO!!-->
<define name="CLIMB_THROTTLE" value="0.75"/> <!-- Throttle for Aggressive Climb -->
<define name="CLIMB_PITCH" value="0.13"/> <!-- Pitch for Aggressive Climb -->
<define name="DESCENT_THROTTLE" value="0.10"/> <!-- Throttle for Aggressive Decent -->
<define name="DESCENT_PITCH" value="-0.17"/> <!-- Pitch for Aggressive Decent in radians-->
<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>
<!-- Launcher Takeoff Configuration -->
<section name="Takeoff" prefix="Takeoff_">
<define name="Pitch" value="0.23" unit="rad"/>
<define name="Height" value="70" unit="m"/>
<define name="Speed" value="8" unit="m/s"/>
<define name="Distance" value="30" unit="m"/>
<define name="MinSpeed" value="5" unit="m/s"/>
</section>
<!-- Skid Landing Configuration -->
<section name="Landing" prefix="Landing_">
<define name="AFHeight" value="50" unit="m"/>
<define name="FinalHeight" value="50" unit="m"/>
<define name="FinalStageTime" value="10" unit="s"/>
</section>
<!-- Define Kill Position -->
<section name="FAILSAFE" prefix="FAILSAFE_">
<define name="DELAY_WITHOUT_GPS" value="5" unit="s"/>
<define name="DEFAULT_THROTTLE" value="0" unit="%"/>
<define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
<define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
</section>
<section name="SIMULATOR" prefix="NPS_">
<define name="JSBSIM_LAUNCHSPEED" value="25"/>
<define name="JSBSIM_MODEL" value="AGGIEAIR/minion" type="string"/>
<define name="SENSORS_PARAMS" value="nps_sensors_params_invariant.h" type="string"/>
<define name="JS_AXIS_THROTTLE" value="0"/>
<define name="JS_AXIS_THROTTLE_REVERSED" value="1"/>
<define name="JS_AXIS_ROLL" value="1"/>
<define name="JS_AXIS_PITCH" value="2"/>
<define name="JS_AXIS_PITCH_REVERSED" value="1"/>
<define name="JS_AXIS_YAW" value="3"/>
<define name="JS_AXIS_YAW_REVERSED" value="1"/>
<define name="JS_AXIS_FLAPS" value="5"/>
<define name="JS_AXIS_MODE" value="7"/>
<define name="JSBSIM_ROLL_TRIM" value="0.008"/>
<define name="JSBSIM_PITCH_TRIM" value="0.0375"/>
<define name="JSBSIM_YAW_TRIM" value="0.001"/>
</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="0." unit="deg"/>
<!-- Dummy Mag values for NPS -
replace with your own calibration -->
<define name="MAG_X_NEUTRAL" value="0"/>
<define name="MAG_Y_NEUTRAL" value="0"/>
<define name="MAG_Z_NEUTRAL" value="0"/>
</section>
<!-- **************************************************************** -->
<firmware name="fixedwing">
<target name="ap" board="umarim_lite_2.0"/>
<module name="radio_control" type="ppm"/>
<!-- NOTE: if you want to use extra_dl module for HITL
you have to set TELEMETRY_FREQUENCY to CONTROL_FREQUENCY -->
<configure name="PERIODIC_FREQUENCY" value="100"/>
<define name="CONTROL_FREQUENCY" value="100"/>
<configure name="TELEMETRY_FREQUENCY" value="100"/>
<define name="SERVO_HZ" value="100"/>
<target name="nps" board="pc">
<module name="fdm" type="jsbsim"/>
</target>
<target name="hitl" board="pc">
<module name="fdm" type="jsbsim"/>
<configure name="INS_DEV" value="/dev/ttyUSB1"/>
<configure name="INS_BAUD" value="B921600"/>
<configure name="AP_DEV" value="/dev/ttyUSB2"/>
<configure name="AP_BAUD" value="B921600"/>
</target>
<module name="control"/>
<module name="navigation"/>
<module name="telemetry" type="xbee_api">
<configure name="MODEM_PORT" value="UART1"/>
<configure name="MODEM_BAUD" value="B57600"/>
</module>
<module name="ins" type="vectornav">
<configure name="VN_PORT" value="UART0"/>
<configure name="VN_BAUD" value="B230400"/>
</module>
<define name="POLY_OSAM_HALF_SWEEP_ENABLED" value="FALSE"/>
<define name="GEOFENCE_DATALINK_LOST_TIME" value="45"/>
<!-- Extra Definitions -->
<define name="AGR_CLIMB" />
<define name="LOITER_TRIM" />
<define name="ALT_KALMAN" />
<define name="SixCellBatt"/>
<define name="SYS_TIME_LED" value="1"/>
<define name="TUNE_AGRESSIVE_CLIMB"/>
<define name="WIND_INFO"/>
<define name="WIND_INFO_RET"/>
</firmware>
<!-- Modules -->
<modules>
<module name="nav" type="line"/>
<module name="nav" type="flower"/>
<module name="nav" type="survey_poly_osam"/>
<module name="nav" type="launcher"/>
<module name="nav" type="skid_landing"/>
<module name="extra_dl">
<configure name="EXTRA_DL_PORT" value="usb_serial"/>
<configure name="EXTRA_DL_BAUD" value="B921600"/>
</module>
<!-- Airspeed Sensor -->
<!--TODO: better to replace with air-data module and airspeed_ms45xx_i2c module-->
<module name="airspeed_adc">
<configure name="ADC_AIRSPEED" value="ADC_3"/>
<configure name="AIRSPEED_PIN" value="ADC_3"/>
<define name="AIRSPEED_ADC_SCALE" value="4.4083"/>
<define name="AIRSPEED_ADC_BIAS" value="740"/>
<define name="USE_AIRSPEED_ADC" value="TRUE"/>
</module>
<!-- Angle of Attack and Sideslip Angle -->
<!-- TODO: using AoA module only, not sure if we ever use sideslip anymore -->
<module name="AOA_adc">
<configure name="ADC_AOA" value="ADC_2"/>
<define name="AOA_OFFSET" value="0.0"/>
<define name="AOA_FILTER" value="0.0"/>
<define name="USE_AOA" value="TRUE"/>
</module>
<!-- I2C Payload -->
<!--load name="aggiecap2_i2c.xml">
<define name="I2C_SLAVE_ADDR" value="0x30"/>
<define name="I2C_BUF_LEN" value="256"/>
<define name="USE_I2C0_SLAVE"/>
</load-->
<!-- System Monitor -->
<module name="sys_mon"/>
</modules>
</airframe>

View File

@@ -63,16 +63,13 @@ Aggie Air ARK
<configure name="EXTRA_DL_PORT" value="UART1"/>
<configure name="EXTRA_DL_BAUD" value="B921600"/>
</module>
<module name="lidar_sf11">
<configure name="LIDAR_SF11_I2C_DEV" value="i2c2"/>
</module>
<!--module name="battery_monitor.xml">
<module name="battery_monitor.xml">
<define name="BATMON_REV4" value="0"/>
<define name="BATMON_CURRENT_OFFSET" value="-120"/>
<define name="BATMON_CURRENT_SENSITIVITY" value="25.6"/>
<define name="BATMON_TEMP_OFFSET" value="250"/>
<define name="BATMON_TEMP_SENSITIVITY" value="10"/>
</module-->
</module>
</modules>
<!--These values are set for the Castle Creations HV Lite 60A ESCs-->

View File

@@ -37,7 +37,7 @@ AggieAir Blujayujay
<module name="telemetry" type="transparent">
<configure name="MODEM_PORT" value="UART3"/>
<configure name="MODEM_BAUD" value="B115200"/>
<configure name="MODEM_BAUD" value="B57600"/>
</module>
<module name="ins" type="vectornav">
@@ -67,13 +67,13 @@ AggieAir Blujayujay
<module name="lidar_sf11">
<configure name="LIDAR_SF11_I2C_DEV" value="i2c2"/>
</module>
<!--module name="battery_monitor.xml">
<module name="battery_monitor.xml">
<define name="BATMON_REV4" value="1"/>
<define name="BATMON_CURRENT_OFFSET" value="-120"/>
<define name="BATMON_CURRENT_SENSITIVITY" value="25.6"/>
<define name="BATMON_TEMP_OFFSET" value="250"/>
<define name="BATMON_TEMP_SENSITIVITY" value="10"/>
</module-->
</module>
</modules>
<!-- commands section -->

View File

@@ -0,0 +1,306 @@
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
<!--
AggieAir Blujayujay
-->
<airframe name="Bl">
<firmware name="fixedwing">
<target name="ap" board="lisa_mx_2.1">
<module name="radio_control" type="sbus">
<configure name="SBUS_PORT" value="UART5"/>
</module>
<configure name="HAS_LUFTBOOT" value="0"/>
<configure name="FLASH_MODE" value="DFU"/>
</target>
<!-- NOTE: if you want to use extra_dl module for HITL
you have to set TELEMETRY_FREQUENCY to CONTROL_FREQUENCY -->
<configure name="PERIODIC_FREQUENCY" value="100"/>
<define name="CONTROL_FREQUENCY" value="100"/>
<configure name="TELEMETRY_FREQUENCY" value="100"/>
<define name="SERVO_HZ" value="100"/>
<target name="nps" board="pc">
<module name="fdm" type="jsbsim"/>
<module name="radio_control" type="spektrum"/>
</target>
<target name="hitl" board="pc">
<module name="fdm" type="jsbsim"/>
<module name="imu" type="nps"/>
<module name="radio_control" type="spektrum"/>
<configure name="INS_DEV" value="/dev/ttyUSB1"/>
<configure name="INS_BAUD" value="B921600"/>
<configure name="AP_DEV" value="/dev/ttyUSB2"/>
<configure name="AP_BAUD" value="B921600"/>
</target>
<module name="control"/>
<module name="navigation"/>
<module name="telemetry" type="transparent">
<configure name="MODEM_PORT" value="UART3"/>
<configure name="MODEM_BAUD" value="B115200"/>
</module>
<module name="ins" type="vectornav">
<configure name="VN_PORT" value="UART2"/>
<configure name="VN_BAUD" value="B921600"/>
</module>
<define name="AGR_CLIMB" />
<define name="POLY_OSAM_HALF_SWEEP_ENABLED" value="FALSE"/>
<define name="GEOFENCE_DATALINK_LOST_TIME" value="45"/>
</firmware>
<modules>
<module name="nav" type="line"/>
<module name="nav" type="flower"/>
<module name="nav" type="survey_poly_osam"/>
<module name="nav" type="launcher"/>
<module name="nav" type="skid_landing"/>
<module name="sys_mon"/>
<module name="copilot"/>
<module name="extra_dl">
<!-- in order to use uart1 without chibios we need to remap the peripheral-->
<define name="REMAP_UART1" value="TRUE"/>
<configure name="EXTRA_DL_PORT" value="UART1"/>
<configure name="EXTRA_DL_BAUD" value="B921600"/>
</module>
<!--module name="lidar_sf11">
<configure name="LIDAR_SF11_I2C_DEV" value="i2c2"/>
</module-->
<module name="battery_monitor.xml">
<define name="BATMON_REV4" value="1"/>
<define name="BATMON_CURRENT_OFFSET" value="-120"/>
<define name="BATMON_CURRENT_SENSITIVITY" value="25.6"/>
<define name="BATMON_TEMP_OFFSET" value="250"/>
<define name="BATMON_TEMP_SENSITIVITY" value="10"/>
</module>
</modules>
<!-- commands section -->
<!-- Servo Configuration -->
<servos>
<servo name="FLAP" no="0" min="900" neutral="1500" max="2100"/>
<servo name="AILERON_RIGHT" no="1" min="900" neutral="1500" max="2100"/>
<servo name="AILERON_LEFT" no="2" min="2100" neutral="1500" max="900"/>
<servo name="ELEVATOR" no="3" min="2100" neutral="1500" max="900"/>
<servo name="RUDDER" no="4" min="2100" neutral="1500" max="900"/>
<servo name="THROTTLE" no="5" min="1100" neutral="1100" max="1900"/>
</servos>
<!-- Servo Command Structure -->
<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"/>
<axis name="FLAP" failsafe_value="0"/>
</commands>
<!-- RC Command Structure -->
<rc_commands>
<set command="THROTTLE" value="@THROTTLE"/>
<set command="ROLL" value="@ROLL"/>
<set command="PITCH" value="@PITCH"/>
<set command="YAW" value="@YAW"/>
<set command="FLAP" value="@FLAP"/>
</rc_commands>
<!-- Define RC commands to Servo in Auto Mode -->
<auto_rc_commands>
<set command="YAW" value="@YAW"/>
<set command="FLAP" value="@FLAP"/>
</auto_rc_commands>
<!-- Define Mixing Parameters -->
<section name="MIXER">
<define name="AILERON_AILERON_RATE" value="0.9"/>
<define name="ELEV_ELEV_RATE" value="0.8"/>
</section>
<!-- Define RC commands to Servos in Manual -->
<command_laws>
<let var="aileron" value="@ROLL * AILERON_AILERON_RATE"/>
<let var="elevator" value="@PITCH * ELEV_ELEV_RATE"/>
<set servo="THROTTLE" value="@THROTTLE"/>
<set servo="AILERON_RIGHT" value="$aileron"/> <!--flip signs if necessary -->
<set servo="AILERON_LEFT" value=" - $aileron"/>
<set servo="ELEVATOR" value="$elevator"/>
<set servo="RUDDER" value="@YAW"/>
<set servo="FLAP" value="@FLAP"/>
</command_laws>
<!-- Define Max Roll and Pitch setpoints in Auto1 -->
<section name="AUTO1" prefix="AUTO1_">
<define name="MAX_ROLL" value="0.7"/>
<define name="MAX_PITCH" value="0.6"/>
</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="0." unit="deg"/>
<!-- Dummy Mag values for NPS -
replace with your own calibration -->
<define name="MAG_X_NEUTRAL" value="0"/>
<define name="MAG_Y_NEUTRAL" value="0"/>
<define name="MAG_Z_NEUTRAL" value="0"/>
</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="MISC">
<define name="NOMINAL_AIRSPEED" value="16." unit="m/s"/> <!-- GCS only -->
<define name="CARROT" value="5." unit="s"/> <!-- GCS only -->
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
<define name="DEFAULT_CIRCLE_RADIUS" value="120."/>
</section>
<section name="VERTICAL CONTROL" prefix="V_CTL_">
<define name="POWER_CTL_BAT_NOMINAL" value="23.2" unit="volt"/>
<!-- outer loop proportional gain -->
<define name="ALTITUDE_PGAIN" value="0.136"/>
<!-- outer loop saturation -->
<define name="ALTITUDE_MAX_CLIMB" value="3."/>
<!-- auto throttle inner loop -->
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.40"/>
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.20"/>
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.70"/>
<define name="AUTO_THROTTLE_LOITER_TRIM" value="1500"/>
<define name="AUTO_THROTTLE_DASH_TRIM" value="-4000"/>
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.05" unit="%/(m/s)"/>
<define name="AUTO_THROTTLE_PGAIN" value="0.01"/>
<define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.142"/>
<define name="THROTTLE_SLEW_LIMITER" value="2" unit="s"/>
<!-- auto pitch inner loop -->
<define name="AUTO_PITCH_PGAIN" value="0.1"/>
<define name="AUTO_PITCH_IGAIN" value="0.025"/>
<define name="AUTO_PITCH_MAX_PITCH" value="0.31415" unit="rad"/>
<define name="AUTO_PITCH_MIN_PITCH" value="-0.31415" unit="rad"/>
<!--New Landing V_CTL_loop -->
<define name="LANDING_THROTTLE_PGAIN" value="600"/>
<define name="LANDING_THROTTLE_IGAIN" value="30"/>
<define name="LANDING_THROTTLE_MAX" value="0.60" unit="%"/>
<define name="LANDING_DESIRED_SPEED" value="18.00" unit="(m/s)"/>
<define name="LANDING_PITCH_PGAIN" value="0.3"/>
<define name="LANDING_PITCH_IGAIN" value="0.0130"/>
<define name="LANDING_PITCH_LIMITS" value="0.2000" unit="rad"/>
<define name="LANDING_PITCH_FLARE" value="0.15000" unit="rad"/>
<define name="LANDING_ALT_THROTTLE_KILL" value="6" unit="m"/>
<define name="LANDING_ALT_FLARE" value="3" unit="m"/>
<define name="USE_LIDAR" value="TRUE"/>
</section>
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
<define name="COURSE_PGAIN" value="1.33"/>
<define name="COURSE_DGAIN" value="0."/>
<define name="ROLL_MAX_SETPOINT" value="0.575959" unit="rad"/>
<define name="PITCH_MAX_SETPOINT" value="0.35" unit="rad"/>
<define name="PITCH_MIN_SETPOINT" value="-0.2" unit="rad"/>
<define name="PITCH_PGAIN" value="12900."/>
<!-- ORIGINAL GAIN-->
<define name="PITCH_DGAIN" value="1.5"/>
<!-- SIMULATOR GAIN
<define name="PITCH_DGAIN" value="151.5"/>
-->
<define name="ELEVATOR_OF_ROLL" value="1250"/>
<define name="ROLL_ATTITUDE_GAIN" value="9000"/>
<define name="ROLL_RATE_GAIN" value="1600"/>
<define name="ROLL_SLEW" value="0.1"/>
<define name="ELE_IGAIN" value="0."/>
</section>
<section name="AGGRESSIVE" prefix="AGR_">
<define name="BLEND_START" value="20"/><!-- Altitude Error to Initiate Aggressive Climb CANNOT BE ZERO!!-->
<define name="BLEND_END" value="10"/><!-- Altitude Error to Blend Aggressive to Regular Climb Modes CANNOT BE ZERO!!-->
<define name="CLIMB_THROTTLE" value="0.75"/><!-- Gaz for Aggressive Climb -->
<define name="CLIMB_PITCH" value="0.13"/><!-- Pitch for Aggressive Climb -->
<define name="DESCENT_THROTTLE" value="0.1"/><!-- Gaz for Aggressive Decent -->
<define name="DESCENT_PITCH" value="-0.1"/><!-- 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="5" unit="s"/>
<define name="DEFAULT_THROTTLE" value="0" 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>
<!-- Launcher Takeoff Configuration -->
<section name="LAUNCHER" prefix="LAUNCHER_TAKEOFF_">
<define name="PITCH" value="0.23" unit="rad"/>
<define name="HEIGHT" value="70" unit="m"/>
<define name="MIN_SPEED_CIRCLE" value="8" unit="m/s"/>
<define name="DISTANCE" value="30" unit="m"/>
<define name="MIN_SPEED_LINE" value="5" unit="m/s"/>
</section>
<!-- Skid Landing Configuration -->
<section name="LANDING" prefix="SKID_LANDING_">
<define name="AF_HEIGHT" value="50" unit="m"/>
<define name="FINAL_HEIGHT" value="50" unit="m"/>
<define name="FINAL_STAGE_TIME" value="10" unit="s"/>
</section>
<section name="SIMULATOR" prefix="NPS_">
<define name="JSBSIM_LAUNCHSPEED" value="25"/>
<define name="JSBSIM_MODEL" value="AGGIEAIR/minion" type="string"/>
<define name="SENSORS_PARAMS" value="nps_sensors_params_invariant.h" type="string"/>
<define name="JS_AXIS_THROTTLE" value="0"/>
<define name="JS_AXIS_THROTTLE_REVERSED" value="1"/>
<define name="JS_AXIS_ROLL" value="1"/>
<define name="JS_AXIS_PITCH" value="2"/>
<define name="JS_AXIS_PITCH_REVERSED" value="1"/>
<define name="JS_AXIS_YAW" value="3"/>
<define name="JS_AXIS_YAW_REVERSED" value="1"/>
<define name="JS_AXIS_FLAPS" value="5"/>
<define name="JS_AXIS_MODE" value="7"/>
<define name="JSBSIM_ROLL_TRIM" value="0.008"/>
<define name="JSBSIM_PITCH_TRIM" value="0.0375"/>
<define name="JSBSIM_YAW_TRIM" value="0.001"/>
</section>
<!-- Define current estimator and Battery Level Warnings -->
<section name="BAT">
<define name="MILLIAMP_AT_FULL_THROTTLE" value="50000"/>
<define name="CURRENT_ESTIMATION_NONLINEARITY" value="1.3"/>
<!-- Flight values -->
<!--
<define name="MAX_BAT_LEVEL" value="16.5" unit="V" />
<define name="LOW_BAT_LEVEL" value="14.1" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="13.8" unit="V"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="13.5" unit="V"/>
-->
<!-- Simulator values -->
<define name="MAX_BAT_LEVEL" value="5.0" unit="V" />
<define name="LOW_BAT_LEVEL" value="4.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="3.5" unit="V"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="3.0" unit="V"/>
</section>
</airframe>

View File

@@ -3,11 +3,11 @@
name="Ark_Hexa_1.8"
ac_id="4"
airframe="airframes/AGGIEAIR/aggieair_ark_hexa_1-8.xml"
radio="radios/AGGIEAIR/aggieair_sbus_fakerator.xml"
radio="radios/AGGIEAIR/aggieair_taranis.xml"
telemetry="telemetry/AGGIEAIR/aggieair_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic_geofence.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/lidar_sf11.xml modules/gps.xml modules/stabilization_float_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/imu_common.xml"
settings_modules="modules/battery_monitor.xml modules/gps.xml modules/stabilization_float_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/imu_common.xml"
gui_color="#ffff954c0000"
/>
<aircraft
@@ -21,6 +21,17 @@
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="BluJay_Goose"
ac_id="7"
airframe="airframes/AGGIEAIR/aggieair_blujay_goose.xml"
radio="radios/AGGIEAIR/aggieair_taranis.xml"
telemetry="telemetry/AGGIEAIR/aggieair_fixedwing.xml"
flight_plan="flight_plans/AGGIEAIR/BasicTuning_Launcher.xml"
settings="settings/fixedwing_basic.xml settings/nps.xml"
settings_modules="modules/battery_monitor.xml modules/nav_skid_landing.xml modules/nav_survey_poly_osam.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="#00009e93ffff"
/>
<aircraft
name="Blujay"
ac_id="6"
@@ -29,7 +40,7 @@
telemetry="telemetry/AGGIEAIR/aggieair_fixedwing.xml"
flight_plan="flight_plans/AGGIEAIR/BasicTuning_Launcher.xml"
settings="settings/fixedwing_basic.xml settings/nps.xml"
settings_modules="modules/lidar_sf11.xml modules/nav_skid_landing.xml modules/nav_survey_poly_osam.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
settings_modules="modules/battery_monitor.xml modules/lidar_sf11.xml modules/nav_skid_landing.xml modules/nav_survey_poly_osam.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="#00009e93ffff"
/>
<aircraft
@@ -43,6 +54,17 @@
settings_modules="modules/vms_ecu_demo.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/ahrs_float_mlkf.xml modules/imu_common.xml modules/gps.xml"
gui_color="#00009e93ffff"
/>
<aircraft
name="El_Captain"
ac_id="8"
airframe="airframes/AGGIEAIR/El_Captain.xml"
radio="radios/AGGIEAIR/AggieAir_Specktrum_PPM_MeekPE.xml"
telemetry="telemetry/AGGIEAIR/aggieair_fixedwing.xml"
flight_plan="flight_plans/AGGIEAIR/CachJct_Gallo_temp_rect_survey.xml"
settings="settings/fixedwing_basic.xml settings/control/tune_agr_climb.xml settings/control/ctl_basic.xml settings/nps.xml"
settings_modules="modules/AOA_adc.xml modules/airspeed_adc.xml modules/nav_skid_landing.xml modules/nav_survey_poly_osam.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="blue"
/>
<aircraft
name="Iris"
ac_id="5"
@@ -58,11 +80,11 @@
name="Minion_RP3"
ac_id="1"
airframe="airframes/AGGIEAIR/aggieair_minion_rp3_lia.xml"
radio="radios/AGGIEAIR/aggieair_sbus_fakerator.xml"
radio="radios/AGGIEAIR/aggieair_taranis.xml"
telemetry="telemetry/AGGIEAIR/aggieair_fixedwing.xml"
flight_plan="flight_plans/AGGIEAIR/BasicTuning_Launcher.xml"
settings="settings/fixedwing_basic.xml settings/nps.xml"
settings_modules="modules/lidar_sf11.xml modules/nav_skid_landing.xml modules/nav_survey_poly_osam.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
settings_modules="modules/battery_monitor.xml modules/lidar_sf11.xml modules/nav_skid_landing.xml modules/nav_survey_poly_osam.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml"
gui_color="#00009e93ffff"
/>
</conf>

View File

@@ -2,6 +2,13 @@
<control_panel name="aggieair control panel">
<section name="programs">
<!-- AggieAir specific programs -->
<program name="Payload" command="payload_start.sh"/>
<program name="Altitude Update" command="altitude_update.sh"/>
<program name="uGear Sim" command="start_ugear_sim.sh"/>
<program name="ADS-B" command="start_adsb.sh"/>
<!-- default programs -->
<program name="Server" command="sw/ground_segment/tmtc/server"/>
<program name="Data Link" command="sw/ground_segment/tmtc/link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
@@ -68,6 +75,7 @@
<section name="sessions">
<!-- Defeault test sessions -->
<session name="Flight USB-serial@9600">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
@@ -136,25 +144,7 @@
</program>
</session>
<session name="NPS Flight Gear">
<program name="Data Link">
<arg flag="-udp"/>
<arg flag="-udp_broadcast"/>
</program>
<program name="Server">
<arg flag="-n"/>
</program>
<program name="GCS"/>
<program name="Simulator">
<arg flag="-a" constant="@AIRCRAFT"/>
<arg flag="-f" constant="127.0.0.1"/>
<arg flag="-b" constant="127.255.255.255"/>
<arg flag="--fg_fdm" constant=""/>
</program>
</session>
<session name="NPS Payload Simulation">
<session name="AggieAir Simulation">
<program name="Data Link">
<arg flag="-udp"/>
<arg flag="-udp_broadcast"/>
@@ -172,6 +162,7 @@
<arg flag="--fg_fdm" constant=""/>
</program>
<program name="Messages"/>
<program name="Environment Simulator"/>
</session>
<session name="HITL+SBUS USB-serial@57600">
@@ -290,7 +281,6 @@
</program>
</session>
<session name="Log Replay">
<program name="Log File Player"/>
<program name="Server">
@@ -304,6 +294,84 @@
<program name="Environment Simulator"/>
</session>
<!-- Service center sessions -->
<session name="Ground Control Minions Umarim Serial">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyS0"/>
<arg flag="-transport" constant="xbee"/>
<arg flag="-uplink"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server"/>
<program name="GCS">
<arg flag="-layout" constant="AGGIEAIR/CSOIS_minions_osu.xml"/>
<arg flag="-srtm"/>
</program>
<program name="Messages">
<arg flag="-c" constant="telemetry:*"/>
</program>
<program name="Payload"/>
<program name="Altitude Update"/>
<program name="ADS-B"/>
</session>
<session name="Ground Control Minions Umarim USB">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
<arg flag="-transport" constant="xbee"/>
<arg flag="-uplink"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server"/>
<program name="GCS">
<arg flag="-layout" constant="AGGIEAIR/CSOIS_minions_osu.xml"/>
<arg flag="-srtm"/>
</program>
<program name="Messages">
<arg flag="-c" constant="telemetry:*"/>
</program>
<program name="Payload"/>
<program name="Altitude Update"/>
</session>
<session name="Ground Control Minions">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyS0"/>
<arg flag="-transport" constant="xbee"/>
<arg flag="-uplink"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server"/>
<program name="GCS">
<arg flag="-layout" constant="AGGIEAIR/CSOIS_minions.xml"/>
<arg flag="-srtm"/>
</program>
<program name="Messages">
<arg flag="-c" constant="telemetry:*"/>
</program>
<program name="Payload"/>
</session>
<session name="Mobile Ground Station">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyS0"/>
<arg flag="-transport" constant="xbee"/>
<arg flag="-uplink"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server">
<arg flag="-no_md5_check" constant="option"/>
</program>
<program name="GCS">
<arg flag="-layout" constant="AGGIEAIR/CSOIS_flyingwings.xml"/>
<arg flag="-srtm"/>
</program>
<program name="Messages">
<arg flag="-c" constant="telemetry:*"/>
</program>
</session>
</section>
</control_panel>

View File

@@ -41,7 +41,7 @@ AggieAir RP3 Minion
<module name="telemetry" type="transparent">
<configure name="MODEM_PORT" value="UART3"/>
<configure name="MODEM_BAUD" value="B115200"/>
<configure name="MODEM_BAUD" value="B57600"/>
</module>
<module name="ins" type="vectornav">
@@ -71,13 +71,13 @@ AggieAir RP3 Minion
<module name="lidar_sf11">
<configure name="LIDAR_SF11_I2C_DEV" value="i2c2"/>
</module>
<!--module name="battery_monitor.xml">
<module name="battery_monitor.xml">
<define name="BATMON_REV4" value="1"/>
<define name="BATMON_CURRENT_OFFSET" value="-120"/>
<define name="BATMON_CURRENT_SENSITIVITY" value="25.6"/>
<define name="BATMON_TEMP_OFFSET" value="250"/>
<define name="BATMON_TEMP_SENSITIVITY" value="10"/>
</module-->
</module>
</modules>
<!-- commands section -->

View File

@@ -42,7 +42,6 @@
<include name="L" procedure="AGGIEAIR/aggieair_landing.xml"/>
</includes>
<exceptions>
<!--exception cond="datalink_time > 30" deroute="Standby"/-->
<exception cond="InsideFlightArea(GetPosX(), GetPosY()) == FALSE" deroute="Go Home"/>
</exceptions>
<blocks>

View File

@@ -0,0 +1,104 @@
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="1548.0" ground_alt="1347.02" lat0="41.81415234" lon0="-111.97922965" max_dist_from_home="3160.158327555416" name="cacheJct" security_height="25">
<header>
#include "subsystems/datalink/datalink.h"
</header>
<waypoints>
<waypoint name="HOME" x="0" y="0"/>
<waypoint alt="1348.5" name="FA1" x="-934.5" y="1381.3"/>
<waypoint alt="1346.0" name="FA2" x="2231.1" y="1330.7"/>
<waypoint alt="1345.3" name="FA3" x="2037.0" y="-1867.4"/>
<waypoint alt="1350.0" name="FA4" x="-977.9" y="-1733.9"/>
<waypoint alt="1796.0" name="Gallo_0" x="577.9" y="406.3"/>
<waypoint alt="1798.0" name="Gallo_1" x="874.6" y="402.5"/>
<waypoint alt="1798.0" name="Gallo_2" x="885.9" y="-120.4"/>
<waypoint alt="1795.0" name="Gallo_3" x="578.1" y="-126.5"/>
<waypoint alt="1547.0" name="Gallo_10" x="596.7" y="238.0"/>
<waypoint alt="1546.7" name="Gallo_11" x="887.2" y="212.5"/>
<waypoint alt="1546.0" name="Gallo_12" x="886.2" y="1.6"/>
<waypoint alt="1544.8" name="Gallo_13" x="600.0" y="8.3"/>
<waypoint alt="1407.0" name="AF" x="629.4" y="234.5"/>
<waypoint alt="1344.0" name="BUNGEE" x="641.5" y="166.8"/>
<waypoint alt="1348.0" name="GCS" x="656.2" y="170.3"/>
<waypoint alt="1545.0" name="STDBY" x="645.5" y="50.9"/>
<waypoint alt="1344.0" name="TD" x="612.7" y="205.0"/>
</waypoints>
<sectors>
<sector name="FlightArea" color="red">
<corner name="FA1"/>
<corner name="FA2"/>
<corner name="FA3"/>
<corner name="FA4"/>
</sector>
<sector name="Gallo" color="green">
<corner name="Gallo_0"/>
<corner name="Gallo_1"/>
<corner name="Gallo_2"/>
<corner name="Gallo_3"/>
</sector>
</sectors>
<includes>
<include name="L" procedure="AGGIEAIR/aggieair_landing.xml"/>
</includes>
<exceptions>
<exception cond="InsideFlightArea(GetPosX(), GetPosY()) == FALSE" deroute="Standby"/>
</exceptions>
<blocks>
<block name="Setup Wait">
<set value="1" var="autopilot.kill_throttle"/>
<while cond="TRUE"/>
</block>
<!-- NOTE: in 4.2: -->
<!--block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
<call fun="InitializeLauncherTakeoff()"/>
<call fun="LauncherTakeoff()"/>
</block-->
<block name="Launch" strip_button="TakeOff (wp CLIMB)" strip_icon="takeoff.png">
<set value="0" var="autopilot.kill_throttle"/>
<call_once fun="nav_launcher_setup()"/>
<call fun="nav_launcher_run()"/>
<deroute block="Standby"/>
</block>
<block name="Standby">
<circle radius="100" wp="STDBY"/>
</block>
<!-- NOTE: in 4.2: -->
<!--block name="Gallo450">
<call fun="InitializeRECTSurvey(WP_Gallo_0,45)"/>
<call fun="RectSurvey()"/>
</block-->
<block name="Gallo450">
<call_once fun="nav_survey_poly_osam_setup(WP_Gallo_0, 4, 45, 90)"/>
<exception cond="PolySurveySweepBackNum >=1" deroute="Standby"/>
<call fun="nav_survey_poly_osam_run()"/>
</block>
<!-- NOTE: in 4.2: -->
<!--block name="Gallo200">
<call fun="InitializeRECTSurvey(WP_Gallo_10,45)"/>
<call fun="RectSurvey()"/>
</block-->
<block name="Gallo200">
<call_once fun="nav_survey_poly_osam_setup(WP_Gallo_10, 4, 45, 90)"/>
<exception cond="PolySurveySweepBackNum >=1" deroute="Standby"/>
<call fun="nav_survey_poly_osam_run()"/>
</block>
<!-- NOTE: in 4.2: -->
<!--
<block name="Landing CW">
<call fun="InitializeSkidLanding(WP_AF, WP_TD, nav_radius)"/>
<call fun="SkidLanding()"/>
</block>
<block name="Landing CCW">
<call fun="InitializeSkidLanding(WP_AF, WP_TD, -nav_radius)"/>
<call fun="SkidLanding()"/>
</block>
-->
</blocks>
</flight_plan>

View File

@@ -0,0 +1,60 @@
<!DOCTYPE layout SYSTEM "../layout.dtd">
<layout width="1280" height="725">
<columns>
<rows SIZE="470">
<widget NAME="strips" SIZE="225"/>
<widget NAME="aircraft" SIZE="350"/>
<widget NAME="alarms"/>
</rows>
<rows>
<widget NAME="map2d">
<papget type="message_field" display="text" x="702" y="104">
<property name="scale" value="1."/>
<property name="field" value="AIRSPEED_IND:ind_airspeed"/>
<property name="format" value="%.2f"/>
<property name="size" value="15."/>
<property name="color" value="green"/>
</papget>
<papget type="message_field" display="gauge" x="722" y="58">
<property name="scale" value="1."/>
<property name="field" value="AIRSPEED_IND:ind_airspeed"/>
<property name="min" value="0"/>
<property name="max" value="25"/>
<property name="size" value="50."/>
<property name="text" value="Airspeed"/>
</papget>
<papget type="message_field" display="led" x="204" y="21">
<property name="scale" value="1."/>
<property name="field" value="AGGIECAP:payloadstatus"/>
<property name="size" value="15."/>
<property name="text" value="Init"/>
</papget>
<papget type="message_field" display="led" x="203" y="74">
<property name="scale" value="1-1"/>
<property name="field" value="AGGIECAP:payloadstatus"/>
<property name="size" value="15."/>
<property name="text" value="Warm"/>
</papget>
<papget type="message_field" display="text" x="235" y="12">
<property name="scale" value="1."/>
<property name="field" value="AGGIECAP:capturenum"/>
<property name="format" value="Capture Num %.2f"/>
<property name="size" value="15."/>
<property name="color" value="green"/>
</papget>
<papget type="message_field" display="led" x="205" y="47">
<property name="scale" value=".5-1"/>
<property name="field" value="AGGIECAP:payloadstatus"/>
<property name="size" value="15."/>
<property name="text" value="Cool"/>
</papget>
<papget type="message_field" display="led" x="204" y="102">
<property name="scale" value="1-1"/>
<property name="field" value="AGGIECAP:errorcode"/>
<property name="size" value="15."/>
<property name="text" value="Status"/>
</papget>
</widget>
</rows>
</columns>
</layout>

View File

@@ -0,0 +1,29 @@
<!DOCTYPE layout SYSTEM "../layout.dtd">
<layout width="1215" height="776">
<columns>
<rows SIZE="470">
<widget NAME="strips" SIZE="225"/>
<widget NAME="aircraft" SIZE="350"/>
<widget NAME="alarms"/>
</rows>
<rows>
<widget NAME="map2d">
<papget type="message_field" display="text" x="682" y="107">
<property name="scale" value="1."/>
<property name="field" value="AIRSPEED_IND:ind_airspeed"/>
<property name="format" value="%.2f"/>
<property name="size" value="15."/>
<property name="color" value="green"/>
</papget>
<papget type="message_field" display="gauge" x="696" y="60">
<property name="scale" value="1."/>
<property name="field" value="AIRSPEED_IND:ind_airspeed"/>
<property name="min" value="0"/>
<property name="max" value="25"/>
<property name="size" value="50."/>
<property name="text" value="Airspeed"/>
</papget>
</widget>
</rows>
</columns>
</layout>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE layout SYSTEM "../layout.dtd">
<layout width="1280" height="725">
<columns>
<rows SIZE="470">
<widget NAME="strips" SIZE="225"/>
<widget NAME="aircraft" SIZE="350"/>
<widget NAME="alarms"/>
</rows>
<rows>
<widget NAME="map2d">
<papget type="message_field" display="led" x="204" y="102">
<property name="scale" value="1-1"/>
<property name="field" value="AGGIECAP:errorcode"/>
<property name="size" value="15."/>
<property name="text" value="Status"/>
</papget>
<papget type="message_field" display="gauge" x="722" y="58">
<property name="scale" value="1."/>
<property name="field" value="AIRSPEED_IND:ind_airspeed"/>
<property name="min" value="0"/>
<property name="max" value="25"/>
<property name="size" value="50."/>
<property name="text" value="Airspeed"/>
</papget>
<papget type="message_field" display="text" x="702" y="104">
<property name="scale" value="1."/>
<property name="field" value="AIRSPEED_IND:ind_airspeed"/>
<property name="format" value="%.2f"/>
<property name="size" value="15."/>
<property name="color" value="green"/>
</papget>
<papget type="message_field" display="led" x="204" y="21">
<property name="scale" value="1."/>
<property name="field" value="AGGIECAP:payloadstatus"/>
<property name="size" value="15."/>
<property name="text" value="Init"/>
</papget>
<papget type="message_field" display="led" x="205" y="47">
<property name="scale" value=".5-1"/>
<property name="field" value="AGGIECAP:payloadstatus"/>
<property name="size" value="15."/>
<property name="text" value="Cool"/>
</papget>
<papget type="message_field" display="led" x="435" y="91">
<property name="scale" value="1-1899"/>
<property name="field" value="ACTUATORS:values[5]"/>
<property name="size" value="15."/>
<property name="text" value="off"/>
</papget>
<papget type="message_field" display="led" x="507" y="12">
<property name="scale" value="1-1580"/>
<property name="field" value="ACTUATORS:values[5]"/>
<property name="size" value="15."/>
<property name="text" value="med"/>
</papget>
<papget type="message_field" display="led" x="611" y="91">
<property name="scale" value="1-1262"/>
<property name="field" value="ACTUATORS:values[5]"/>
<property name="size" value="15."/>
<property name="text" value="full"/>
</papget>
<papget type="message_field" display="led" x="203" y="74">
<property name="scale" value="1-1"/>
<property name="field" value="AGGIECAP:payloadstatus"/>
<property name="size" value="15."/>
<property name="text" value="Warm"/>
</papget>
<papget type="message_field" display="text" x="235" y="12">
<property name="scale" value="1."/>
<property name="field" value="AGGIECAP:capturenum"/>
<property name="format" value="Capture Num %.2f"/>
<property name="size" value="15."/>
<property name="color" value="green"/>
</papget>
<papget type="message_field" display="gauge" x="507" y="69">
<property name="scale" value="1."/>
<property name="field" value="ACTUATORS:values[5]"/>
<property name="min" value="1900"/>
<property name="max" value="1100"/>
<property name="size" value="50."/>
<property name="text" value="Crow"/>
</papget>
</widget>
</rows>
</columns>
</layout>

View File

@@ -1,51 +1,79 @@
<layout width="1280" height="709">
<!DOCTYPE layout SYSTEM "../layout.dtd">
<layout width="1600" height="939">
<columns>
<rows SIZE="600">
<widget NAME="strips" SIZE="225"/>
<widget NAME="aircraft" SIZE="350"/>
<widget NAME="alarms"/>
<widget NAME="strips" size="225"/>
<widget NAME="aircraft" size="350"/>
<widget NAME="alarms" size="350"/>
</rows>
<rows>
<widget NAME="map2d">
<papget type="message_field" display="gauge" x="77" y="304">
<property name="field" value="CAMERA_PAYLOAD:used_memory"/>
<property name="scale" value="1.0"/>
<property name="min" value="0."/>
<property name="max" value="100."/>
<property name="size" value="50."/>
<property name="text" value="Used memory(%)"/>
</papget>
<papget type="message_field" display="gauge" x="74" y="198">
<property name="field" value="CAMERA_PAYLOAD:used_disk"/>
<property name="scale" value="1.0"/>
<property name="min" value="0."/>
<property name="max" value="100."/>
<property name="size" value="50."/>
<property name="text" value="Used disk(%)"/>
</papget>
<papget type="message_field" display="text" x="45" y="414">
<property name="field" value="CAMERA_PAYLOAD:error_code"/>
<widget NAME="map2d" size="937">
<papget type="message_field" display="text" x="145" y="11">
<property name="scale" value="1"/>
<property name="field" value="CAMERA_SNAPSHOT:array_temp"/>
<property name="format" value="FPA Temp: %.2f"/>
<property name="size" value="15."/>
<property name="format" value="Error code: %.0f"/>
<property name="color" value="green"/>
</papget>
<papget type="message_field" display="led" x="151" y="395">
<papget type="message_field" display="gauge" x="60" y="176">
<property name="scale" value="1"/>
<property name="field" value="CAMERA_PAYLOAD:used_disk"/>
<property name="min" value="0."/>
<property name="max" value="100."/>
<property name="size" value="50."/>
<property name="text" value="Payload disk(%)"/>
</papget>
<papget type="message_field" display="led" x="465" y="22">
<property name="scale" value="1"/>
<property name="field" value="CAMERA_PAYLOAD:error_code"/>
<property name="size" value="15."/>
<property name="text" value="Error:"/>
<property name="test_value" value="0"/> <!-- will be green only if value==0 -->
<property name="test_invert" value="true"/>
<property name="text" value="Payload status:"/>
</papget>
<papget type="message_field" display="led" x="152" y="366">
<papget type="message_field" display="text" x="144" y="57">
<property name="scale" value="1"/>
<property name="field" value="CAMERA_SNAPSHOT:snapshot_image_number"/>
<property name="format" value="Capture number: %.0f"/>
<property name="size" value="15."/>
<property name="color" value="green"/>
</papget>
<papget type="message_field" display="text" x="478" y="11">
<property name="scale" value="1"/>
<property name="field" value="CAMERA_PAYLOAD:error_code"/>
<property name="format" value="code: %.0f"/>
<property name="size" value="15."/>
<property name="color" value="green"/>
</papget>
<papget type="message_field" display="gauge" x="66" y="464">
<property name="scale" value="1."/>
<property name="field" value="COPILOT_STATUS:used_memory"/>
<property name="min" value="0."/>
<property name="max" value="100."/>
<property name="size" value="50."/>
<property name="text" value="Copilot mem(%)"/>
</papget>
<papget type="message_field" display="gauge" x="64" y="367">
<property name="scale" value="1."/>
<property name="field" value="COPILOT_STATUS:used_disk"/>
<property name="min" value="0."/>
<property name="max" value="100."/>
<property name="size" value="50."/>
<property name="text" value="Copilot disk(%)"/>
</papget>
<papget type="message_field" display="led" x="268" y="46">
<property name="scale" value="1"/>
<property name="field" value="CAMERA_PAYLOAD:door_status"/>
<property name="size" value="15."/>
<property name="text" value="Door status:"/>
<property name="test_value" value="2"/> <!-- will be green only if value==2 -->
<property name="test_invert" value="true"/>
</papget>
<papget type="message_field" display="gauge" x="64" y="272">
<property name="scale" value="1.0"/>
<property name="field" value="CAMERA_PAYLOAD:used_memory"/>
<property name="min" value="0."/>
<property name="max" value="100."/>
<property name="size" value="50."/>
<property name="text" value="Payload mem(%)"/>
</papget>
</widget>
</rows>
</columns>

View File

@@ -7,12 +7,14 @@
<define name="AOA_SENS" value="(2*3.14)/1024" description="sensor sensitivity"/>
<define name="AOA_OFFSET" value="3.14" description="offset in radians"/>
<define name="AOA_FILTER" value="0.5" description="filtering parameter between 0 (no filtering) and 1"/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="AOA">
<dl_setting MAX="4" MIN="-4" STEP="0.0001" VAR="AOA_offset" shortname="AOA_offset" module="modules/sensors/AOA_adc" param="AOA_OFFSET"/>
<dl_setting MAX="0.95" MIN="0" STEP="0.001" VAR="AOA_filter" shortname="AOA_filter" module="modules/sensors/AOA_adc" param="AOA_FILTER"/>
<dl_setting MAX="4" MIN="-4" STEP="0.0001" VAR="aoa_adc.offset" shortname="AOA_offset" module="modules/sensors/aoa_adc" param="AOA_OFFSET"/>
<dl_setting MAX="0.95" MIN="0" STEP="0.001" VAR="aoa_adc.filter" shortname="AOA_filter" module="modules/sensors/aoa_adc" param="AOA_FILTER"/>
<dl_setting MAX="1" MIN="0" STEP="1" VAR="h_ctl_pitch_mode" shortname="PITCH_Mode" module="stabilization/stabilization_attitude" />
</dl_settings>
</dl_settings>

View File

@@ -16,13 +16,13 @@
<header>
<file name="ppm.h" dir="subsystems/radio_control"/>
</header>
<makefile target="ap|fbw|sim|nps">
<makefile target="ap|fbw|sim|nps|hitl">
<configure name="RADIO_CONTROL_LED" default="none"/>
<define name="RADIO_CONTROL_LED" value="$(RADIO_CONTROL_LED)" cond="ifneq ($(RADIO_CONTROL_LED),none)"/>
<define name="RADIO_CONTROL_TYPE_H" value="subsystems/radio_control/ppm.h" type="string"/>
<define name="PPM_CONFIG" value="$(PPM_CONFIG)" cond="ifdef PPM_CONFIG"/>
</makefile>
<makefile target="fbw|sim|nps">
<makefile target="fbw|sim|nps|hitl">
<define name="RADIO_CONTROL"/>
<define name="RADIO_CONTROL_TYPE_PPM"/>
<file name="radio_control.c" dir="subsystems"/>

View File

@@ -13,7 +13,7 @@
</header>
<init fun="pprz_dl_init()"/>
<event fun="pprz_dl_event()"/>
<makefile target="!fbw|sim|nps">
<makefile target="!fbw|sim|nps|hitl">
<define name="DOWNLINK"/>
<define name="PERIODIC_TELEMETRY"/>
<define name="USE_USB_SERIAL"/>

View File

@@ -15,7 +15,7 @@
</header>
<init fun="xbee_dl_init()"/>
<event fun="xbee_dl_event()"/>
<makefile target="!fbw|sim|nps">
<makefile target="!fbw|sim|nps|hitl">
<configure name="MODEM_PORT" case="upper|lower"/>
<define name="USE_$(MODEM_PORT_UPPER)"/>
<define name="$(MODEM_PORT_UPPER)_BAUD" value="$(MODEM_BAUD)"/>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE radio SYSTEM "../radio.dtd">
<radio name="OSAM_Spektrum_PPM_MeekPE" data_min="900" data_max="2100" sync_min="5500" sync_max="13500" pulse_type="POSITIVE">
<channel ctl="right_stick_horiz" function="ROLL" min="1930" neutral="1530" max="1130" average="0"/>
<channel ctl="Flap" function="FLAP" min="1130" neutral="1530" max="1930" average="10"/>
<channel ctl="right_stick_vert" function="PITCH" min="1930" neutral="1530" max="1130" average="0"/>
<channel ctl="Mode" function="MODE" min="1130" neutral="1530" max="1930" average="10"/>
<channel ctl="left_stick_horiz" function="YAW" min="1130" neutral="1530" max="1930" average="0"/>
<channel ctl="Knob" function="KNOB" min="1130" neutral="1130" max="1930" average="10"/>
<channel ctl="left_stick_vert" function="THROTTLE" min="1130" neutral="1130" max="1930" average="0"/>
</radio>
<!-- Please use only if you now what your doing-->

View File

@@ -21,22 +21,22 @@ Note: a command may be reversed by exchanging min and max values
-->
<!DOCTYPE radio SYSTEM "../radio.dtd">
<radio name="Taranis" data_min="172" data_max="1811" sync_min ="5000" sync_max ="15000" pulse_type="POSITIVE">
<channel ctl="1" function="THROTTLE" min="172" neutral="172" max="1811" average="0"/>
<channel ctl="2" function="ROLL" min="172" neutral="992" max="1811" average="0"/>
<channel ctl="3" function="PITCH" min="1811" neutral="993" max="172" average="0"/>
<channel ctl="4" function="YAW" min="172" neutral="992" max="1811" average="0"/>
<channel ctl="5" function="SWITCH_A" min="172" neutral="992" max="1811" average="1"/>
<channel ctl="6" function="FLAP" min="172" neutral="992" max="1811" average="1"/>
<channel ctl="7" function="SWITCH_C" min="172" neutral="992" max="1811" average="1"/>
<channel ctl="8" function="MODE" min="1811" neutral="992" max="172" average="1"/>
<channel ctl="9" function="SWITCH_E" min="172" neutral="992" max="1811" average="1"/>
<channel ctl="10" function="KILL_SWITCH" min="172" neutral="992" max="1811" average="1"/>
<channel ctl="11" function="SIM_SRC" min="172" neutral="992" max="1811" average="1"/>
<channel ctl="12" function="SWITCH_H" min="172" neutral="992" max="1811" average="1"/>
<channel ctl="13" function="POT_S1" min="172" neutral="992" max="1811" average="0"/>
<channel ctl="14" function="POT_S2" min="172" neutral="992" max="1811" average="0"/>
<channel ctl="15" function="LEFT_SLIDER" min="172" neutral="992" max="1811" average="0"/>
<channel ctl="16" function="RIGHT_SLIDER" min="172" neutral="992" max="1811" average="0"/>
<radio name="Taranis" data_min="987" data_max="2011" sync_min ="5000" sync_max ="15000" pulse_type="POSITIVE">
<channel ctl="1" function="THROTTLE" min="987" neutral="1500" max="2011" average="0"/>
<channel ctl="2" function="ROLL" min="987" neutral="1500" max="2011" average="0"/>
<channel ctl="3" function="PITCH" min="1811" neutral="1500" max="172" average="0"/>
<channel ctl="4" function="YAW" min="987" neutral="1500" max="2011" average="0"/>
<channel ctl="5" function="SWITCH_A" min="987" neutral="1500" max="2011" average="1"/>
<channel ctl="6" function="FLAP" min="2011" neutral="1500" max="987" average="1"/>
<channel ctl="7" function="SWITCH_C" min="987" neutral="1500" max="2011" average="1"/>
<channel ctl="8" function="MODE" min="2011" neutral="1500" max="987" average="1"/>
<channel ctl="9" function="SWITCH_E" min="987" neutral="1500" max="2011" average="1"/>
<channel ctl="10" function="KILL_SWITCH" min="987" neutral="1500" max="2011" average="1"/>
<channel ctl="11" function="SIM_SRC" min="987" neutral="1500" max="2011" average="1"/>
<channel ctl="12" function="SWITCH_H" min="987" neutral="1500" max="2011" average="1"/>
<channel ctl="13" function="POT_S1" min="987" neutral="1500" max="2011" average="0"/>
<channel ctl="14" function="POT_S2" min="897" neutral="1500" max="2011" average="0"/>
<channel ctl="15" function="LEFT_SLIDER" min="987" neutral="1500" max="2011" average="0"/>
<channel ctl="16" function="RIGHT_SLIDER" min="987" neutral="1500" max="2011" average="0"/>
</radio>

View File

@@ -30,6 +30,10 @@
<message name="ACTUATORS" period="0.5"/>
<message name="MOTOR_MIXING" period="0.5"/>
<message name="BATTERY_MONITOR" period="1.0"/>
<message name="GPS_LLA" period="1.0"/>
<message name="MOTOR_MIXING" period="1.0"/>
<message name="ATTITUDE" period="1.0"/>
</mode>
<mode name="ppm">
@@ -166,7 +170,11 @@
<process name="Extra">
<mode name="default">
<message name="MOTOR_MIXING" period="0.00625"/>
<message name="MOTOR_MIXING" period="0.0065"/>
<message name="GPS_LLA" period="0.1"/>
<message name="ROTORCRAFT_FP" period="0.1"/>
<message name="ATTITUDE" period="0.1"/>
<message name="VECTORNAV_INFO" period="0.1"/>
</mode>
</process>

View File

@@ -140,6 +140,7 @@ static const uint32_t ADC_PINSEL1_ONES = 0
#endif
;
#ifdef USE_AD0
static const uint32_t ADC_AD0CR_SEL_HW_SCAN = 0
#if defined USE_AD0_0
| 1 << 0
@@ -166,7 +167,9 @@ static const uint32_t ADC_AD0CR_SEL_HW_SCAN = 0
| 1 << 7
#endif
;
#endif
#ifdef USE_AD1
static const uint32_t ADC_AD1CR_SEL_HW_SCAN = 0
#if defined USE_AD1_0
| 1 << 0
@@ -193,6 +196,7 @@ static const uint32_t ADC_AD1CR_SEL_HW_SCAN = 0
| 1 << 7
#endif
;
#endif
void adc_init(void)
{