[rotwing] V3B Delivery (#3449)
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled

* rebase with master

* undo double define during rebase

* revert eff sched changes
This commit is contained in:
NoahWe
2025-08-15 16:00:32 +02:00
committed by GitHub
parent c86ab15f0c
commit e42a7ef901
24 changed files with 650 additions and 95 deletions
+1 -3
View File
@@ -158,9 +158,7 @@
<module name="sys_id_auto_doublets"/>
<module name="ground_detect"/>
<module name="rotwing_state"/>
<module name="preflight_checks">
<define name="SDLOG_PREFLIGHT_ERROR" value="TRUE"/>
</module>
<module name="preflight_checks"/>
<module name="agl_dist"/>
<module name="approach_moving_target"/>
+1 -3
View File
@@ -158,9 +158,7 @@
<module name="sys_id_auto_doublets"/>
<module name="ground_detect"/>
<module name="rotwing_state"/>
<module name="preflight_checks">
<define name="SDLOG_PREFLIGHT_ERROR" value="TRUE"/>
</module>
<module name="preflight_checks"/>
<module name="agl_dist"/>
<module name="approach_moving_target"/>
@@ -2,7 +2,7 @@
<airframe>
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<section name="CTRL_EFF_SCHED" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0.3953"/>
<define name="IYY_BODY" value="8.472"/>
<define name="IZZ" value="10.18"/>
@@ -58,6 +58,9 @@
<!-- Air data -->
<define name="AIR_DATA_CALC_AMSL_BARO" value="TRUE"/>
<!-- SD logger -->
<define name="SDLOG_PREFLIGHT_ERROR" value="TRUE"/>
</section>
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
@@ -1,7 +1,6 @@
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
<airframe>
<section name="AP_FAILSAFE">
<!-- <define name="NO_GPS_LOST_WITH_DATALINK_TIME" value="20"/> -->
<define name="NO_GPS_LOST_WITH_RC_VALID" value="FALSE"/>
@@ -56,7 +55,8 @@
<!-- Ground detect -->
<define name="USE_GROUND_DETECT_INDI_THRUST" value="TRUE"/>
<define name="USE_GROUND_DETECT_AGL_DIST" value="TRUE"/>
<define name="GROUND_DETECT_SENSOR_AGL_MIN_VALUE" value="0.24"/>
<define name="GROUND_DETECT_SPECIFIC_THRUST_THRESHOLD" value="-12.0"/>
<define name="GROUND_DETECT_SENSOR_AGL_MIN_VALUE" value="0.24"/>
<!-- Flight plan defines -->
<define name="FLARE_HEIGHT" value="12"/>
@@ -72,7 +72,7 @@
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
<!-- Limits -->
<define name="SP_MAX_PHI" value="45." unit="deg" />
<define name="SP_MAX_PHI" value="45." unit="deg"/>
<define name="SP_MAX_THETA" value="45." unit="deg"/>
<define name="SP_MAX_R" value="90." unit="deg/s"/>
<define name="DEADBAND_R" value="200"/>
@@ -116,13 +116,13 @@
<!-- G1 and G2 7 kg-->
<define name="G1_ROLL" value="{ 0.0, -15.0, 0.0, 15.0, 0.0, 0.0, 0.0, 0.0, 0.0}"/>
<define name="G1_PITCH" value="{ 1.5, 0.0, -1.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}"/>
<define name="G1_YAW" value="{- 0.3, 0.3, -0.3, 0.3, 0.0, 0.0, 0.0, 0.0, 0.0}"/>
<define name="G1_YAW" value="{ -0.3, 0.3, -0.3, 0.3, 0.0, 0.0, 0.0, 0.0, 0.0}"/>
<define name="G1_THRUST" value="{-0.575, -0.575, -0.575, -0.575, 0.0, 0.0, 0.0, 0.0, 0.0}"/>
<define name="G1_THRUST_X" value="{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.55}"/>
<define name="G2" value="{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}"/>
<!-- Actuator dynamics -->
<define name="ACT_FREQ" value="{20.0, 20.0, 20.0, 20.0, 52.7, 52.7, 52.7, 52.7, 30.0}"/>
<define name="ACT_FREQ" value="{22.0, 22.0, 22.0, 22.0, 52.7, 52.7, 52.7, 52.7, 30.0}"/>
<define name="ACT_IS_SERVO" value="{ 0, 0, 0, 0, 1, 1, 1, 1, 0}"/>
<define name="ACT_IS_THRUSTER_X" value="{ 0, 0, 0, 0, 0, 0, 0, 0, 1}"/>
@@ -162,7 +162,7 @@
<define name="HOVER_KP" value="310"/>
<define name="HOVER_KD" value="130"/>
<define name="HOVER_KI" value="10"/>
<define name="NOMINAL_HOVER_THROTTLE" value="0.42"/>
<define name="NOMINAL_HOVER_THROTTLE" value="0.60"/> <!-- 0.6 (~5800 PPRZ) for V3D+ drones -->
<define name="ADAPT_THROTTLE_ENABLED" value="FALSE"/>
<!-- Reference -->
@@ -192,7 +192,7 @@
<define name="QUAD_MAX_DECELERATION" value="0.75"/> <!-- Maximum horizontal deceleration in quad mode -->
<define name="SKEW_UP_AIRSPEED" value="10.0"/> <!-- Airspeed where the skewing starts when going up in airspeed -->
<define name="SKEW_DOWN_AIRSPEED" value="8.0"/> <!-- Airspeed where the skewing starts when going down in airspeed -->
<define name="STATE_MIN_FW_DIST" value="150"/> <!-- Minimum distance to switch to fixed wing mode -->
<define name="STATE_MIN_FW_DIST" value="100"/> <!-- Switch to quad once the drone is within this radius of Standby -->
<define name="SKEW_REF_MODEL" value="TRUE"/> <!-- Enable second order reference model for the skewing command -->
<define name="SKEW_REF_MODEL_P_GAIN" value="0.001"/> <!-- Skewing reference model proportional gain -->
+13 -14
View File
@@ -106,7 +106,6 @@
<module name="imu" type="cube"/>
<module name="ins" type="ekf2"/>
<module name="parachute"/>
<module name="ekf_aw"/>
<!-- Actuators on dual CAN bus -->
@@ -159,7 +158,7 @@
<servo no="1" name="MOTOR_RIGHT" min="0" neutral="1000" max="7372"/>
<servo no="2" name="MOTOR_BACK" min="0" neutral="1000" max="7372"/>
<servo no="3" name="MOTOR_LEFT" min="0" neutral="1000" max="7372"/>
<servo no="4" name="MOTOR_PUSH" min="0" neutral="0" max="7372"/>
<servo no="4" name="MOTOR_PUSH" min="0" neutral="1000" max="7372"/>
<servo no="5" name="SERVO_ELEVATOR" min="5000" neutral="5000" max="-5500"/>
<servo no="6" name="SERVO_RUDDER" min="-8191" neutral="0" max="8191"/>
</servos>
@@ -262,7 +261,7 @@
<define name="PFC_ACTUATORS" type="array">
<!-- Aerodynamic -->
<field type="struct">
<field name="feedback_id" value="SERVO_SERVO_ELEVATOR_IDX"/>
<field name="feedback_id" value="255"/>
<field name="feedback_id2" value="255"/>
<field name="low" value="-4500"/>
<field name="high" value="4500"/>
@@ -271,7 +270,7 @@
<field name="timeout" value="1"/>
</field>
<field type="struct">
<field name="feedback_id" value="SERVO_SERVO_RUDDER_IDX"/>
<field name="feedback_id" value="255"/>
<field name="feedback_id2" value="255"/>
<field name="low" value="-4500"/>
<field name="high" value="4500"/>
@@ -280,7 +279,7 @@
<field name="timeout" value="1"/>
</field>
<field type="struct">
<field name="feedback_id" value="SERVO_AIL_LEFT_IDX"/>
<field name="feedback_id" value="255"/>
<field name="feedback_id2" value="255"/>
<field name="low" value="-4500"/>
<field name="high" value="4500"/>
@@ -289,7 +288,7 @@
<field name="timeout" value="1"/>
</field>
<field type="struct">
<field name="feedback_id" value="SERVO_FLAP_LEFT_IDX"/>
<field name="feedback_id" value="255"/>
<field name="feedback_id2" value="255"/>
<field name="low" value="-4500"/>
<field name="high" value="4500"/>
@@ -298,7 +297,7 @@
<field name="timeout" value="1"/>
</field>
<field type="struct">
<field name="feedback_id" value="SERVO_FLAP_RIGHT_IDX"/>
<field name="feedback_id" value="255"/>
<field name="feedback_id2" value="255"/>
<field name="low" value="-4500"/>
<field name="high" value="4500"/>
@@ -307,7 +306,7 @@
<field name="timeout" value="1"/>
</field>
<field type="struct">
<field name="feedback_id" value="SERVO_AIL_RIGHT_IDX"/>
<field name="feedback_id" value="255"/>
<field name="feedback_id2" value="255"/>
<field name="low" value="-4500"/>
<field name="high" value="4500"/>
@@ -318,7 +317,7 @@
<!-- Rotation -->
<field type="struct">
<field name="feedback_id" value="SERVO_ROTATION_MECH_IDX"/>
<field name="feedback_id" value="255"/>
<field name="feedback_id2" value="255"/>
<field name="low" value="-9600"/>
<field name="high" value="9600"/>
@@ -370,7 +369,7 @@
<field name="low" value="-9600"/>
<field name="high" value="2000"/>
<field name="low_feedback" value="0"/>
<field name="high_feedback" value="2800"/>
<field name="high_feedback" value="2500"/>
<field name="timeout" value="3"/>
</field>
</define>
@@ -395,7 +394,8 @@
<item name="basic law">Location, airspace and weather</item>
<item name="RC Battery">Check the RC battery</item>
<item name="tail connection">Check tail connection</item>
<item name="wing tape">Check wings taped and secured</item>
<item name="wing assembly">Check all four wing bolts present and tightened</item>
<item name="wing connection">Check wing power and CAN lines connected</item>
<item name="inspection">Inspect airframe condition</item>
<item name="attitude">Check attitude and heading</item>
<item name="airspeed">Airspeed sensor calibration</item>
@@ -403,15 +403,14 @@
<item name="actuators">Automated actuator check</item>
<item name="flight plan">Check flight plan</item>
<item name="flight block">Switch to correct flight block</item>
<item name="drone tag">Switch on drone tag</item>
<item name="camera">Switch on camera</item>
<item name="announce">Announce flight to other airspace users</item>
</checklist>
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
+2 -2
View File
@@ -457,8 +457,8 @@
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
+2 -2
View File
@@ -419,8 +419,8 @@
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
+2 -2
View File
@@ -403,8 +403,8 @@
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
+2 -2
View File
@@ -416,8 +416,8 @@
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
+3 -3
View File
@@ -71,7 +71,7 @@
</module>
<module name="airspeed" type="ms45xx_i2c">
<configure name="MS45XX_I2C_DEV" value="i2c2"/>
<define name="MS45XX_PRESSURE_SCALE" value="1.90"/>
<define name="MS45XX_PRESSURE_SCALE" value="1.6580"/>
<define name="USE_AIRSPEED_LOWPASS_FILTER" value="TRUE"/>
<define name="MS45XX_LOWPASS_TAU" value="0.25"/>
<define name="AIRSPEED_MS45XX_SEND_ABI" value="1"/>
@@ -403,8 +403,8 @@
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
+2 -2
View File
@@ -452,8 +452,8 @@
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
+2 -2
View File
@@ -455,8 +455,8 @@
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
+2 -2
View File
@@ -430,8 +430,8 @@
<section name="BAT">
<define name="CATASTROPHIC_BAT_LEVEL" value="18.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="18.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="19.2" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="21.3" unit="V"/>
<define name="LOW_BAT_LEVEL" value="22.08" unit="V"/>
<define name="MAX_BAT_LEVEL" value="25.2" unit="V"/>
<define name="TAKEOFF_BAT_LEVEL" value="24.2" unit="V"/>
<define name="BAT_NB_CELLS" value="6"/>
File diff suppressed because it is too large Load Diff
+33 -32
View File
@@ -133,31 +133,32 @@
<call_once fun="nav_set_heading_current()"/>
<stay climb="nav.climb_vspeed" vmode="climb" wp="CLIMB"/>
</block>
<block name="Standby" strip_button="Standby" strip_icon="home.png" pre_call="rotwing_state_choose_state_by_dist(WP_STDBY)">
<stay wp="STDBY"/>
<block name="Standby" strip_button="Standby" strip_icon="home.png">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="STDBY"/>
</block>
<block name="Standby_dist" strip_button="Standby Dist" strip_icon="home.png" pre_call="rotwing_state_choose_state_by_dist(WP_STDBY)">
<stay wp="STDBY"/>
<stay wp="STDBY"/>
</block>
<block name="Standby_free" strip_button="Standby Free" strip_icon="home.png">
<call_once fun="rotwing_state_set(ROTWING_STATE_FREE)"/>
<stay wp="STDBY"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_FREE)"/>
<stay wp="STDBY"/>
</block>
<block name="stay_p1" strip_button="Stay P1" strip_icon="wp_quad.png">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="p1"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="p1"/>
</block>
<block name="stay_p2" strip_button="Stay P2" strip_icon="wp_quad.png">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="p2"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="p2"/>
</block>
<block name="stay_p3" strip_button="Stay P3" strip_icon="wp_quad.png">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="p3"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="p3"/>
</block>
<block name="stay_p4" strip_button="Stay P4" strip_icon="wp_quad.png">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="p4"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<stay wp="p4"/>
</block>
<!-- <block name="Approach APP">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
@@ -209,35 +210,35 @@
<stay alt="WaypointAlt(WP_APP)" pre_call="approach_moving_target_enable(WP_APP)" wp="APP"/>
</block> -->
<block name="land here">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<call_once fun="NavSetWaypointHere(WP_TD)"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<call_once fun="NavSetWaypointHere(WP_TD)"/>
</block>
<block name="land" strip_button="Land" strip_icon="land-right.png">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<go wp="TD"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<go wp="TD"/>
</block>
<block name="descend" strip_button="Descend" strip_icon="descend.png">
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<exception cond="GetPosHeight() @LT flare_height" deroute="flare"/>
<stay climb="-1.0" vmode="climb" wp="TD"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_REQUEST_HOVER)"/>
<exception cond="GetPosHeight() @LT flare_height" deroute="flare"/>
<stay climb="-1.0" vmode="climb" wp="TD"/>
</block>
<block name="flare">
<call_once fun="rotwing_state_set(ROTWING_STATE_FORCE_HOVER)"/>
<stay climb="-0.5" vmode="climb" wp="TD"/>
<!--<exception cond="!(GetPosHeight() @LT 2.0)" deroute="flare_low"/>-->
<exception cond="agl_dist_valid @AND (agl_dist_value @LT 0.28)" deroute="flare_low"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_FORCE_HOVER)"/>
<stay climb="-0.5" vmode="climb" wp="TD"/>
<!--<exception cond="!(GetPosHeight() @LT 2.0)" deroute="flare_low"/>-->
<exception cond="agl_dist_valid @AND (agl_dist_value @LT 0.28)" deroute="flare_low"/>
</block>
<block name="flare_low">
<call_once fun="rotwing_state_set(ROTWING_STATE_FORCE_HOVER)"/>
<!-- <exception cond="NavDetectGround()" deroute="Holding point"/> -->
<exception cond="!nav_is_in_flight()" deroute="Holding point"/>
<exception cond="ground_detect()" deroute="Holding point"/>
<!-- <call_once fun="NavStartDetectGround()"/> -->
<stay climb="-0.5" vmode="climb" wp="TD"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_FORCE_HOVER)"/>
<!-- <exception cond="NavDetectGround()" deroute="Holding point"/> -->
<exception cond="!nav_is_in_flight()" deroute="Holding point"/>
<exception cond="ground_detect()" deroute="Holding point"/>
<!-- <call_once fun="NavStartDetectGround()"/> -->
<stay climb="-0.5" vmode="climb" wp="TD"/>
</block>
<block name="landed">
<call_once fun="rotwing_state_set(ROTWING_STATE_FORCE_HOVER)"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
<call_once fun="rotwing_state_set(ROTWING_STATE_FORCE_HOVER)"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
</block>
</blocks>
</flight_plan>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,43 @@
<!--
FrSky Tarranis X9D plus over USB (mode 2)
http://www.frsky-rc.com/product/pro.php?pro_id=137
In this file we will use it as a 6CH joystick to control a UAS.
- The left stick vertical axis will be used for throttle
- The right stick horizontal axis will be used for roll
- The right stick vertical axis will be used for pitch
- The left stick horizontal axis will be used for yaw
- The VRA axis will be used for mode switching (right top switch)
- The arm axis will be used for arming (left top switch)
- The pusher can be controlled using the slider on the right
If you want to fly your UAS via the joystick add this to your session:
/home/username/paparazzi/sw/ground_segment/joystick/input2ivy -d 0 -ac yourarfamename tudelft/Rotwing_Taranis_X9D_plus.xml
Where -d 0 must be -d 1 if you have a laptop with accelometer installed
The basis of steering is the standard signs of aerospace convention
-->
<joystick>
<input>
<axis index="3" name="LeftStickHorizontal"/>
<axis index="0" name="LeftStickVertical"/>
<axis index="1" name="RightStickHorizontal"/>
<axis index="2" name="RightStickVertical"/>
<axis index="4" name="VRA"/>
<axis index="5" name="arm"/>
<axis index="6" name="yellow"/>
<button index="0" name="thrust_x"/> <!-- pusher doesn't work well due to it being treated as a button, only zero or full throttle work -->
<button index="1" name="filler"/> <!-- necessary to fill the channels array such that pusher can be in the righ -->
</input>
<!-- Follow the order of rc_datalink.h -->
<messages period="0.0333333">
<message class="datalink" name="RC_UP" send_always="true">
<field name="channels" value="RightStickHorizontal;RightStickVertical;LeftStickHorizontal;Fit(LeftStickVertical,-127,127,0,127);VRA;arm;yellow;filler;Fit(thrust_x,0,1,-127,127)"/>
</message>
</messages>
</joystick>
+2 -1
View File
@@ -24,6 +24,7 @@
<file name="pprz_trig_int.h" dir="math"/>
<file name="pprz_orientation_conversion.h" dir="math"/>
<file name="pprz_stat.h"/>
<file name="pprz_random.h" dir="math"/>
</header>
<init fun="pprz_trig_int_init()"/>
<makefile>
@@ -36,7 +37,7 @@
<file name="pprz_trig_int.c" dir="math"/>
<file name="pprz_orientation_conversion.c" dir="math"/>
<file name="pprz_stat.c" dir="math"/>
<file name="pprz_random.c" dir="math"/>
<test/>
</makefile>
</module>
+1
View File
@@ -12,6 +12,7 @@
<dl_setting var="rotwing_state.nav_state" min="0" max="4" step="1" values="FORCE_HOVER|REQ_HOVER|FORCE_FW|REQ_FW|FREE" shortname="nav_state"/>
<dl_setting var="rotwing_state.fw_min_airspeed" min="0" max="50" step="0.1" shortname="fw_min_airspeed"/>
<dl_setting var="rotwing_state.cruise_airspeed" min="0" max="50" step="0.1" shortname="cruise_airspeed"/>
<dl_setting var="nav.radius" min="50" step="1" max="1000" unit="m" shortname="circle_radius"></dl_setting>
<dl_setting var="rotwing_state.force_skew" min="0" max="1" step="1" values="FALSE|TRUE" shortname="force_skew"/>
<dl_setting var="rotwing_state.sp_skew_angle_deg" min="0" max="90" step="1" shortname="sp_skew_angle"/>
<dl_setting var="rotwing_state.fail_skew_angle" min="0" max="1" step="1" values="OFF|ON" shortname="fail_skew"/>
+14 -14
View File
@@ -121,47 +121,47 @@
<!--First order filter represents actuator dynamics-->
<lag_filter name="front_motor_lag">
<input> fcs/front_motor </input>
<c1> 18 </c1>
<c1> 22.0 </c1>
<output> fcs/front_motor_lag</output>
</lag_filter>
<lag_filter name="right_motor_lag">
<input> fcs/right_motor </input>
<c1> 18 </c1>
<c1> 22.0 </c1>
<output> fcs/right_motor_lag</output>
</lag_filter>
<lag_filter name="back_motor_lag">
<input> fcs/back_motor </input>
<c1> 18 </c1>
<c1> 22.0 </c1>
<output> fcs/back_motor_lag</output>
</lag_filter>
<lag_filter name="left_motor_lag">
<input> fcs/left_motor </input>
<c1> 18 </c1>
<c1> 22.0 </c1>
<output> fcs/left_motor_lag</output>
</lag_filter>
<lag_filter name="pusher_lag">
<input> fcs/pusher </input>
<c1> 18 </c1>
<c1> 30.0 </c1>
<output> fcs/pusher_lag</output>
</lag_filter>
<lag_filter name="elevator_lag">
<input> fcs/elevator </input>
<c1> 54 </c1>
<c1> 50.0 </c1>
<output> fcs/elevator_lag</output>
</lag_filter>
<lag_filter name="rudder_lag">
<input> fcs/rudder </input>
<c1> 54 </c1>
<c1> 50.0 </c1>
<output> fcs/rudder_lag</output>
</lag_filter>
<lag_filter name="aileron_lag">
<input> fcs/aileron </input>
<c1> 54 </c1>
<c1> 50.0 </c1>
<output> fcs/aileron_lag</output>
</lag_filter>
<lag_filter name="flap_lag">
<input> fcs/flap </input>
<c1> 54 </c1>
<c1> 50.0 </c1>
<output> fcs/flap_lag</output>
</lag_filter>
@@ -321,7 +321,7 @@
<function>
<product>
<property>fcs/front_motor_lag</property>
<value>7.643508703</value>
<value>6.36958</value>
</product>
</function>
<location unit="IN">
@@ -340,7 +340,7 @@
<function>
<product>
<property>fcs/right_motor_lag</property>
<value>7.643508703</value>
<value>6.36958</value>
</product>
</function>
<location unit="IN">
@@ -359,7 +359,7 @@
<function>
<product>
<property>fcs/back_motor_lag</property>
<value>7.643508703</value>
<value>6.36958</value>
</product>
</function>
<location unit="IN">
@@ -378,7 +378,7 @@
<function>
<product>
<property>fcs/left_motor_lag</property>
<value>7.643508703</value>
<value>6.36958</value>
</product>
</function>
<location unit="IN">
@@ -825,7 +825,7 @@
<product>
<property>aero/qbar-psf</property>
<value>47.9</value> <!-- Conversion to pascals -->
<value>0.0453</value> <!-- CD x Area (m^2) -->
<value>0.108</value> <!-- CD x Area (m^2) -->
<value>0.224808943</value> <!-- N to LBS -->
</product>
</function>
+1 -1
View File
@@ -544,7 +544,7 @@
airframe="airframes/tudelft/rotwing_v3b.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotwing_EHVB.xml"
flight_plan="flight_plans/tudelft/rotwing_generic.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/approach_moving_target.xml modules/eff_scheduling_rotwing.xml modules/ekf_aw.xml modules/electrical.xml modules/follow_me.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_indi_hybrid.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/imu_heater.xml modules/ins_ekf2.xml modules/lidar_tfmini.xml modules/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/parachute.xml modules/pfc_actuators.xml modules/preflight_checks.xml modules/rotwing_state.xml modules/stabilization_indi.xml modules/sys_id_auto_doublets.xml modules/sys_id_doublet.xml modules/target_pos.xml"
gui_color="red"
+5 -1
View File
@@ -40,6 +40,10 @@
#endif
#endif
#ifndef GROUND_DETECT_SPECIFIC_THRUST_THRESHOLD
#define GROUND_DETECT_SPECIFIC_THRUST_THRESHOLD -5.0
#endif
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
@@ -103,7 +107,7 @@ void ground_detect_periodic()
// Detect ground based on AND of all triggers
if ((fabsf(vspeed_ned) < 5.0)
&& (spec_thrust_down > -5.0)
&& (spec_thrust_down > GROUND_DETECT_SPECIFIC_THRUST_THRESHOLD)
&& (fabsf(accel_filter.o[0]) < 2.0)
#if USE_GROUND_DETECT_AGL_DIST
&& (agl_dist_valid && (agl_dist_value_filtered < GROUND_DETECT_AGL_MIN_VALUE))
+5
View File
@@ -33,11 +33,16 @@ struct Waypoint waypoints[NB_WAYPOINT];
#if PERIODIC_TELEMETRY
#include "modules/datalink/telemetry.h"
#include "math/pprz_random.h"
static void send_wp_moved(struct transport_tx *trans, struct link_device *dev)
{
static uint8_t i;
i++;
// Randomness added for multiple transport devices
if (rand_uniform() > 0.02) { i++; }
if (i >= nb_waypoint) { i = 0; }
pprz_msg_send_WP_MOVED_ENU(trans, dev, AC_ID,
&i,
@@ -25,7 +25,6 @@ import math
import datetime
import numpy as np
import pyttsx3
import re
engine = pyttsx3.init()
PPRZ_HOME = os.getenv("PAPARAZZI_HOME", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)),