mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-10 06:59:54 +08:00
Merge pull request #237 from paparazzi/state_interface
State interface with automatic coordinate transformations
This commit is contained in:
@@ -1,211 +0,0 @@
|
||||
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
|
||||
|
||||
<airframe name="Demo module on Tiny2.1">
|
||||
|
||||
<modules>
|
||||
<load name="demo_module.xml"/>
|
||||
</modules>
|
||||
|
||||
<servos>
|
||||
<servo name="MOTOR_LEFT" no="3" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="MOTOR_RIGHT" no="4" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="AILEVON_LEFT" no="6" min="1900" neutral="1500" max="1100"/>
|
||||
<servo name="AILEVON_RIGHT" no="7" min="1100" neutral="1500" max="1900"/>
|
||||
</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="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"/>
|
||||
<let var="yaw" value="@YAW"/>
|
||||
<set servo="MOTOR_LEFT" value="@THROTTLE - $yaw"/>
|
||||
<set servo="MOTOR_RIGHT" value="@THROTTLE + $yaw"/>
|
||||
<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="adc" prefix="ADC_CHANNEL_">
|
||||
<define name="IR1" value="ADC_1"/>
|
||||
<define name="IR2" value="ADC_2"/>
|
||||
<define name="IR_TOP" value="ADC_0"/>
|
||||
<define name="IR_NB_SAMPLES" value="16"/>
|
||||
</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"/>
|
||||
|
||||
<define name="CORRECTION_UP" value="1."/>
|
||||
<define name="CORRECTION_DOWN" value="1."/>
|
||||
<define name="CORRECTION_LEFT" value="1."/>
|
||||
<define name="CORRECTION_RIGHT" value="1."/>
|
||||
</section>
|
||||
|
||||
<section name="BAT">
|
||||
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
|
||||
</section>
|
||||
|
||||
<section name="MISC">
|
||||
<define name="NOMINAL_AIRSPEED" value="12." unit="m/s"/>
|
||||
<define name="CARROT" value="5." unit="s"/>
|
||||
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
|
||||
<define name="CONTROL_FREQUENCY" value="60" unit="Hz"/>
|
||||
<define name="ALT_KALMAN_ENABLED" value="TRUE"/>
|
||||
<define name="DEFAULT_CIRCLE_RADIUS" value="80."/>
|
||||
</section>
|
||||
|
||||
<section name="VERTICAL CONTROL" prefix="V_CTL_">
|
||||
|
||||
<define name="POWER_CTL_BAT_NOMINAL" value="11.1" unit="volt"/>
|
||||
<define name="ALTITUDE_PGAIN" value="0.04"/>
|
||||
<define name="ALTITUDE_MAX_CLIMB" value="2."/>
|
||||
|
||||
<!-- auto throttle inner loop -->
|
||||
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.35"/>
|
||||
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.3"/>
|
||||
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.80"/>
|
||||
<define name="AUTO_THROTTLE_LOITER_TRIM" value="1500"/>
|
||||
<define name="AUTO_THROTTLE_DASH_TRIM" value="-1000"/>
|
||||
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.1" unit="%/(m/s)"/>
|
||||
<define name="AUTO_THROTTLE_PGAIN" value="0.02"/>
|
||||
<define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
|
||||
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.1"/>
|
||||
|
||||
<!-- auto pitch inner loop -->
|
||||
<define name="AUTO_PITCH_PGAIN" value="0.05"/>
|
||||
<define name="AUTO_PITCH_IGAIN" value="0.075"/>
|
||||
<define name="AUTO_PITCH_MAX_PITCH" value="0.35"/>
|
||||
<define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
|
||||
<define name="COURSE_PGAIN" value="1."/>
|
||||
|
||||
<define name="ROLL_MAX_SETPOINT" value="0.7" unit="rad"/>
|
||||
<define name="PITCH_MAX_SETPOINT" value="0.5" unit="rad"/>
|
||||
<define name="PITCH_MIN_SETPOINT" value="-0.5" unit="rad"/>
|
||||
|
||||
<define name="PITCH_PGAIN" value="6000."/>
|
||||
<define name="PITCH_DGAIN" value="0."/>
|
||||
|
||||
<define name="ELEVATOR_OF_ROLL" value="2500"/>
|
||||
|
||||
<define name="ROLL_ATTITUDE_GAIN" value="7500"/>
|
||||
<define name="ROLL_RATE_GAIN" value="1500"/>
|
||||
</section>
|
||||
|
||||
<section name="NAV">
|
||||
<define name="NAV_GLIDE_PITCH_TRIM" value="0"/>
|
||||
<define name="NAV_CROSS_TRACK_ERROR_IGAIN" value="0."/>
|
||||
<define name="NAV_CROSS_TRACK_ERROR_MAX" value="10." unit="deg"/>
|
||||
</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.7"/><!-- Gaz for Aggressive Climb -->
|
||||
<define name="CLIMB_PITCH" value="0.25"/><!-- Pitch for Aggressive Climb -->
|
||||
<define name="DESCENT_THROTTLE" value="0.1"/><!-- Gaz for Aggressive Decent -->
|
||||
<define name="DESCENT_PITCH" value="-0.15"/><!-- 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="1" 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>
|
||||
|
||||
<makefile>
|
||||
CONFIG = \"tiny_2_1_1.h\"
|
||||
|
||||
include $(PAPARAZZI_SRC)/conf/firmwares/tiny.makefile
|
||||
|
||||
FLASH_MODE=IAP
|
||||
|
||||
ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DSYS_TIME_LED=1
|
||||
ap.srcs = mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c $(SRC_FIRMWARE)/main.c
|
||||
|
||||
ap.CFLAGS += -DINTER_MCU
|
||||
ap.srcs += inter_mcu.c
|
||||
|
||||
ap.srcs += commands.c
|
||||
|
||||
########## RC actuators + radio
|
||||
ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
|
||||
ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
|
||||
|
||||
ap.CFLAGS += -DRADIO_CONTROL
|
||||
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
|
||||
|
||||
########## Modem
|
||||
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
|
||||
ap.srcs += subsystems/datalink/downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c subsystems/datalink/pprz_transport.c
|
||||
|
||||
########## ADC
|
||||
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3
|
||||
ap.srcs += $(SRC_ARCH)/adc_hw.c
|
||||
|
||||
########## GPS
|
||||
ap.CFLAGS += -DUSE_GPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_USE_LATLONG
|
||||
ap.srcs += gps_ubx.c gps.c latlong.c
|
||||
|
||||
########## IR sensors
|
||||
ap.CFLAGS += -DUSE_INFRARED -DALT_KALMAN
|
||||
ap.srcs += infrared.c estimator.c
|
||||
|
||||
########## Nav
|
||||
ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
|
||||
ap.srcs += subsystems/nav.c fw_h_ctl.c fw_v_ctl.c
|
||||
ap.srcs += subsystems/navigation/nav_survey_rectangle.c
|
||||
ap.srcs += subsystems/navigation/nav_line.c
|
||||
|
||||
|
||||
# Config for SITL simulation
|
||||
include $(PAPARAZZI_SRC)/conf/firmwares/sitl.makefile
|
||||
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
|
||||
|
||||
sim.srcs += subsystems/navigation/nav_line.c subsystems/navigation/nav_survey_rectangle.c
|
||||
|
||||
</makefile>
|
||||
</airframe>
|
||||
@@ -200,6 +200,8 @@ endif
|
||||
|
||||
ap.srcs += $(SRC_FIRMWARE)/autopilot.c
|
||||
|
||||
ap.srcs += state.c
|
||||
|
||||
ap.srcs += $(SRC_FIRMWARE)/stabilization.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/stabilization/stabilization_none.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/stabilization/stabilization_rate.c
|
||||
|
||||
@@ -162,8 +162,23 @@ fbw_srcs += $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
|
||||
ap_CFLAGS += -DAP
|
||||
ap_srcs += $(SRC_FIRMWARE)/main_ap.c
|
||||
ap_srcs += $(SRC_FIXEDWING)/estimator.c
|
||||
ap_CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_float.h\"
|
||||
ap_srcs += $(SRC_FIXEDWING)/subsystems/ins.c
|
||||
ap_srcs += $(SRC_FIXEDWING)/subsystems/ins/ins_float.c
|
||||
ap_srcs += $(SRC_FIRMWARE)/ap_downlink.c
|
||||
ap_srcs += state.c
|
||||
|
||||
# BARO
|
||||
ifeq ($(BOARD), umarim)
|
||||
ifeq ($(BOARD_VERSION), 1.0)
|
||||
ap_srcs += boards/umarim/baro_board.c
|
||||
ap_CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1
|
||||
ap_CFLAGS += -DADS1114_I2C_DEVICE=i2c1
|
||||
ap_srcs += peripherals/ads1114.c
|
||||
endif
|
||||
else ifeq ($(BOARD), lisa_l)
|
||||
ap_CFLAGS += -DUSE_I2C2
|
||||
endif
|
||||
|
||||
|
||||
######################################################################
|
||||
|
||||
@@ -107,6 +107,8 @@ nps.srcs += subsystems/electrical.c
|
||||
|
||||
nps.srcs += $(SRC_FIRMWARE)/autopilot.c
|
||||
|
||||
nps.srcs += state.c
|
||||
|
||||
#
|
||||
# in makefile section of airframe xml
|
||||
# include $(CFG_BOOZ)/subsystems/booz2_ahrs_lkf.makefile
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
# simple INS with float vertical filter
|
||||
#
|
||||
|
||||
$(TARGET).CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_int.h\"
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins.c
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_int.c
|
||||
|
||||
# vertical filter float version
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/vf_float.c
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
# extended INS with vertical filter using sonar in a better way (flap ground)
|
||||
#
|
||||
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins_extended.c
|
||||
$(TARGET).CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_int.h\"
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins.c
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_int_extended.c
|
||||
|
||||
# vertical filter float version
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/vf_extended_float.c
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+40" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+40" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<go wp="CLIMB"/>
|
||||
</block>
|
||||
@@ -84,14 +84,14 @@
|
||||
</block>
|
||||
<block name="land">
|
||||
<call fun="nav_compute_baseleg(WP_AF, WP_TD, WP_BASELEG, nav_radius)"/>
|
||||
<circle radius="nav_radius" until="NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10) && 15 > fabs(estimator_z - WaypointAlt(WP_BASELEG))" wp="BASELEG"/>
|
||||
<circle radius="nav_radius" until="NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10) && 15 > fabs(GetPosAlt() - WaypointAlt(WP_BASELEG))" wp="BASELEG"/>
|
||||
</block>
|
||||
<block name="final">
|
||||
<!-- <exception cond="ground_alt + 6 > estimator_z" deroute="flare"/> -->
|
||||
<!-- <exception cond="ground_alt + 6 > GetPosAlt()" deroute="flare"/> -->
|
||||
<go approaching_time="0" from="AF" hmode="route" wp="SF"/>
|
||||
</block>
|
||||
<block name="shortfinal">
|
||||
<!-- <exception cond="ground_alt + 6 > estimator_z" deroute="flare"/> -->
|
||||
<!-- <exception cond="ground_alt + 6 > GetPosAlt()" deroute="flare"/> -->
|
||||
<go approaching_time="0" from="SF" hmode="route" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
@@ -114,7 +114,7 @@
|
||||
</block>
|
||||
<block name="Circle 1">
|
||||
<exception cond="datalink_time > 25" deroute="Standby"/>
|
||||
<circle alt="WaypointAlt(WP_1)" radius="nav_radius" until="15 > fabs(estimator_z - WaypointAlt(WP_1))" wp="STDBY"/>
|
||||
<circle alt="WaypointAlt(WP_1)" radius="nav_radius" until="15 > fabs(GetPosAlt() - WaypointAlt(WP_1))" wp="STDBY"/>
|
||||
<go alt="WaypointAlt(WP_1)" approaching_time="-15" from="STDBY" hmode="route" wp="1"/>
|
||||
<circle radius="nav_radius" until="NavCircleCount() > 0.7" wp="1"/>
|
||||
<go alt="WaypointAlt(WP_1)" approaching_time="-15" from="1" hmode="route" wp="STDBY"/>
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<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">
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
</block>
|
||||
|
||||
<block name="ChemotaxisHere">
|
||||
<set var="waypoints[WP_C].x" value="estimator_x"/>
|
||||
<set var="waypoints[WP_C].y" value="estimator_y"/>
|
||||
<set var="waypoints[WP_C].x" value="GetPosX()"/>
|
||||
<set var="waypoints[WP_C].y" value="GetPosY()"/>
|
||||
<deroute block="Chemotaxis"/>
|
||||
</block>
|
||||
|
||||
@@ -107,15 +107,15 @@
|
||||
</block>
|
||||
|
||||
<block name="climb 75">
|
||||
<circle radius="50+(estimator_z-ground_alt)/2" wp="1" throttle="0.75" pitch="15" vmode="throttle" until="10 > PowerVoltage()"/>
|
||||
<circle radius="50+(GetPosAlt()-ground_alt)/2" wp="1" throttle="0.75" pitch="15" vmode="throttle" until="10 > PowerVoltage()"/>
|
||||
</block>
|
||||
|
||||
<block name="climb 1">
|
||||
<circle radius="50+(estimator_z-ground_alt)/2" wp="1" climb="1" pitch="5" vmode="climb" until="10 > PowerVoltage()"/>
|
||||
<circle radius="50+(GetPosAlt()-ground_alt)/2" wp="1" climb="1" pitch="5" vmode="climb" until="10 > PowerVoltage()"/>
|
||||
</block>
|
||||
|
||||
<block name="descent 0">
|
||||
<circle radius="50+(estimator_z-ground_alt)/2" wp="1" throttle="0.0" pitch="-15" vmode="throttle" until="ground_alt+50 > estimator_z"/>
|
||||
<circle radius="50+(GetPosAlt()-ground_alt)/2" wp="1" throttle="0.0" pitch="-15" vmode="throttle" until="ground_alt+50 > GetPosAlt()"/>
|
||||
<deroute block="wait"/>
|
||||
</block>
|
||||
|
||||
@@ -148,12 +148,12 @@
|
||||
<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(estimator_z - WaypointAlt(WP_BASELEG))"
|
||||
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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block key="t" name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png" group="home">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" throttle="1.0" vmode="throttle" wp="CLIMB" pitch="15"/>
|
||||
</block>
|
||||
<block key="<Control>a" name="Standby" strip_button="Standby" strip_icon="home.png" group="home">
|
||||
@@ -78,10 +78,10 @@
|
||||
<block name="land">
|
||||
<call 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="And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10), 10 > fabs(estimator_z - WaypointAlt(WP__BASELEG)))" wp="_BASELEG"/>
|
||||
<circle radius="nav_radius" until="And(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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_icon="takeoff.png" strip_button="Takeoff (wp CLIMB)">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<go wp="CLIMB"/>
|
||||
</block>
|
||||
@@ -66,19 +66,19 @@
|
||||
<circle pitch="auto" radius="75" throttle="0.7" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 75% throttle">
|
||||
<circle pitch="10" radius="50+(estimator_z-ground_alt)/2" throttle="0.75" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="throttle" wp="1"/>
|
||||
<circle pitch="10" radius="50+(GetPosAlt()-ground_alt)/2" throttle="0.75" until="(10 > PowerVoltage()) || (GetPosAlt() > ground_alt+ 1350)" vmode="throttle" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 0m/s">
|
||||
<circle climb="0" radius="nav_radius" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 1m/s">
|
||||
<circle climb="1" pitch="5" radius="50+(estimator_z-ground_alt)/2" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
<circle climb="1" pitch="5" radius="50+(GetPosAlt()-ground_alt)/2" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb nav_climb m/s">
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (GetPosAlt() > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Descent 0% throttle">
|
||||
<circle pitch="-5" radius="50+(estimator_z-ground_alt)/2" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle" wp="1"/>
|
||||
<circle pitch="-5" radius="50+(GetPosAlt()-ground_alt)/2" throttle="0.0" until="ground_alt+50 > GetPosAlt()" vmode="throttle" wp="1"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
<block name="Route 1-2">
|
||||
@@ -112,10 +112,10 @@
|
||||
<call fun="nav_compute_baseleg(WP_AF, WP_TD, WP_BASELEG, nav_radius)"/>
|
||||
<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(estimator_z - WaypointAlt(WP_BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
@@ -155,11 +155,11 @@
|
||||
<go from="2" hmode="route" wp="STDBY"/>
|
||||
</block>
|
||||
<block name="Fly in Square">
|
||||
<exception cond="! InsideSquare(estimator_x, estimator_y)" deroute="Come back wp 1"/>
|
||||
<exception cond="! InsideSquare(GetPosX(), GetPosY())" deroute="Come back wp 1"/>
|
||||
<attitude alt="ground_alt+75" roll="0" vmode="alt"/>
|
||||
</block>
|
||||
<block name="Come back wp 1">
|
||||
<exception cond="InsideSquare(estimator_x, estimator_y)" deroute="Fly in Square"/>
|
||||
<exception cond="InsideSquare(GetPosX(), GetPosY())" deroute="Fly in Square"/>
|
||||
<go wp="1"/>
|
||||
<deroute block="Fly in Square"/>
|
||||
</block>
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby Menton"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby Menton"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go throttle="1.0" vmode="throttle" wp="CLIMB" pitch="15"/>
|
||||
</block>
|
||||
<block name="Standby Menton" strip_button="Standby Menton" strip_icon="home.png">
|
||||
@@ -63,10 +63,10 @@
|
||||
<block name="land">
|
||||
<call 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="And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-10), 10 > fabs(estimator_z - WaypointAlt(WP__BASELEG)))" wp="_BASELEG"/>
|
||||
<circle radius="nav_radius" until="And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-10), 10 > fabs(GetPosAlt() - WaypointAlt(WP__BASELEG)))" wp="_BASELEG"/>
|
||||
</block>
|
||||
<block name="final">
|
||||
<exception cond="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<waypoint name="CLIMB" x="-102.3" y="-129.0"/>
|
||||
</waypoints>
|
||||
<exceptions>
|
||||
<exception cond="estimator_z > 3400" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > 3400" deroute="Standby"/>
|
||||
<exception cond="datalink_time > 30" deroute="Standby"/>
|
||||
</exceptions>
|
||||
<blocks>
|
||||
@@ -34,9 +34,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" throttle="1.0" vmode="throttle" wp="CLIMB"/>
|
||||
</block>
|
||||
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
||||
@@ -46,7 +46,7 @@
|
||||
<circle radius="nav_radius" wp="PROFILE"/>
|
||||
</block>
|
||||
<block name="profile_down" strip_button="Profile Down" strip_icon="down_profile.png">
|
||||
<circle pitch="RadOfDeg(-10)" radius="nav_radius" throttle="0" until="(ground_alt+150 > estimator_z)" vmode="throttle" wp="PROFILE"/>
|
||||
<circle pitch="RadOfDeg(-10)" radius="nav_radius" throttle="0" until="(ground_alt+150 > GetPosAlt())" vmode="throttle" wp="PROFILE"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
<block name="MOB" strip_button="Turn around here" strip_icon="mob.png">
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
</block>
|
||||
<block name="land"> <!-- basic landing function out of formation -->
|
||||
<call fun="stop_formation()"/>
|
||||
<exception cond="(GROUND_ALT+10> estimator_z)" deroute="stop"/>
|
||||
<circle radius="50" until="225 > estimator_z" wp="IAF"/>
|
||||
<exception cond="(GROUND_ALT+10> GetPosAlt())" deroute="stop"/>
|
||||
<circle radius="50" until="225 > GetPosAlt()" wp="IAF"/>
|
||||
<go alt="215" wp="AF"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="RWAY"/>
|
||||
</block>
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
<call fun="stop_formation()"/>
|
||||
</block>
|
||||
<block name="land"> <!-- basic landing function out of formation -->
|
||||
<exception cond="(GROUND_ALT+10> estimator_z)" deroute="stop"/>
|
||||
<circle radius="50" until="WaypointAlt(WP_IAF) > estimator_z" wp="IAF"/>
|
||||
<exception cond="(GROUND_ALT+10> GetPosAlt())" deroute="stop"/>
|
||||
<circle radius="50" until="WaypointAlt(WP_IAF) > GetPosAlt()" wp="IAF"/>
|
||||
<go alt="WaypointAlt(WP_AF)" wp="AF"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="RWAY"/>
|
||||
</block>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_icon="takeoff.png" strip_button="Takeoff (wp CLIMB)">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<go wp="CLIMB"/>
|
||||
</block>
|
||||
@@ -65,19 +65,19 @@
|
||||
<circle pitch="auto" radius="75" throttle="0.7" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 75% throttle">
|
||||
<circle pitch="10" radius="50+(estimator_z-ground_alt)/2" throttle="0.75" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="throttle" wp="1"/>
|
||||
<circle pitch="10" radius="50+(GetPosAlt()-ground_alt)/2" throttle="0.75" until="(10 > PowerVoltage()) || (GetPosAlt() > ground_alt+ 1350)" vmode="throttle" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 0m/s">
|
||||
<circle climb="0" radius="nav_radius" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 1m/s">
|
||||
<circle climb="1" radius="50+(estimator_z-ground_alt)/2" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
<circle climb="1" radius="50+(GetPosAlt()-ground_alt)/2" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb nav_climb m/s">
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (GetPosAlt() > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Descent 0% throttle">
|
||||
<circle pitch="-5" radius="50+(estimator_z-ground_alt)/2" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle" wp="1"/>
|
||||
<circle pitch="-5" radius="50+(GetPosAlt()-ground_alt)/2" throttle="0.0" until="ground_alt+50 > GetPosAlt()" vmode="throttle" wp="1"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
<block name="Route 1-2">
|
||||
@@ -111,10 +111,10 @@
|
||||
<call fun="nav_compute_baseleg(WP_AF, WP_TD, WP_BASELEG, nav_radius)"/>
|
||||
<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(estimator_z - WaypointAlt(WP_BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
<circle radius="-75" wp="HOME"/>
|
||||
</block>
|
||||
<block name="climb 75">
|
||||
<circle radius="50+(estimator_z-ground_alt)/2" wp="1" throttle="0.75" pitch="15" vmode="throttle" until="10>PowerVoltage()"/>
|
||||
<circle radius="50+(GetPosAlt()-ground_alt)/2" wp="1" throttle="0.75" pitch="15" vmode="throttle" until="10>PowerVoltage()"/>
|
||||
</block>
|
||||
<block name="stack 1">
|
||||
<circle radius="estimator_z/2" wp="1"/>
|
||||
<circle radius="GetPosAlt()/2" wp="1"/>
|
||||
</block>
|
||||
<block name="descent 0" strip_button="Descent">
|
||||
<circle radius="estimator_z/2" wp="1" throttle="0.0" pitch="-15" vmode="throttle"/>
|
||||
<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"/>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</waypoints>
|
||||
<blocks>
|
||||
<block name="start">
|
||||
<attitude pitch="20" roll="0" throttle="0.8" until="(estimator_flight_time > 3)" vmode="throttle"/>
|
||||
<attitude pitch="20" roll="0" throttle="0.8" until="(autopilot_flight_time > 3)" vmode="throttle"/>
|
||||
<go wp="START"/>
|
||||
</block>
|
||||
<block name="wait" strip_button="wait">
|
||||
@@ -55,7 +55,7 @@
|
||||
<set value="TRUE" var="h_ctl_disabled"/>
|
||||
<set value="(-0.6*MAX_PPRZ)" var="h_ctl_aileron_setpoint"/>
|
||||
<set value="(0.9*MAX_PPRZ)" var="h_ctl_elevator_setpoint"/>
|
||||
<while cond="estimator_z > ground_alt + 220"/>
|
||||
<while cond="GetPosAlt() > ground_alt + 220"/>
|
||||
<set value="0" var="h_ctl_aileron_setpoint"/>
|
||||
<set value="0" var="h_ctl_elevator_setpoint"/>
|
||||
</block>
|
||||
@@ -77,10 +77,10 @@
|
||||
<block name="land">
|
||||
<call 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) && 20 > fabs(estimator_z - WaypointAlt(WP__BASELEG))" wp="_BASELEG"/>
|
||||
<circle radius="nav_radius" until="NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10) && 20 > fabs(GetPosAlt() - WaypointAlt(WP__BASELEG))" wp="_BASELEG"/>
|
||||
</block>
|
||||
<block name="final">
|
||||
<exception cond="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
@@ -114,7 +114,7 @@
|
||||
<!--block NAME="roll" strip_button="Roll">
|
||||
<set value="TRUE" var="h_ctl_disabled"/>
|
||||
<set value="(-0.75*MAX_PPRZ)" var="h_ctl_aileron_setpoint"/>
|
||||
<while cond="3.> stage_time && (estimator_phi > 0 || -M_PI_2 > estimator_phi)"/>
|
||||
<while cond="3.> stage_time && (stateGetNedToBodyEulers_f()->phi > 0 || -M_PI_2 > stateGetNedToBodyEulers_f()->phi)"/>
|
||||
<set value="FALSE" var="h_ctl_disabled"/>
|
||||
<return/>
|
||||
</block-->
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</waypoints>
|
||||
<blocks>
|
||||
<block NAME="start">
|
||||
<attitude roll="0" pitch="0.1" vmode="throttle" throttle="0.7" until="(estimator_flight_time > 5)"/>
|
||||
<attitude roll="0" pitch="0.1" vmode="throttle" throttle="0.7" until="(autopilot_flight_time > 5)"/>
|
||||
<go wp="START"/>
|
||||
</block>
|
||||
<block NAME="east">
|
||||
@@ -43,7 +43,7 @@
|
||||
<block NAME="roll" strip_button="Roll">
|
||||
<set value="TRUE" var="h_ctl_disabled"/>
|
||||
<set value="(-0.75*MAX_PPRZ)" var="h_ctl_aileron_setpoint"/>
|
||||
<while cond="3.> stage_time && (estimator_phi > 0 || -M_PI_2 > estimator_phi)"/>
|
||||
<while cond="3.> stage_time && (stateGetNedToBodyEulers_f()->phi > 0 || -M_PI_2 > stateGetNedToBodyEulers_f()->phi)"/>
|
||||
<set value="FALSE" var="h_ctl_disabled"/>
|
||||
<return/>
|
||||
</block>
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
<call fun="NavSetGroundReferenceHere()"/>
|
||||
</block>
|
||||
<block name="Takeoff">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="HSIF"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="HSIF"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" pitch="15" throttle="1.0" vmode="throttle" wp="CLIMB"/>
|
||||
</block>
|
||||
<block name="HSIF">
|
||||
<circle radius="200" until="estimator_x > 200" wp="2"/>
|
||||
<circle radius="200" until="GetPosX() > 200" wp="2"/>
|
||||
<circle radius="-75" until="NavQdrCloseTo(330)" wp="3"/>
|
||||
<circle radius="200" until="0 > estimator_x" wp="1"/>
|
||||
<circle radius="200" until="0 > GetPosX()" wp="1"/>
|
||||
<circle radius="35" wp="STDBY"/>
|
||||
</block>
|
||||
</blocks>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
<blocks>
|
||||
<block name="init">
|
||||
<while cond="(estimator_flight_time)"></while>
|
||||
<heading course="QFU" vmode="climb" climb="2.0" until="(estimator_z > SECURITY_ALT)"/>
|
||||
<while cond="(autopilot_flight_time)"></while>
|
||||
<heading course="QFU" vmode="climb" climb="2.0" until="(GetPosAlt() > SECURITY_ALT)"/>
|
||||
</block>
|
||||
|
||||
<block name="balaye">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<waypoint name="S2" x="300" y="400"/>
|
||||
</waypoints>
|
||||
<exceptions>
|
||||
<exception cond="estimator_z > 3600" deroute="wait"/>
|
||||
<exception cond="GetPosAlt() > 3600" deroute="wait"/>
|
||||
<exception cond="datalink_time > 30" deroute="wait"/>
|
||||
<exception cond="10 > PowerVoltage()" deroute="wait"/>
|
||||
</exceptions>
|
||||
@@ -23,7 +23,7 @@
|
||||
<block name="start">
|
||||
<set value="10" var="my_nav_roll"/>
|
||||
<set value="-10" var="my_nav_pitch"/>
|
||||
<attitude pitch="5" roll="0" throttle="0.7" until="(estimator_flight_time > 5)" vmode="throttle"/>
|
||||
<attitude pitch="5" roll="0" throttle="0.7" until="(autopilot_flight_time > 5)" vmode="throttle"/>
|
||||
<go wp="1"/>
|
||||
</block>
|
||||
<block name="east">
|
||||
@@ -66,11 +66,11 @@
|
||||
<circle radius="nav_radius" wp="CLIMB"/>
|
||||
</block>
|
||||
<block name="descent">
|
||||
<circle radius="nav_radius" wp="CLIMB" vmode="throttle" throttle="0" pitch="RadOfDeg(my_nav_pitch)" until="(ground_alt+150 > estimator_z)"/>
|
||||
<circle radius="nav_radius" wp="CLIMB" vmode="throttle" throttle="0" pitch="RadOfDeg(my_nav_pitch)" until="(ground_alt+150 > GetPosAlt())"/>
|
||||
<deroute block="wait"/>
|
||||
</block>
|
||||
<block name="wind">
|
||||
<attitude pitch="RadOfDeg(my_nav_pitch)" roll="my_nav_roll" throttle="0.0" until="(ground_alt+150 > estimator_z)" vmode="throttle"/>
|
||||
<attitude pitch="RadOfDeg(my_nav_pitch)" roll="my_nav_roll" throttle="0.0" until="(ground_alt+150 > GetPosAlt())" vmode="throttle"/>
|
||||
<deroute block="wait"/>
|
||||
</block>
|
||||
<block name="wait" strip_button="Wait">
|
||||
@@ -79,7 +79,7 @@
|
||||
<block name="roll">
|
||||
<set value="TRUE" var="h_ctl_disabled"/>
|
||||
<set value="(-0.75*MAX_PPRZ)" var="h_ctl_aileron_setpoint"/>
|
||||
<while cond="3.> stage_time && (estimator_phi > 0 || -M_PI_2 > estimator_phi)"/>
|
||||
<while cond="3.> stage_time && (stateGetNedToBodyEulers_f()->phi > 0 || -M_PI_2 > stateGetNedToBodyEulers_f()->phi)"/>
|
||||
<set value="FALSE" var="h_ctl_disabled"/>
|
||||
<return/>
|
||||
</block>
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" throttle="1.0" vmode="throttle" wp="CLIMB" pitch="15"/>
|
||||
</block>
|
||||
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
||||
@@ -80,10 +80,10 @@
|
||||
<block name="land">
|
||||
<call 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(estimator_z - WaypointAlt(WP__BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -26,47 +26,47 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Circle"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Circle"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" throttle="1.0" vmode="throttle" wp="CLIMB" pitch="15"/>
|
||||
</block>
|
||||
<block name="Circle" strip_button="Circle" strip_icon="home.png">
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+200" until="estimator_z > ground_alt+195"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+200" until="GetPosAlt() > ground_alt+195"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+200" until="NavCircleCount() > 2"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+300" until="estimator_z > ground_alt+295"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+300" until="GetPosAlt() > ground_alt+295"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+300" until="NavCircleCount() > 2"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+400" until="estimator_z > ground_alt+395"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+400" until="GetPosAlt() > ground_alt+395"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+400" until="NavCircleCount() > 2"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+300" until="ground_alt+305 > estimator_z"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+300" until="ground_alt+305 > GetPosAlt()"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+300" until="NavCircleCount() > 2"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+200" until="ground_alt+205 > estimator_z"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+200" until="ground_alt+205 > GetPosAlt()"/>
|
||||
<circle radius="nav_radius" wp="CIRCLE" alt="ground_alt+200" until="NavCircleCount() > 2"/>
|
||||
<deroute block="Circle"/>
|
||||
</block>
|
||||
<block name="Racetrack E-W" strip_button="Racetrack E-W" strip_icon="oval.png">
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+200" until="estimator_z > ground_alt+195"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+200" until="GetPosAlt() > ground_alt+195"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+200" until="nav_oval_count > 2"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+300" until="estimator_z > ground_alt+295"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+300" until="GetPosAlt() > ground_alt+295"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+300" until="nav_oval_count > 2"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+400" until="estimator_z > ground_alt+395"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+400" until="GetPosAlt() > ground_alt+395"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+400" until="nav_oval_count > 2"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+300" until="ground_alt+305 > estimator_z"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+300" until="ground_alt+305 > GetPosAlt()"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+300" until="nav_oval_count > 2"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+200" until="ground_alt+205 > estimator_z"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+200" until="ground_alt+205 > GetPosAlt()"/>
|
||||
<oval p1="1" p2="2" radius="nav_radius" alt="ground_alt+200" until="nav_oval_count > 2"/>
|
||||
<deroute block="Racetrack E-W"/>
|
||||
</block>
|
||||
<block name="Racetrack N-S" strip_button="Racetrack N-S" strip_icon="oval.png">
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+200" until="estimator_z > ground_alt+195"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+200" until="GetPosAlt() > ground_alt+195"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+200" until="nav_oval_count > 2"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+300" until="estimator_z > ground_alt+295"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+300" until="GetPosAlt() > ground_alt+295"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+300" until="nav_oval_count > 2"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+400" until="estimator_z > ground_alt+395"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+400" until="GetPosAlt() > ground_alt+395"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+400" until="nav_oval_count > 2"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+300" until="ground_alt+305 > estimator_z"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+300" until="ground_alt+305 > GetPosAlt()"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+300" until="nav_oval_count > 2"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+200" until="ground_alt+305 > estimator_z"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+200" until="ground_alt+305 > GetPosAlt()"/>
|
||||
<oval p1="2" p2="3" radius="nav_radius" alt="ground_alt+200" until="nav_oval_count > 2"/>
|
||||
<deroute block="Racetrack N-S"/>
|
||||
</block>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<waypoint name="CLIMB" x="-114.5" y="162.3"/>
|
||||
</waypoints>
|
||||
<exceptions>
|
||||
<exception cond="estimator_z > 3600" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > 3600" deroute="Standby"/>
|
||||
<exception cond="datalink_time > 30" deroute="Standby"/>
|
||||
<exception cond="10 > PowerVoltage()" deroute="Standby"/>
|
||||
</exceptions>
|
||||
@@ -36,9 +36,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" throttle="1.0" vmode="throttle" wp="CLIMB"/>
|
||||
</block>
|
||||
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
||||
@@ -48,7 +48,7 @@
|
||||
<circle radius="nav_radius" wp="PROFILE"/>
|
||||
</block>
|
||||
<block name="profile_down" strip_button="Profile Down" strip_icon="down_profile.png">
|
||||
<circle radius="nav_radius" wp="PROFILE" vmode="throttle" throttle="0" pitch="RadOfDeg(-10)" until="(ground_alt+150 > estimator_z)"/>
|
||||
<circle radius="nav_radius" wp="PROFILE" vmode="throttle" throttle="0" pitch="RadOfDeg(-10)" until="(ground_alt+150 > GetPosAlt())"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
<block name="MOB" strip_button="Turn around here" strip_icon="mob.png">
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<block name="land">
|
||||
<call 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="And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10), 10 > fabs(estimator_z - WaypointAlt(WP__BASELEG)))" wp="_BASELEG"/>
|
||||
<circle radius="nav_radius" until="And(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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD" alt="ground_alt"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
<set value="compute_baseleg()" var="unit"/>
|
||||
<circle radius="BOMB_RADIUS" until="circle_count > 0.5" wp="BASELEG"/>
|
||||
<set value="V_CTL_AUTO_THROTTLE_MIN_CRUISE_THROTTLE" var="v_ctl_auto_throttle_cruise_throttle"/>
|
||||
<circle radius="BOMB_RADIUS" until="Qdr(DegOfRad(bomb_start_qdr)-10) && baseleg_alt_tolerance > fabs(estimator_z - baseleg_alt)" wp="BASELEG"/>
|
||||
<circle radius="BOMB_RADIUS" until="Qdr(DegOfRad(bomb_start_qdr)-10) && baseleg_alt_tolerance > fabs(GetPosAlt() - baseleg_alt)" wp="BASELEG"/>
|
||||
</block>
|
||||
|
||||
<block name="final">
|
||||
<exception cond="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go alt="baseleg_alt" approaching_time="16" from="AF" hmode="route" wp="TD"/>
|
||||
<go approaching_time="2" from="AF" hmode="route" throttle="0.1" vmode="throttle" wp="TD"/>
|
||||
</block>
|
||||
@@ -50,7 +50,7 @@
|
||||
</block>
|
||||
|
||||
<block name="climb">
|
||||
<exception cond=" estimator_z > ground_alt +30" deroute="wait"/>
|
||||
<exception cond=" GetPosAlt() > ground_alt +30" deroute="wait"/>
|
||||
<attitude pitch="15" roll="0" throttle="0.8" until="10> stage_time" vmode="throttle"/>
|
||||
</block>-->
|
||||
<block name="wait" strip_button="Wait">
|
||||
@@ -89,7 +89,7 @@
|
||||
<block name="roll" strip_button="Roll">
|
||||
<set value="TRUE" var="h_ctl_disabled"/>
|
||||
<set value="(-0.75*MAX_PPRZ)" var="h_ctl_aileron_setpoint"/>
|
||||
<while cond="3 > stage_time && (estimator_phi > 0 || -M_PI_2 > estimator_phi)"/>
|
||||
<while cond="3 > stage_time && (stateGetNedToBodyEulers_f()->phi > 0 || -M_PI_2 > stateGetNedToBodyEulers_f()->phi)"/>
|
||||
<set value="FALSE" var="h_ctl_disabled"/>
|
||||
<return/>
|
||||
</block>-->
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</sector>
|
||||
</sectors>
|
||||
<exceptions>
|
||||
<exception cond="!InsideFonsorbes(estimator_x, estimator_y)" deroute="kill"/>
|
||||
<exception cond="!InsideFonsorbes(GetPosX(), GetPosY())" deroute="kill"/>
|
||||
<exception cond="datalink_time > 35" deroute="standby"/>
|
||||
</exceptions>
|
||||
<blocks>
|
||||
@@ -73,7 +73,7 @@
|
||||
</while>
|
||||
</block>
|
||||
<block name="takeoff">
|
||||
<exception cond="estimator_z > ground_alt + 25" deroute="standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt + 25" deroute="standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<go wp="TAKEOFF"/>
|
||||
</block>
|
||||
@@ -130,10 +130,10 @@
|
||||
<block name="land">
|
||||
<call 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(estimator_z - WaypointAlt(WP_BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<call fun="compute_TOD(WP_AF, WP_TD, WP_TOD, GLIDE_AIRSPEED, GLIDE_VSPEED)"/>
|
||||
<go approaching_time="0" from="AF" hmode="route" wp="TOD"/>
|
||||
<go from="TOD" hmode="route" pitch="stage_time*(GLIDE_PITCH/3)" throttle="0" vmode="throttle" wp="TD"/>
|
||||
@@ -144,11 +144,11 @@
|
||||
</block>
|
||||
|
||||
<block name="T3 Square">
|
||||
<exception cond="! InsideT3(estimator_x, estimator_y)" deroute="come back"/>
|
||||
<exception cond="! InsideT3(GetPosX(), GetPosY())" deroute="come back"/>
|
||||
<attitude roll="0" vmode="alt" alt="WaypointAlt(WP_T3)"/>
|
||||
</block>
|
||||
<block name="come back">
|
||||
<exception cond="InsideT3(estimator_x, estimator_y)" deroute="T3 Square"/>
|
||||
<exception cond="InsideT3(GetPosX(), GetPosY())" deroute="T3 Square"/>
|
||||
<go wp="T3"/>
|
||||
</block>
|
||||
</blocks>
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<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">
|
||||
@@ -98,10 +98,10 @@
|
||||
<block name="land">
|
||||
<call 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(estimator_z - WaypointAlt(WP__BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<blocks>
|
||||
<block name="init">
|
||||
<while cond="(!launch)"/>
|
||||
<heading course="QFU" throttle="0.8" pitch="10" until="(estimator_flight_time > 8)" vmode="throttle"/>
|
||||
<heading climb="3.0" course="QFU" pitch="10" until="(estimator_z > SECURITY_ALT)" vmode="climb"/>
|
||||
<heading course="QFU" throttle="0.8" pitch="10" until="(autopilot_flight_time > 8)" vmode="throttle"/>
|
||||
<heading climb="3.0" course="QFU" pitch="10" until="(GetPosAlt() > SECURITY_ALT)" vmode="climb"/>
|
||||
</block>
|
||||
<block name="for">
|
||||
<for from="0" to="3" var="i">
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
<waypoint name="PROF_LAND" x="168.6" y="36.4"/>
|
||||
</waypoints>
|
||||
<exceptions>
|
||||
<exception cond="estimator_z > 5000" deroute="wait"/>
|
||||
<exception cond="GetPosAlt() > 5000" deroute="wait"/>
|
||||
<exception cond="datalink_time > 140" deroute="wait"/>
|
||||
<exception cond="10 > PowerVoltage()" deroute="wait"/>
|
||||
</exceptions>
|
||||
<blocks>
|
||||
<block name="start">
|
||||
<attitude pitch="20" roll="0" throttle="0.7" until="(estimator_flight_time > 3)" vmode="throttle"/>
|
||||
<attitude pitch="20" roll="0" throttle="0.7" until="(autopilot_flight_time > 3)" vmode="throttle"/>
|
||||
<go wp="START"/>
|
||||
</block>
|
||||
<block name="wait" strip_button="wait">
|
||||
@@ -38,7 +38,7 @@
|
||||
<set value="TRUE" var="h_ctl_disabled"/>
|
||||
<set value="(-0.6*MAX_PPRZ)" var="h_ctl_aileron_setpoint"/>
|
||||
<set value="(0.9*MAX_PPRZ)" var="h_ctl_elevator_setpoint"/>
|
||||
<while cond="estimator_z > ground_alt + 220"/>
|
||||
<while cond="GetPosAlt() > ground_alt + 220"/>
|
||||
<set value="0" var="h_ctl_aileron_setpoint"/>
|
||||
<set value="0" var="h_ctl_elevator_setpoint"/>
|
||||
</block>
|
||||
@@ -71,7 +71,7 @@
|
||||
<circle radius="nav_radius" wp="PROF_LAND"/>
|
||||
</block>
|
||||
<block name="profile_down land" strip_button="Profile Down Land" strip_icon="down_profile.png">
|
||||
<circle pitch="RadOfDeg(-10)" radius="nav_radius" throttle="0" until="(ground_alt+100 > estimator_z)" vmode="throttle" wp="PROF_LAND"/>
|
||||
<circle pitch="RadOfDeg(-10)" radius="nav_radius" throttle="0" until="(ground_alt+100 > GetPosAlt())" vmode="throttle" wp="PROF_LAND"/>
|
||||
<deroute block="wait"/>
|
||||
</block>
|
||||
<block name="Land Right AF-TD" strip_button="Land right (wp AF-TD)" strip_icon="land-right.png">
|
||||
@@ -85,10 +85,10 @@
|
||||
<block name="land">
|
||||
<call 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) && 20 > fabs(estimator_z - WaypointAlt(WP__BASELEG))" wp="_BASELEG"/>
|
||||
<circle radius="nav_radius" until="NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10) && 20 > fabs(GetPosAlt() - WaypointAlt(WP__BASELEG))" wp="_BASELEG"/>
|
||||
</block>
|
||||
<block name="final">
|
||||
<exception cond="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block key="t" name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" pitch="15" throttle="1.0" vmode="throttle" wp="CLIMB"/>
|
||||
</block>
|
||||
<block key="<Control>a" name="Standby" strip_button="Standby" strip_icon="home.png">
|
||||
@@ -70,10 +70,10 @@
|
||||
<block name="land">
|
||||
<call 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="And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10), 10 > fabs(estimator_z - WaypointAlt(WP__BASELEG)))" wp="_BASELEG"/>
|
||||
<circle radius="nav_radius" until="And(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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">
|
||||
<exception cond="ins_enu_pos.z > POS_BFP_OF_REAL(2.)" deroute="Standby"/>
|
||||
<exception cond="stateGetPositionEnu_f()->z > 2.0" deroute="Standby"/>
|
||||
<call fun="NavSetWaypointHere(WP_CLIMB)"/>
|
||||
<stay vmode="climb" climb="0.5" wp="CLIMB"/>
|
||||
</block>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<blocks>
|
||||
<block NAME="init">
|
||||
<while COND="(!launch)"/>
|
||||
<heading THROTTLE="0.8" PITCH="0.15" COURSE="QFU" UNTIL="(estimator_flight_time > 8)" VMODE="throttle"/>
|
||||
<heading PITCH="0.15" CLIMB="3.0" COURSE="QFU" UNTIL="(estimator_z > SECURITY_ALT)" VMODE="climb"/>
|
||||
<heading THROTTLE="0.8" PITCH="0.15" COURSE="QFU" UNTIL="(autopilot_flight_time > 8)" VMODE="throttle"/>
|
||||
<heading PITCH="0.15" CLIMB="3.0" COURSE="QFU" UNTIL="(GetPosAlt() > SECURITY_ALT)" VMODE="climb"/>
|
||||
<deroute BLOCK="circlehome"/>
|
||||
</block>
|
||||
<block NAME="circlehome">
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<deroute block="climb"/>
|
||||
</block>
|
||||
<block name="climb">
|
||||
<attitude pitch="10" roll="0" throttle="0.9" until="estimator_z > ground_alt+30" vmode="throttle"/>
|
||||
<attitude pitch="10" roll="0" throttle="0.9" until="GetPosAlt() > ground_alt+30" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="standby" strip_button="STDBY">
|
||||
<circle radius="nav_radius" wp="STDBY"/>
|
||||
@@ -75,10 +75,10 @@
|
||||
<call 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(estimator_z - WaypointAlt(WP_BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" throttle="1.0" vmode="throttle" wp="CLIMB"/>
|
||||
</block>
|
||||
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
||||
@@ -55,10 +55,10 @@
|
||||
<block name="land">
|
||||
<call 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(estimator_z - WaypointAlt(WP__BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<set value="0" var="autopilot_flight_time"/>
|
||||
<go from="HOME" throttle="1.0" vmode="throttle" wp="CLIMB"/>
|
||||
</block>
|
||||
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
||||
@@ -72,10 +72,10 @@
|
||||
<block name="land">
|
||||
<call 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(estimator_z - WaypointAlt(WP__BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_icon="takeoff.png" strip_button="Takeoff (wp CLIMB)">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<go wp="CLIMB"/>
|
||||
</block>
|
||||
@@ -65,25 +65,25 @@
|
||||
<circle pitch="auto" radius="75" throttle="0.7" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 75% throttle">
|
||||
<circle pitch="10" radius="50+(estimator_z-ground_alt)/2" throttle="0.75" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="throttle" wp="1"/>
|
||||
<circle pitch="10" radius="50+(GetPosAlt()-ground_alt)/2" throttle="0.75" until="(10 > PowerVoltage()) || (GetPosAlt() > ground_alt+ 1350)" vmode="throttle" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 0m/s">
|
||||
<circle climb="0" radius="nav_radius" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 1m/s">
|
||||
<circle climb="1" pitch="5" radius="50+(estimator_z-ground_alt)/2" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
<circle climb="1" pitch="5" radius="50+(GetPosAlt()-ground_alt)/2" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb nav_climb m/s">
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (GetPosAlt() > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
|
||||
<block name="Circle 0% throttle">
|
||||
<circle pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle" wp="1"/>
|
||||
<circle pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > GetPosAlt()" vmode="throttle" wp="1"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
|
||||
<block name="Oval 0% throttle">
|
||||
<oval p1="1" p2="2" pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle"/>
|
||||
<oval p1="1" p2="2" pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > GetPosAlt()" vmode="throttle"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
|
||||
@@ -119,10 +119,10 @@
|
||||
<call fun="nav_compute_baseleg(WP_AF, WP_TD, WP_BASELEG, nav_radius)"/>
|
||||
<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(estimator_z - WaypointAlt(WP_BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
@@ -162,11 +162,11 @@
|
||||
<go from="2" hmode="route" wp="STDBY"/>
|
||||
</block>
|
||||
<block name="Fly in Square">
|
||||
<exception cond="! InsideSquare(estimator_x, estimator_y)" deroute="Come back wp 1"/>
|
||||
<exception cond="! InsideSquare(GetPosX(), GetPosY())" deroute="Come back wp 1"/>
|
||||
<attitude alt="ground_alt+75" roll="0" vmode="alt"/>
|
||||
</block>
|
||||
<block name="Come back wp 1">
|
||||
<exception cond="InsideSquare(estimator_x, estimator_y)" deroute="Fly in Square"/>
|
||||
<exception cond="InsideSquare(GetPosX(), GetPosY())" deroute="Fly in Square"/>
|
||||
<go wp="1"/>
|
||||
<deroute block="Fly in Square"/>
|
||||
</block>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<attitude roll="0" throttle="0" vmode="throttle"/>
|
||||
</block>
|
||||
<block name="Takeoff" strip_icon="takeoff.png" strip_button="Takeoff (wp CLIMB)">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="CLIMB_AIRSPEED" var="v_ctl_auto_airspeed_setpoint" />
|
||||
<go wp="CLIMB"/>
|
||||
@@ -69,25 +69,25 @@
|
||||
<circle pitch="auto" radius="75" throttle="0.7" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 75% throttle">
|
||||
<circle pitch="10" radius="50+(estimator_z-ground_alt)/2" throttle="0.75" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="throttle" wp="1"/>
|
||||
<circle pitch="10" radius="50+(GetPosAlt()-ground_alt)/2" throttle="0.75" until="(10 > PowerVoltage()) || (GetPosAlt() > ground_alt+ 1350)" vmode="throttle" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 0m/s">
|
||||
<circle climb="0" radius="nav_radius" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb 1m/s">
|
||||
<circle climb="1" pitch="5" radius="50+(estimator_z-ground_alt)/2" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
<circle climb="1" pitch="5" radius="50+(GetPosAlt()-ground_alt)/2" until="10 > PowerVoltage()" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
<block name="Climb nav_climb m/s">
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (GetPosAlt() > ground_alt+ 1350)" vmode="climb" wp="1"/>
|
||||
</block>
|
||||
|
||||
<block name="Circle 0% throttle">
|
||||
<circle pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle" wp="1"/>
|
||||
<circle pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > GetPosAlt()" vmode="throttle" wp="1"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
|
||||
<block name="Oval 0% throttle">
|
||||
<oval p1="1" p2="2" pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle"/>
|
||||
<oval p1="1" p2="2" pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > GetPosAlt()" vmode="throttle"/>
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
<call fun="nav_compute_baseleg(WP_AF, WP_TD, WP_BASELEG, nav_radius)"/>
|
||||
<circle radius="nav_radius" until="NavCircleCount() > 0.5" wp="BASELEG"/>
|
||||
<set value="GLIDE_AIRSPEED" var="v_ctl_auto_airspeed_setpoint" />
|
||||
<circle radius="nav_radius" until="NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10) && 10 > fabs(estimator_z - WaypointAlt(WP_BASELEG))" 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">
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD" approaching_time="5" />
|
||||
@@ -177,11 +177,11 @@
|
||||
<go from="2" hmode="route" wp="STDBY"/>
|
||||
</block>
|
||||
<block name="Fly in Square">
|
||||
<exception cond="! InsideSquare(estimator_x, estimator_y)" deroute="Come back wp 1"/>
|
||||
<exception cond="! InsideSquare(GetPosX(), GetPosY())" deroute="Come back wp 1"/>
|
||||
<attitude alt="ground_alt+75" roll="0" vmode="alt"/>
|
||||
</block>
|
||||
<block name="Come back wp 1">
|
||||
<exception cond="InsideSquare(estimator_x, estimator_y)" deroute="Fly in Square"/>
|
||||
<exception cond="InsideSquare(GetPosX(), GetPosY())" deroute="Fly in Square"/>
|
||||
<go wp="1"/>
|
||||
<deroute block="Fly in Square"/>
|
||||
</block>
|
||||
|
||||
@@ -61,7 +61,7 @@ float varsweepsize=110;
|
||||
</block>
|
||||
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<go wp="CLIMB"/>
|
||||
</block>
|
||||
@@ -112,7 +112,7 @@ float varsweepsize=110;
|
||||
<call fun="NavSetWaypointHere(WP_MOB)"/>
|
||||
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
|
||||
<circle alt="ground_alt+105" radius="nav_radius" wp="MOB"/>
|
||||
<exception cond="estimator_z > ground_alt+100" deroute="Carto survey S1-S2-S3"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+100" deroute="Carto survey S1-S2-S3"/>
|
||||
</block>
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ float varsweepsize=110;
|
||||
<call fun="NavSetWaypointHere(WP_MOB)"/>
|
||||
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
|
||||
<circle alt="ground_alt+35" radius="nav_radius" wp="MOB"/>
|
||||
<exception cond="ground_alt+40 > estimator_z " deroute="Carto survey SP1-SP2-SP3 fin"/>
|
||||
<exception cond="ground_alt+40 > GetPosAlt() " deroute="Carto survey SP1-SP2-SP3 fin"/>
|
||||
</block>
|
||||
|
||||
<block name="Carto survey SP1-SP2-SP3 fin" strip_button="Survey (wp S1-S2)" strip_icon="survey.png">
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
<exceptions/>
|
||||
<blocks>
|
||||
<block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
|
||||
<exception cond="estimator_z > ground_alt+25" deroute="Standby"/>
|
||||
<exception cond="GetPosAlt() > ground_alt+25" deroute="Standby"/>
|
||||
<set value="0" var="kill_throttle"/>
|
||||
<set value="0" var="estimator_flight_time"/>
|
||||
<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">
|
||||
@@ -89,10 +89,10 @@
|
||||
<block name="land">
|
||||
<call 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(estimator_z - WaypointAlt(WP__BASELEG))" 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="ground_alt + 10 > estimator_z" deroute="flare"/>
|
||||
<exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
|
||||
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
|
||||
</block>
|
||||
<block name="flare">
|
||||
|
||||
@@ -2,30 +2,14 @@
|
||||
|
||||
<module name="baro_board" dir="sensors">
|
||||
<doc>
|
||||
<description>Temporary hack to use baro interface on fixedwing</description>
|
||||
<description>Allow to use baro interface on fixedwing with external barometers</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="baro_board_module.h"/>
|
||||
</header>
|
||||
<init fun="baro_init()"/>
|
||||
<periodic fun="baro_periodic()" freq="60."/>
|
||||
<event fun="BaroEvent(baro_abs,baro_diff)"/>
|
||||
<makefile target="ap">
|
||||
<file name="baro_board.c" dir="boards/$(BOARD)"/>
|
||||
<define name="USE_BARO_AS_ALTIMETER"/>
|
||||
<raw>
|
||||
ifeq ($(BOARD), navgo)
|
||||
ap.CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1
|
||||
ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1
|
||||
ap.srcs += peripherals/ads1114.c
|
||||
else ifeq ($(BOARD), umarim)
|
||||
ap.CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1
|
||||
ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1
|
||||
ap.srcs += peripherals/ads1114.c
|
||||
else ifeq ($(BOARD), lisa_l)
|
||||
ap.CFLAGS += -DUSE_I2C2
|
||||
endif
|
||||
</raw>
|
||||
<file name="baro_board_module.c"/>
|
||||
<define name="USE_BAROMETER"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<dl_settings>
|
||||
|
||||
<dl_settings NAME="alt_baro">
|
||||
<dl_setting MAX="1" MIN="0" STEP="1" VAR="alt_kalman_enabled" shortname="alt_kalman" module="estimator"/>
|
||||
<dl_setting MAX="1" MIN="0" STEP="1" VAR="alt_kalman_enabled" shortname="alt_kalman" module="subsystems/ins/ins_float"/>
|
||||
</dl_settings>
|
||||
|
||||
</dl_settings>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<dl_setting MAX="1000" MIN="0" STEP="10" VAR="flight_altitude" shortname="altitude"/>
|
||||
<dl_setting MAX="360" MIN="0" STEP="1" VAR="nav_course"/>
|
||||
<dl_setting MAX="10" MIN="-10" STEP="5" VAR="nav_shift" module="subsystems/nav" handler="IncreaseShift" shortname="inc. shift"/>
|
||||
<dl_setting MAX="0" MIN="0" STEP="1" VAR="estimator_flight_time" shortname="flight time" module="autopilot" handler="ResetFlightTimeAndLaunch"/>
|
||||
<dl_setting MAX="0" MIN="0" STEP="1" VAR="autopilot_flight_time" shortname="flight time" module="autopilot" handler="ResetFlightTimeAndLaunch"/>
|
||||
<dl_setting MAX="200" MIN="-200" STEP="10" VAR="nav_radius" module="subsystems/nav" handler="SetNavRadius">
|
||||
<strip_button icon="circle-right.png" name="Circle right" value="1" group="circle"/>
|
||||
<strip_button icon="circle-left.png" name="Circle left" value="-1" group="circle"/>
|
||||
|
||||
@@ -62,6 +62,13 @@
|
||||
<message name="STATE_FILTER_STATUS" period="7."/>
|
||||
<message name="DOWNLINK" period="5.7"/>
|
||||
</mode>
|
||||
<mode name="raw_sensors">
|
||||
<message name="DL_VALUE" period="0.5"/>
|
||||
<message name="ALIVE" period="2.1"/>
|
||||
<message name="BARO_RAW" period="0.5"/>
|
||||
<message name="IR_SENSORS" period="0.5"/>
|
||||
<message name="IMU_GYRO_RAW" period="0.1"/>
|
||||
</mode>
|
||||
</process>
|
||||
<process name="Fbw">
|
||||
<mode name="default">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "generated/flight_plan.h"
|
||||
#include "autopilot.h"
|
||||
#include "subsystems/gps.h"
|
||||
#include "estimator.h"
|
||||
#include "math/pprz_geodetic_float.h"
|
||||
#include "math/pprz_geodetic_int.h"
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "std.h"
|
||||
#include "inter_mcu.h"
|
||||
#include "firmwares/fixedwing/autopilot.h"
|
||||
#include "estimator.h"
|
||||
#include "subsystems/gps.h"
|
||||
#include "subsystems/navigation/traffic_info.h"
|
||||
#include "generated/flight_plan.h"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "jsbsim_hw.h"
|
||||
#include <math.h>
|
||||
#include "estimator.h"
|
||||
|
||||
#ifndef JSBSIM_IR_ROLL_NEUTRAL
|
||||
#define JSBSIM_IR_ROLL_NEUTRAL 0.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
#include "generated/airframe.h"
|
||||
#include "estimator.h"
|
||||
#include "state.h"
|
||||
|
||||
// Arduimu empty implementation
|
||||
#include "modules/ins/ins_arduimu.h"
|
||||
@@ -25,8 +25,12 @@ extern float sim_theta;
|
||||
void ArduIMU_init( void ) {}
|
||||
void ArduIMU_periodic( void ) {
|
||||
// Feed directly the estimator
|
||||
estimator_phi = sim_phi - ins_roll_neutral;
|
||||
estimator_theta = sim_theta - ins_pitch_neutral;
|
||||
struct FloatEulers att = {
|
||||
sim_phi - ins_roll_neutral,
|
||||
sim_theta - ins_pitch_neutral,
|
||||
0.
|
||||
};
|
||||
stateSetNedToBodyEulers_f(&att);
|
||||
}
|
||||
void ArduIMU_periodicGPS( void ) {}
|
||||
void IMU_Daten_verarbeiten( void ) {}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
#include "generated/airframe.h"
|
||||
#include "estimator.h"
|
||||
#include "state.h"
|
||||
|
||||
// Arduimu empty implementation
|
||||
#include "modules/ins/ins_arduimu_basic.h"
|
||||
@@ -27,11 +27,14 @@ extern float sim_r;
|
||||
void ArduIMU_init( void ) {}
|
||||
void ArduIMU_periodic( void ) {
|
||||
// Feed directly the estimator
|
||||
estimator_phi = sim_phi - ins_roll_neutral;
|
||||
estimator_theta = sim_theta - ins_pitch_neutral;
|
||||
estimator_p = sim_p;
|
||||
estimator_q = sim_q;
|
||||
estimator_r = sim_r;
|
||||
struct FloatEulers att = {
|
||||
sim_phi - ins_roll_neutral,
|
||||
sim_theta - ins_pitch_neutral,
|
||||
0.
|
||||
};
|
||||
stateSetNedToBodyEulers_f(&att);
|
||||
struct FloatRates rates = { sim_p, sim_q, sim_r };
|
||||
stateSetBodyRates_f(&rates);
|
||||
}
|
||||
void ArduIMU_periodicGPS( void ) {}
|
||||
void ArduIMU_event( void ) {}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user