[rotwing] Rename to make name consistent (#3366)

* Make naming consistent rotwing

* Fixes

* more files

* fix conf

* revert

* update

* double id's

* Missed a file

* missing renames

---------

Co-authored-by: Freek van Tienen <freek.v.tienen@gmail.com>
This commit is contained in:
Christophe De Wagter
2024-09-27 16:43:02 +02:00
committed by GitHub
parent c5b9678d77
commit 7da8daf6e2
48 changed files with 1014 additions and 417 deletions
@@ -124,7 +124,7 @@
<module name="stabilization" type="rate_indi"/>
<module name="eff_scheduling_rot_wing"/>
<module name="eff_scheduling_rotwing"/>
<module name="guidance" type="indi_hybrid_quadplane"/>
<module name="nav" type="hybrid">
@@ -134,7 +134,7 @@
<!-- Other -->
<module name="sys_id_doublet"/>
<module name="sys_id_auto_doublets"/>
<module name="rot_wing_automation"/>
<module name="rotwing_automation"/>
<module name="ground_detect_sensor"/>
<module name="rotwing_state"/>
<module name="preflight_checks">
@@ -255,7 +255,7 @@
<define name="CHIRP_RADIO_CHANNEL" value="9"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0.3953"/>
<define name="IYY_BODY" value="8.472"/>
<define name="IZZ" value="10.18"/>
File diff suppressed because it is too large Load Diff
@@ -125,7 +125,7 @@
<define name="WLS_N_V_MAX" value="5"/>
</module>
<module name="eff_scheduling_rot_wing"/>
<module name="eff_scheduling_rotwing"/>
<module name="guidance" type="indi_hybrid_quadplane"/>
<module name="nav" type="hybrid">
@@ -135,7 +135,7 @@
<!-- Other -->
<module name="sys_id_doublet"/>
<module name="sys_id_auto_doublets"/>
<module name="rot_wing_automation"/>
<module name="rotwing_automation"/>
<module name="ground_detect_sensor"/>
<module name="rotwing_state"/>
<module name="preflight_checks"/>
@@ -146,7 +146,7 @@
<!--Airspeed estimation using EKF-->
<module name="ekf_aw">
<define name="EKF_AW_WRAPPER_ROT_WING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_WRAPPER_ROTWING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_P0_V_BODY" value="1.E-2f" description="Initial covariance body velocity"/>
<define name="EKF_AW_P0_MU" value="1.E-5f" description="Initial covariance wind"/>
@@ -296,7 +296,7 @@
<define name="CHIRP_RADIO_CHANNEL" value="9"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="-0.13362537"/>
<define name="IYY_BODY" value="0.77187463"/>
<define name="IZZ" value="1.18"/>
@@ -128,7 +128,7 @@
<configure name="ANDI_OUTPUTS" value="6"/>
</module>
<module name="eff_scheduling_rot_wing_V2"/>
<module name="eff_scheduling_rotwing_V2"/>
<module name="wls">
<define name="WLS_N_U_MAX" value = "11"/>
@@ -138,7 +138,7 @@
<module name="ground_detect_sensor"/>
<module name="rotwing_state_V2"/>
<module name="agl_dist"/>
<module name="rot_wing_automation">
<module name="rotwing_automation">
<define name="RW_USE_MODULES_V2" value="TRUE"/>
</module>
</firmware>
@@ -296,7 +296,7 @@
<define name = "WV" value = "{ 4.0f, 4.0f, 4.0f, 8.0f, 8.0f, 1.00f}"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<!-- | MF | MR | MB | ML | MP | ELE | RUD | AIL | FLA | PHI | THETA | -->
<!-- <define name = "dFdu" value = "{-0.50f, -0.50f, -0.50f, -0.50f, 0.55f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f }"/>
<define name = "dMzdu" value = "{-0.40f, 0.40f, -0.40f, 0.40f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f }"/>
@@ -129,7 +129,7 @@
<configure name="ANDI_OUTPUTS" value="6"/>
</module>
<module name="eff_scheduling_rot_wing_V2"/>
<module name="eff_scheduling_rotwing_V2"/>
<module name="wls">
<define name="WLS_N_U_MAX" value = "11"/>
@@ -139,7 +139,7 @@
<module name="ground_detect_sensor"/>
<module name="rotwing_state_V2"/>
<module name="agl_dist"/>
<module name="rot_wing_automation">
<module name="rotwing_automation">
<define name="RW_USE_MODULES_V2" value="TRUE"/>
</module>
</firmware>
@@ -298,7 +298,7 @@
<define name = "WV" value = "{ 4.0f, 4.0f, 4.0f, 8.0f, 8.0f, 1.00f}"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<!-- | MF | MR | MB | ML | MP | ELE | RUD | AIL | FLA | PHI | THETA | -->
<!-- <define name = "dFdu" value = "{-0.50f, -0.50f, -0.50f, -0.50f, 0.55f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f }"/>
<define name = "dMzdu" value = "{-0.40f, 0.40f, -0.40f, 0.40f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f }"/>
@@ -121,7 +121,7 @@
<configure name="ANDI_OUTPUTS" value="6"/>
</module>
<module name="eff_scheduling_rot_wing_V2"/>
<module name="eff_scheduling_rotwing_V2"/>
<module name="wls">
<define name="WLS_N_U_MAX" value = "11"/>
@@ -131,7 +131,7 @@
<module name="ground_detect_sensor"/>
<module name="rotwing_state_V2"/>
<module name="agl_dist"/>
<module name="rot_wing_automation">
<module name="rotwing_automation">
<define name="RW_USE_MODULES_V2" value="TRUE"/>
</module>
</firmware>
@@ -284,7 +284,7 @@
<define name = "WV" value = "{ 4.0f, 4.0f, 4.0f, 8.0f, 8.0f, 1.00f}"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<!-- | MF | MR | MB | ML | MP | ELE | RUD | AIL | FLA | PHI | THETA | -->
<!-- <define name = "dFdu" value = "{-0.50f, -0.50f, -0.50f, -0.50f, 0.55f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f }"/>
<define name = "dMzdu" value = "{-0.40f, 0.40f, -0.40f, 0.40f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f }"/>
@@ -89,7 +89,7 @@
<configure name="ANDI_OUTPUTS" value="6"/>
</module>
<module name="eff_scheduling_rot_wing_V2"/>
<module name="eff_scheduling_rotwing_V2"/>
<module name="wls">
<define name="WLS_N_U_MAX" value = "11"/>
@@ -102,7 +102,7 @@
<define name = "ROTMECH_DYN" value = "3.0"/>
</module>
<module name="agl_dist"/>
<module name="rot_wing_automation">
<module name="rotwing_automation">
<define name="RW_USE_MODULES_V2" value="TRUE"/>
</module>
</firmware>
@@ -252,7 +252,7 @@
<define name = "WV" value = "{ 4.0f, 4.0f, 4.0f, 8.0f, 8.0f, 1.00f}"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<!-- | MF | MR | MB | ML | MP | ELE | RUD | AIL | FLA | PHI | THETA | -->
<!-- <define name = "dFdu" value = "{-0.50f, -0.50f, -0.50f, -0.50f, 0.55f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f }"/>
<define name = "dMzdu" value = "{-0.40f, 0.40f, -0.40f, 0.40f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f, 0.00f }"/>
@@ -112,7 +112,7 @@
<define name="WLS_N_V_MAX" value="5"/>
</module>
<module name="eff_scheduling_rot_wing"/>
<module name="eff_scheduling_rotwing"/>
<module name="guidance" type="indi_hybrid_quadplane"/>
<module name="nav" type="hybrid">
@@ -122,7 +122,7 @@
<!-- Other -->
<module name="sys_id_doublet"/>
<module name="sys_id_auto_doublets"/>
<module name="rot_wing_automation"/>
<module name="rotwing_automation"/>
<module name="ground_detect_sensor"/>
<module name="rotwing_state"/>
<module name="preflight_checks"/>
@@ -133,7 +133,7 @@
<!--Airspeed estimation using EKF-->
<module name="ekf_aw">
<define name="EKF_AW_WRAPPER_ROT_WING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_WRAPPER_ROTWING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_P0_V_BODY" value="1.E-2f" description="Initial covariance body velocity"/>
<define name="EKF_AW_P0_MU" value="1.E-5f" description="Initial covariance wind"/>
@@ -284,7 +284,7 @@
<define name="CHIRP_RADIO_CHANNEL" value="9"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0.04780"/>
<define name="IYY_BODY" value="0.7546"/>
<define name="IZZ" value="0.9752"/>
@@ -112,7 +112,7 @@
<define name="WLS_N_V_MAX" value="5"/>
</module>
<module name="eff_scheduling_rot_wing"/>
<module name="eff_scheduling_rotwing"/>
<module name="guidance" type="indi_hybrid_quadplane"/>
<module name="nav" type="hybrid">
@@ -122,7 +122,7 @@
<!-- Other -->
<module name="sys_id_doublet"/>
<module name="sys_id_auto_doublets"/>
<module name="rot_wing_automation"/>
<module name="rotwing_automation"/>
<module name="ground_detect_sensor"/>
<module name="rotwing_state"/>
<module name="preflight_checks"/>
@@ -133,7 +133,7 @@
<!--Airspeed estimation using EKF-->
<module name="ekf_aw">
<define name="EKF_AW_WRAPPER_ROT_WING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_WRAPPER_ROTWING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_P0_V_BODY" value="1.E-2f" description="Initial covariance body velocity"/>
<define name="EKF_AW_P0_MU" value="1.E-5f" description="Initial covariance wind"/>
@@ -284,7 +284,7 @@
<define name="CHIRP_RADIO_CHANNEL" value="9"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0.04780"/>
<define name="IYY_BODY" value="0.7546"/>
<define name="IZZ" value="0.9752"/>
@@ -112,7 +112,7 @@
<define name="WLS_N_V_MAX" value="5"/>
</module>
<module name="eff_scheduling_rot_wing"/>
<module name="eff_scheduling_rotwing"/>
<module name="guidance" type="indi_hybrid_quadplane"/>
<module name="nav" type="hybrid">
@@ -122,7 +122,7 @@
<!-- Other -->
<module name="sys_id_doublet"/>
<module name="sys_id_auto_doublets"/>
<module name="rot_wing_automation"/>
<module name="rotwing_automation"/>
<module name="ground_detect_sensor"/>
<module name="rotwing_state"/>
<module name="preflight_checks"/>
@@ -133,7 +133,7 @@
<!--Airspeed estimation using EKF-->
<module name="ekf_aw">
<define name="EKF_AW_WRAPPER_ROT_WING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_WRAPPER_ROTWING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_P0_V_BODY" value="1.E-2f" description="Initial covariance body velocity"/>
<define name="EKF_AW_P0_MU" value="1.E-5f" description="Initial covariance wind"/>
@@ -284,7 +284,7 @@
<define name="CHIRP_RADIO_CHANNEL" value="9"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0.04780"/>
<define name="IYY_BODY" value="0.7546"/>
<define name="IZZ" value="0.9752"/>
@@ -117,7 +117,7 @@
<define name="WLS_N_V_MAX" value="5"/>
</module>
<module name="eff_scheduling_rot_wing"/>
<module name="eff_scheduling_rotwing"/>
<module name="guidance" type="indi_hybrid_quadplane"/>
<module name="nav" type="hybrid">
@@ -127,7 +127,7 @@
<!-- Other -->
<module name="sys_id_doublet"/>
<module name="sys_id_auto_doublets"/>
<module name="rot_wing_automation"/>
<module name="rotwing_automation"/>
<module name="ground_detect_sensor"/>
<module name="rotwing_state"/>
<module name="preflight_checks"/>
@@ -138,7 +138,7 @@
<!--Airspeed estimation using EKF-->
<module name="ekf_aw">
<define name="EKF_AW_WRAPPER_ROT_WING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_WRAPPER_ROTWING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_P0_V_BODY" value="1.E-2f" description="Initial covariance body velocity"/>
<define name="EKF_AW_P0_MU" value="1.E-5f" description="Initial covariance wind"/>
@@ -289,7 +289,7 @@
<define name="CHIRP_RADIO_CHANNEL" value="9"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0.04780"/>
<define name="IYY_BODY" value="0.7546"/>
<define name="IZZ" value="0.9752"/>
@@ -117,7 +117,7 @@
<define name="WLS_N_V_MAX" value="5"/>
</module>
<module name="eff_scheduling_rot_wing"/>
<module name="eff_scheduling_rotwing"/>
<module name="guidance" type="indi_hybrid_quadplane"/>
<module name="nav" type="hybrid">
@@ -127,7 +127,7 @@
<!-- Other -->
<module name="sys_id_doublet"/>
<module name="sys_id_auto_doublets"/>
<module name="rot_wing_automation"/>
<module name="rotwing_automation"/>
<module name="ground_detect_sensor"/>
<module name="rotwing_state"/>
<module name="preflight_checks"/>
@@ -138,7 +138,7 @@
<!--Airspeed estimation using EKF-->
<module name="ekf_aw">
<define name="EKF_AW_WRAPPER_ROT_WING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_WRAPPER_ROTWING_TYPE_A" value="0" description="1 for A, 0 for b"/>
<define name="EKF_AW_P0_V_BODY" value="1.E-2f" description="Initial covariance body velocity"/>
<define name="EKF_AW_P0_MU" value="1.E-5f" description="Initial covariance wind"/>
@@ -289,7 +289,7 @@
<define name="CHIRP_RADIO_CHANNEL" value="9"/>
</section>
<section name="CTRL_EFF_SHED" prefix="ROT_WING_EFF_SCHED_">
<section name="CTRL_EFF_SHED" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0.04780"/>
<define name="IYY_BODY" value="0.7546"/>
<define name="IZZ" value="0.9752"/>
+1 -1
View File
@@ -15,7 +15,7 @@
<include name="modules/radio_control/radio_control.h"/>
<include name="modules/gps/gps.h"/>
<include name="modules/actuators/actuators.h"/>
<include name="modules/rot_wing_drone/rotwing_state_V2.h"/>
<include name="modules/rotwing_drone/rotwing_state_V2.h"/>
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT" cond="ifndef MODE_MANUAL"/>
<define name="MODE_ONELOOP" value="AP_MODE_MODULE" cond="ifndef MODE_AUTO1"/>
<define name="MODE_AUTO2" value="AP_MODE_NAV" cond="ifndef MODE_AUTO2"/>
@@ -135,21 +135,21 @@
<block name="Standby" strip_button="Standby" strip_icon="wp_quad.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<call_once fun="rotwing_state_force_skew_off()"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Standby_fwd" strip_button="Standby_fwd" strip_icon="wp_fwd.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
<call_once fun="rotwing_state_force_skew_off()"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Descend" strip_button="Descend" strip_icon="descend.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<call_once fun="rotwing_state_force_skew_off()"/>
<stay wp="Descend" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="Descend" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<!-- <block name="stay_begin-trans">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="begin_trans" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="begin_trans" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="end_transition">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
@@ -167,27 +167,27 @@
</block>
<block name="safe" strip_button="Unsafe" strip_icon="alert.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="HOME" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="HOME" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Circle_CW_fwd" strip_button="CircleCW_Forward" strip_icon="circle_cw_fwd.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<call_once fun="rotwing_state_force_skew_off()"/>
<circle radius="100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Circle_CCW_fwd" strip_button="CircleCCW_Forward" strip_icon="circle_ccw_fwd.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<call_once fun="rotwing_state_force_skew_off()"/>
<circle radius="-100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Circle_CW_quad" strip_button="CircleCW_Quad" strip_icon="circle_cw_quad.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<call_once fun="rotwing_state_force_skew_off()"/>
<circle radius="100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Circle_CCW_quad" strip_button="CircleCCW_Quad" strip_icon="circle_ccw_quad.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<call_once fun="rotwing_state_force_skew_off()"/>
<circle radius="-100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="route_fw" strip_button="Route_fwd" strip_icon="path.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
@@ -102,7 +102,7 @@
</block>
<block name="Standby" strip_button="Standby" strip_icon="home.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Approach APP">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
@@ -121,7 +121,7 @@
</block> -->
<block name="stay_begin-trans">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="begin_trans" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="begin_trans" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="line_trans_fwd" strip_button="Transition Line" strip_icon="wp_fwd.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
@@ -161,19 +161,19 @@
</block>
<block name="Circle_CW_fwd" strip_button="CircleRight" strip_icon="circle-right.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Circle_CCW_fwd" strip_button="CircleLeft" strip_icon="circle-left.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="-100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="big_Circle_CW_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="150" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="150" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="big_Circle_CCW_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="-150" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-150" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Transition_quad" strip_button="Transition Quad" strip_icon="wp_quad.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
@@ -104,15 +104,15 @@
</block>
<block name="Standby" strip_button="Standby" strip_icon="home.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Standby_hybrid">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Standby_free">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_FREE)"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="stay_p1" strip_button="Stay P1" strip_icon="wp_quad.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
@@ -132,7 +132,7 @@
</block>
<!-- <block name="Standby_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block> -->
<!-- <block name="Approach APP">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
@@ -144,7 +144,7 @@
</block> -->
<block name="stay_begin-trans">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="begin_trans" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="begin_trans" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<!--<block name="line_trans_fwd" strip_button="Transition Line" strip_icon="wp_fwd.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
@@ -184,19 +184,19 @@
</block> -->
<block name="Circle_CW_fwd" strip_button="CircleRight" strip_icon="circle-right.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Circle_CCW_fwd" strip_button="CircleLeft" strip_icon="circle-left.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="-100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<!-- <block name="big_Circle_CW_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="150" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="150" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="big_Circle_CCW_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="-150" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-150" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block> -->
<block name="Approach APP">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
@@ -88,7 +88,7 @@
</block>
<block name="Standby" strip_button="Standby" strip_icon="home.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Approach APP">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
@@ -100,7 +100,7 @@
</block> -->
<block name="stay_begin-trans">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="begin_trans" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="begin_trans" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="line_trans_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
@@ -140,19 +140,19 @@
</block>
<block name="Circle_CW_fwd" strip_button="CircleRight" strip_icon="circle-right.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Circle_CCW_fwd" strip_button="CircleLeft" strip_icon="circle-left.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="-100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="big_Circle_CW_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="150" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="150" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="big_Circle_CCW_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="-150" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-150" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Transition_quad">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
@@ -80,7 +80,7 @@
</block>
<block name="Standby" strip_button="Standby" strip_icon="home.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="STDBY" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="STDBY" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Approach APP">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
@@ -92,7 +92,7 @@
</block> -->
<block name="stay_begin-trans">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HOVER)"/>
<stay wp="begin_trans" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<stay wp="begin_trans" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="line_trans_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
@@ -132,19 +132,19 @@
</block>
<block name="Circle_CW_fwd" strip_button="CircleRight" strip_icon="circle-right.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Circle_CCW_fwd" strip_button="CircleLeft" strip_icon="circle-left.png">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="-100" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-100" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="big_Circle_CW_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="150" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="150" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="big_Circle_CCW_fwd">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_EFFICIENT)"/>
<circle radius="-150" wp="circ" pre_call="rot_wing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
<circle radius="-150" wp="circ" pre_call="rotwing_vis_transition(WP_trans, WP_decel, WP_end_trans)"/>
</block>
<block name="Transition_quad">
<call_once fun="rotwing_request_configuration(ROTWING_CONFIGURATION_HYBRID)"/>
@@ -1,11 +1,11 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="eff_scheduling_rot_wing" dir="ctrl">
<module name="eff_scheduling_rotwing" dir="ctrl">
<doc>
<description>T
he control effectiveness scheduler for the rotating wing quadplane drone type
- it requires a servo called ROTATION_MECH
</description>
<section name="ROT_WING" prefix="ROT_WING_EFF_SCHED_">
<section name="ROTWING" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0" description=""/>
<define name="IYY_BODY" value="0" description=""/>
<define name="IZZ" value="0" description=""/>
@@ -27,12 +27,12 @@
</dl_settings>
</settings>
<header>
<file name="eff_scheduling_rot_wing.h"/>
<file name="eff_scheduling_rotwing.h"/>
</header>
<init fun="eff_scheduling_rot_wing_init()"/>
<periodic fun="eff_scheduling_rot_wing_periodic()" freq="10.0"/>
<init fun="eff_scheduling_rotwing_init()"/>
<periodic fun="eff_scheduling_rotwing_periodic()" freq="10.0"/>
<makefile>
<file name="eff_scheduling_rot_wing.c"/>
<file name="eff_scheduling_rotwing.c"/>
<test firmware="rotorcraft">
<define name="ACTUATORS_NB" value="10"/>
<define name="SERVO_ROTATION_MECH_IDX" value="8"/>
@@ -44,27 +44,27 @@
<define name="SERVO_SERVO_ELEVATOR" value="5"/>
<define name="INDI_NUM_ACT" value="4"/>
<define name="INDI_OUTPUTS" value="3"/>
<define name="ROT_WING_EFF_SCHED_IXX_BODY" value="1"/>
<define name="ROT_WING_EFF_SCHED_IYY_BODY" value="1"/>
<define name="ROT_WING_EFF_SCHED_IZZ" value="1"/>
<define name="ROT_WING_EFF_SCHED_IXX_WING" value="1"/>
<define name="ROT_WING_EFF_SCHED_IYY_WING" value="1"/>
<define name="ROT_WING_EFF_SCHED_M" value="1"/>
<define name="ROT_WING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH" value="1"/>
<define name="ROT_WING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL" value="{1,1}"/>
<define name="ROT_WING_EFF_SCHED_HOVER_ROLL_PITCH_COEF" value="{1,1}"/>
<define name="ROT_WING_EFF_SCHED_HOVER_ROLL_ROLL_COEF" value="{1,1}"/>
<define name="ROT_WING_EFF_SCHED_K_ELEVATOR" value="{1,1,1}"/>
<define name="ROT_WING_EFF_SCHED_K_RUDDER" value="{1,1,1}"/>
<define name="ROT_WING_EFF_SCHED_K_AILERON" value="1"/>
<define name="ROT_WING_EFF_SCHED_K_FLAPERON" value="1"/>
<define name="ROT_WING_EFF_SCHED_K_PUSHER" value="{1,1}"/>
<define name="ROT_WING_EFF_SCHED_K_ELEVATOR_DEFLECTION" value="{1,1}"/>
<define name="ROT_WING_EFF_SCHED_D_RUDDER_D_PPRZ" value="1"/>
<define name="ROT_WING_EFF_SCHED_K_RPM_PPRZ_PUSHER" value="{1,1,1}"/>
<define name="ROT_WING_EFF_SCHED_K_LIFT_WING" value="{1,1}"/>
<define name="ROT_WING_EFF_SCHED_K_LIFT_FUSELAGE" value="1"/>
<define name="ROT_WING_EFF_SCHED_K_LIFT_TAIL" value="1"/>
<define name="ROTWING_EFF_SCHED_IXX_BODY" value="1"/>
<define name="ROTWING_EFF_SCHED_IYY_BODY" value="1"/>
<define name="ROTWING_EFF_SCHED_IZZ" value="1"/>
<define name="ROTWING_EFF_SCHED_IXX_WING" value="1"/>
<define name="ROTWING_EFF_SCHED_IYY_WING" value="1"/>
<define name="ROTWING_EFF_SCHED_M" value="1"/>
<define name="ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH" value="1"/>
<define name="ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL" value="{1,1}"/>
<define name="ROTWING_EFF_SCHED_HOVER_ROLL_PITCH_COEF" value="{1,1}"/>
<define name="ROTWING_EFF_SCHED_HOVER_ROLL_ROLL_COEF" value="{1,1}"/>
<define name="ROTWING_EFF_SCHED_K_ELEVATOR" value="{1,1,1}"/>
<define name="ROTWING_EFF_SCHED_K_RUDDER" value="{1,1,1}"/>
<define name="ROTWING_EFF_SCHED_K_AILERON" value="1"/>
<define name="ROTWING_EFF_SCHED_K_FLAPERON" value="1"/>
<define name="ROTWING_EFF_SCHED_K_PUSHER" value="{1,1}"/>
<define name="ROTWING_EFF_SCHED_K_ELEVATOR_DEFLECTION" value="{1,1}"/>
<define name="ROTWING_EFF_SCHED_D_RUDDER_D_PPRZ" value="1"/>
<define name="ROTWING_EFF_SCHED_K_RPM_PPRZ_PUSHER" value="{1,1,1}"/>
<define name="ROTWING_EFF_SCHED_K_LIFT_WING" value="{1,1}"/>
<define name="ROTWING_EFF_SCHED_K_LIFT_FUSELAGE" value="1"/>
<define name="ROTWING_EFF_SCHED_K_LIFT_TAIL" value="1"/>
</test>
</makefile>
</module>
@@ -1,11 +1,11 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="eff_scheduling_rot_wing_V2" dir="ctrl">
<module name="eff_scheduling_rotwing_V2" dir="ctrl">
<doc>
<description>T
The control effectiveness scheduler for the rotating wing quadplane drone type
- it requires a servo called ROTATION_MECH
</description>
<section name="ROT_WING" prefix="ROT_WING_EFF_SCHED_">
<section name="ROTWING" prefix="ROTWING_EFF_SCHED_">
<define name="IXX_BODY" value="0" description=""/>
<define name="IYY_BODY" value="0" description=""/>
<define name="IZZ" value="0" description=""/>
@@ -29,19 +29,19 @@
</dl_settings>
</settings>
<header>
<file name="eff_scheduling_rot_wing_V2.h"/>
<file name="eff_scheduling_rotwing_V2.h"/>
</header>
<init fun="eff_scheduling_rot_wing_init()"/>
<periodic fun="eff_scheduling_rot_wing_periodic()"/>
<init fun="eff_scheduling_rotwing_init()"/>
<periodic fun="eff_scheduling_rotwing_periodic()"/>
<makefile>
<file name="eff_scheduling_rot_wing_V2.c"/>
<file name="eff_scheduling_rotwing_V2.c"/>
<test firmware="rotorcraft">
<define name="ROT_WING_EFF_SCHED_IXX_BODY" value="1"/>
<define name="ROT_WING_EFF_SCHED_IYY_BODY" value="1"/>
<define name="ROT_WING_EFF_SCHED_IZZ" value="1"/>
<define name="ROT_WING_EFF_SCHED_IXX_WING" value="1"/>
<define name="ROT_WING_EFF_SCHED_IYY_WING" value="1"/>
<define name="ROT_WING_EFF_SCHED_M" value="1"/>
<define name="ROTWING_EFF_SCHED_IXX_BODY" value="1"/>
<define name="ROTWING_EFF_SCHED_IYY_BODY" value="1"/>
<define name="ROTWING_EFF_SCHED_IZZ" value="1"/>
<define name="ROTWING_EFF_SCHED_IXX_WING" value="1"/>
<define name="ROTWING_EFF_SCHED_IYY_WING" value="1"/>
<define name="ROTWING_EFF_SCHED_M" value="1"/>
<define name="M_PI" value="3.14"/>
<define name="PERIODIC_FREQUENCY" value="500.0"/>
<define name="ACTUATORS_NB" value="10"/>
-31
View File
@@ -1,31 +0,0 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="rot_wing_automation" dir="rot_wing_drone">
<doc>
<description>Functions to automate the navigation and guidance of the rotating wing drone</description>
<section name="ROT_WING_AUTOMATION" prefix="ROT_WING_AUTOMATION_">
<define name="TRANS_ACCEL" value="1.0" description="Longitudinal maximum acceleration during a transition"/>
<define name="TRANS_DECEL" value="0.5" description="Longitudinal maximum deceleration during a transition"/>
<define name="TRANS_LENGTH" value="200.0" description="Maximum transition distance (at which to draw waypoints)"/>
<define name="TRANS_AIRSPEED" value="" description="Airspeed threshold above which the transiton is considered complete"/>
<define name="ROT_WING_AUTOMATION_WIND_FILT_CUTOFF" value="0.001" description="Wind low-pass filtering cutoff frequency"/>
</section>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="transition">
<dl_setting var="rot_wing_a.trans_accel" min="0.1" max="5.0" step="0.1" shortname="trans_accel" param="ROT_WING_AUTOMATION_TRANS_ACCEL"/>
<dl_setting var="rot_wing_a.trans_decel" min="0.1" max="5.0" step="0.1" shortname="trans_decel" param="ROT_WING_AUTOMATION_TRANS_DECEL"/>
<dl_setting var="rot_wing_a.trans_length" min="10" max="500." step="1.0" shortname="trans_distance" param="ROT_WING_AUTOMATION_TRANS_LENGTH"/>
<dl_setting var="rot_wing_a.trans_airspeed" min="10.0" max="20.0" step="0.1" shortname="trans_airspeed" param="ROT_WING_AUTOMATION_TRANS_AIRSPEED"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="rot_wing_automation.h"/>
</header>
<init fun="init_rot_wing_automation()"/>
<periodic fun="periodic_rot_wing_automation()" freq="10."/>
<makefile>
<file name="rot_wing_automation.c"/>
</makefile>
</module>
+31
View File
@@ -0,0 +1,31 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="rotwing_automation" dir="rotwing_drone">
<doc>
<description>Functions to automate the navigation and guidance of the rotating wing drone</description>
<section name="ROTWING_AUTOMATION" prefix="ROTWING_AUTOMATION_">
<define name="TRANS_ACCEL" value="1.0" description="Longitudinal maximum acceleration during a transition"/>
<define name="TRANS_DECEL" value="0.5" description="Longitudinal maximum deceleration during a transition"/>
<define name="TRANS_LENGTH" value="200.0" description="Maximum transition distance (at which to draw waypoints)"/>
<define name="TRANS_AIRSPEED" value="" description="Airspeed threshold above which the transiton is considered complete"/>
<define name="ROTWING_AUTOMATION_WIND_FILT_CUTOFF" value="0.001" description="Wind low-pass filtering cutoff frequency"/>
</section>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="transition">
<dl_setting var="rotwing_a.trans_accel" min="0.1" max="5.0" step="0.1" shortname="trans_accel" param="ROTWING_AUTOMATION_TRANS_ACCEL"/>
<dl_setting var="rotwing_a.trans_decel" min="0.1" max="5.0" step="0.1" shortname="trans_decel" param="ROTWING_AUTOMATION_TRANS_DECEL"/>
<dl_setting var="rotwing_a.trans_length" min="10" max="500." step="1.0" shortname="trans_distance" param="ROTWING_AUTOMATION_TRANS_LENGTH"/>
<dl_setting var="rotwing_a.trans_airspeed" min="10.0" max="20.0" step="0.1" shortname="trans_airspeed" param="ROTWING_AUTOMATION_TRANS_AIRSPEED"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="rotwing_automation.h"/>
</header>
<init fun="init_rotwing_automation()"/>
<periodic fun="periodic_rotwing_automation()" freq="10."/>
<makefile>
<file name="rotwing_automation.c"/>
</makefile>
</module>
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="rotwing_state" dir="rot_wing_drone">
<module name="rotwing_state" dir="rotwing_drone">
<doc>
<description>This module keeps track of the current state of a rotating wing drone and desired state set by the RC or flightplan. Paramters are being scheduled in each change of a current state and desired state. Functions are defined in this module to call the actual state and desired state and set a desired state.</description>
<section name="ROTWING_STATE" prefix="ROTWING_STATE_">
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="rotwing_state_V2" dir="rot_wing_drone">
<module name="rotwing_state_V2" dir="rotwing_drone">
<doc>
<description>This module keeps track of the current state of a rotating wing drone and desired state set by the RC or flightplan. Paramters are being scheduled in each change of a current state and desired state. Functions are defined in this module to call the actual state and desired state and set a desired state.</description>
<section name="ROTWING_STATE" prefix="ROTWING_STATE_">
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="wing_rotation_adc_sensor" dir="rot_wing_drone">
<module name="wing_rotation_adc_sensor" dir="rotwing_drone">
<doc>
<description>Module to read wing skew angle from ADC</description>
<configure name="ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION" default="ADC_5" description="ADC channel connected to the wing rotation potentiometer"/>
@@ -1,5 +1,5 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="wing_rotation_controller_servo" dir="rot_wing_drone">
<module name="wing_rotation_controller_servo" dir="rotwing_drone">
<doc>
<description>Module to control wing rotation servo command based on prefered angle setpoint</description>
</doc>
-1
View File
@@ -1 +0,0 @@
<program command="sw/ground_segment/python/rot_wing_visualizer/rot_wing_vis_o3d_app.py" name="RotWing3D" />
-1
View File
@@ -1 +0,0 @@
<program command="sw/ground_segment/python/rot_wing_mon/rot_wing_mon.py" name="RotWingStatus" />
+1
View File
@@ -0,0 +1 @@
<program command="sw/ground_segment/python/rotwing_visualizer/rotwing_vis_o3d_app.py" name="RotWing3D" />
+1
View File
@@ -0,0 +1 @@
<program command="sw/ground_segment/python/rotwing_mon/rotwing_mon.py" name="RotWingStatus" />
+47 -36
View File
@@ -538,48 +538,37 @@
settings_modules="modules/air_data.xml modules/electrical.xml modules/geo_mag.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_pid_rotorcraft.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_ekf2.xml modules/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/stabilization_indi_simple.xml"
gui_color="red"
/>
<aircraft
name="rot_wing_25kg"
ac_id="29"
airframe="airframes/tudelft/rot_wing_25kg.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHVB.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/actuators_faulhaber.xml modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/approach_moving_target.xml modules/eff_scheduling_rot_wing.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/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/preflight_checks.xml modules/rot_wing_automation.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"
/>
<aircraft
name="RotatingWingV3B"
ac_id="39"
airframe="airframes/tudelft/rot_wing_v3b.xml"
airframe="airframes/tudelft/rotwing_v3b.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHVB.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_rot_wing.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/rot_wing_automation.xml modules/rotwing_state.xml modules/stabilization_indi.xml modules/sys_id_auto_doublets.xml modules/sys_id_doublet.xml modules/target_pos.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"
/>
<aircraft
name="RotatingWingV3D"
ac_id="23"
airframe="airframes/tudelft/rot_wing_v3d.xml"
airframe="airframes/tudelft/rotwing_v3d.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHVB.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_rot_wing.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/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/parachute.xml modules/pfc_actuators.xml modules/preflight_checks.xml modules/rot_wing_automation.xml modules/rotwing_state.xml modules/stabilization_indi.xml modules/sys_id_auto_doublets.xml modules/sys_id_doublet.xml modules/target_pos.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/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"
/>
<aircraft
name="RotatingWingV3E"
ac_id="30"
airframe="airframes/tudelft/rot_wing_v3e.xml"
airframe="airframes/tudelft/rotwing_v3e.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHVB.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_rot_wing.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/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/parachute.xml modules/pfc_actuators.xml modules/preflight_checks.xml modules/rot_wing_automation.xml modules/rotwing_state.xml modules/stabilization_indi.xml modules/sys_id_auto_doublets.xml modules/sys_id_doublet.xml modules/target_pos.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/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"
/>
<aircraft
@@ -606,68 +595,90 @@
/>
<aircraft
name="RW3C_DePonti"
ac_id="35"
airframe="airframes/tudelft/rot_wing_v3c_oneloop.xml"
ac_id="95"
airframe="airframes/tudelft/rotwing_v3c_oneloop.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/oneloop_valkenburg.xml"
settings="settings/rotorcraft_basic.xml settings/control/rotorcraft_speed.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/eff_scheduling_rot_wing_V2.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_pid_rotorcraft.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/oneloop_andi.xml modules/rot_wing_automation.xml modules/rotwing_state_V2.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/eff_scheduling_rotwing_V2.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_pid_rotorcraft.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/oneloop_andi.xml modules/rotwing_automation.xml modules/rotwing_state_V2.xml"
gui_color="#ffffcccaccca"
/>
<aircraft
name="RW3C_DePonti_Simulation"
ac_id="34"
airframe="airframes/tudelft/rot_wing_v3c_oneloop_simulation.xml"
ac_id="198"
airframe="airframes/tudelft/rotwing_v3c_oneloop_simulation.xml"
radio="radios/dummy.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/oneloop_valkenburg.xml"
settings="settings/rotorcraft_basic.xml settings/control/rotorcraft_speed.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/eff_scheduling_rot_wing_V2.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_pid_rotorcraft.xml [modules/guidance_rotorcraft.xml] modules/imu_common.xml modules/imu_heater.xml modules/ins_ekf2.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/oneloop_andi.xml modules/rot_wing_automation.xml modules/rotwing_state_V2.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/eff_scheduling_rotwing_V2.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_pid_rotorcraft.xml [modules/guidance_rotorcraft.xml] modules/imu_common.xml modules/imu_heater.xml modules/ins_ekf2.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/oneloop_andi.xml modules/rotwing_automation.xml modules/rotwing_state_V2.xml"
gui_color="#ffffcccaccca"
/>
<aircraft
name="RotatingWingV3F"
ac_id="10"
airframe="airframes/tudelft/rot_wing_v3f.xml"
airframe="airframes/tudelft/rotwing_v3f.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHVB.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_rot_wing.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/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/parachute.xml modules/pfc_actuators.xml modules/preflight_checks.xml modules/rot_wing_automation.xml modules/rotwing_state.xml modules/stabilization_indi.xml modules/sys_id_auto_doublets.xml modules/sys_id_doublet.xml modules/target_pos.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/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_automation.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"
/>
<aircraft
name="RotatingWingV3G"
ac_id="11"
airframe="airframes/tudelft/rot_wing_v3g.xml"
airframe="airframes/tudelft/rotwing_v3g.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHR8.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_rot_wing.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/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/parachute.xml modules/pfc_actuators.xml modules/preflight_checks.xml modules/rot_wing_automation.xml modules/rotwing_state.xml modules/stabilization_indi.xml modules/sys_id_auto_doublets.xml modules/sys_id_doublet.xml modules/target_pos.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/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"
/>
<aircraft
name="RotatingWingV3H"
ac_id="33"
airframe="airframes/tudelft/rot_wing_v3h.xml"
airframe="airframes/tudelft/rotwing_v3h.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHVB.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_rot_wing.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/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/parachute.xml modules/pfc_actuators.xml modules/preflight_checks.xml modules/rot_wing_automation.xml modules/rotwing_state.xml modules/stabilization_indi.xml modules/sys_id_auto_doublets.xml modules/sys_id_doublet.xml modules/target_pos.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/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"
/>
<aircraft
name="RW3_AG"
ac_id="38"
airframe="airframes/AG_UAV/rot_wing_v3c_oneloop_optitrack_ekf2_AG.xml"
name="RotatingWingV3C"
ac_id="34"
airframe="airframes/tudelft/rotwing_v3c_oneloop.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/oneloop_cyberzoo.xml"
settings="settings/rotorcraft_basic.xml settings/control/rotorcraft_speed.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/eff_scheduling_rot_wing.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_pid_rotorcraft.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/oneloop_andi.xml modules/rot_wing_automation.xml modules/rotwing_state.xml"
gui_color="#ffffcccaccca"
flight_plan="flight_plans/tudelft/oneloop_valkenburg.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_pid_rotorcraft.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/nav_survey_rectangle_rotorcraft.xml modules/oneloop_andi.xml"
gui_color="red"
/>
<aircraft
name="Rotwing5"
ac_id="35"
airframe="airframes/tudelft/rotwing5.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHVB.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/actuators_faulhaber.xml modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/approach_moving_target.xml modules/eff_scheduling_rotwing.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/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.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"
/>
<aircraft
name="Rotwing6"
ac_id="3"
airframe="airframes/tudelft/rotwing6.xml"
radio="radios/crossfire_sbus.xml"
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/rotating_wing_EHVB.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/actuators_faulhaber.xml modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/airspeed_uavcan.xml modules/approach_moving_target.xml modules/eff_scheduling_rotwing.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/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.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"
/>
</conf>
@@ -87,9 +87,9 @@
#include "math/wls/wls_alloc.h"
#include "modules/nav/nav_rotorcraft_hybrid.h"
#include "firmwares/rotorcraft/navigation.h"
#include "modules/rot_wing_drone/rotwing_state_V2.h"
#include "modules/rotwing_drone/rotwing_state_V2.h"
#include "modules/core/commands.h"
#include "modules/ctrl/eff_scheduling_rot_wing_V2.h"
#include "modules/ctrl/eff_scheduling_rotwing_V2.h"
#include <stdio.h>
#if INS_EXT_POSE
#include "modules/ins/ins_ext_pose.h"
@@ -18,12 +18,12 @@
* <http://www.gnu.org/licenses/>.
*/
/** @file "modules/ctrl/eff_scheduling_rot_wing.c"
/** @file "modules/ctrl/eff_scheduling_rotwing.c"
* @author Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
* The control effectiveness scheduler for the rotating wing drone type
*/
#include "modules/ctrl/eff_scheduling_rot_wing.h"
#include "modules/ctrl/eff_scheduling_rotwing.h"
#include "generated/airframe.h"
#include "state.h"
@@ -36,133 +36,133 @@
#include "modules/core/abi.h"
#ifndef SERVO_ROTATION_MECH_IDX
#error ctrl_eff_sched_rot_wing requires a servo named ROTATION_MECH_IDX
#error ctrl_eff_sched_rotwing requires a servo named ROTATION_MECH_IDX
#endif
#ifndef ROT_WING_EFF_SCHED_IXX_BODY
#error "NO ROT_WING_EFF_SCHED_IXX_BODY defined"
#ifndef ROTWING_EFF_SCHED_IXX_BODY
#error "NO ROTWING_EFF_SCHED_IXX_BODY defined"
#endif
#ifndef ROT_WING_EFF_SCHED_IYY_BODY
#error "NO ROT_WING_EFF_SCHED_IYY_BODY defined"
#ifndef ROTWING_EFF_SCHED_IYY_BODY
#error "NO ROTWING_EFF_SCHED_IYY_BODY defined"
#endif
#ifndef ROT_WING_EFF_SCHED_IZZ
#error "NO ROT_WING_EFF_SCHED_IZZ defined"
#ifndef ROTWING_EFF_SCHED_IZZ
#error "NO ROTWING_EFF_SCHED_IZZ defined"
#endif
#ifndef ROT_WING_EFF_SCHED_IXX_WING
#error "NO ROT_WING_EFF_SCHED_IXX_WING defined"
#ifndef ROTWING_EFF_SCHED_IXX_WING
#error "NO ROTWING_EFF_SCHED_IXX_WING defined"
#endif
#ifndef ROT_WING_EFF_SCHED_IYY_WING
#error "NO ROT_WING_EFF_SCHED_IYY_WING defined"
#ifndef ROTWING_EFF_SCHED_IYY_WING
#error "NO ROTWING_EFF_SCHED_IYY_WING defined"
#endif
#ifndef ROT_WING_EFF_SCHED_M
#error "NO ROT_WING_EFF_SCHED_M defined"
#ifndef ROTWING_EFF_SCHED_M
#error "NO ROTWING_EFF_SCHED_M defined"
#endif
#ifndef ROT_WING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH
#error "NO ROT_WING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH defined"
#ifndef ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH
#error "NO ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH defined"
#endif
#ifndef ROT_WING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL
#error "NO ROT_WING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL defined"
#ifndef ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL
#error "NO ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL defined"
#endif
#ifndef ROT_WING_EFF_SCHED_HOVER_ROLL_PITCH_COEF
#error "NO ROT_WING_EFF_SCHED_HOVER_ROLL_PITCH_COEF defined"
#ifndef ROTWING_EFF_SCHED_HOVER_ROLL_PITCH_COEF
#error "NO ROTWING_EFF_SCHED_HOVER_ROLL_PITCH_COEF defined"
#endif
#ifndef ROT_WING_EFF_SCHED_HOVER_ROLL_ROLL_COEF
#error "NO ROT_WING_EFF_SCHED_HOVER_ROLL_ROLL_COEF defined"
#ifndef ROTWING_EFF_SCHED_HOVER_ROLL_ROLL_COEF
#error "NO ROTWING_EFF_SCHED_HOVER_ROLL_ROLL_COEF defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_ELEVATOR
#error "NO ROT_WING_EFF_SCHED_K_ELEVATOR defined"
#ifndef ROTWING_EFF_SCHED_K_ELEVATOR
#error "NO ROTWING_EFF_SCHED_K_ELEVATOR defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_RUDDER
#error "NO ROT_WING_EFF_SCHED_K_RUDDER defined"
#ifndef ROTWING_EFF_SCHED_K_RUDDER
#error "NO ROTWING_EFF_SCHED_K_RUDDER defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_AILERON
#error "NO ROT_WING_EFF_SCHED_K_AILERON defined"
#ifndef ROTWING_EFF_SCHED_K_AILERON
#error "NO ROTWING_EFF_SCHED_K_AILERON defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_FLAPERON
#error "NO ROT_WING_EFF_SCHED_K_FLAPERON defined"
#ifndef ROTWING_EFF_SCHED_K_FLAPERON
#error "NO ROTWING_EFF_SCHED_K_FLAPERON defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_PUSHER
#error "NO ROT_WING_EFF_SCHED_K_PUSHER defined"
#ifndef ROTWING_EFF_SCHED_K_PUSHER
#error "NO ROTWING_EFF_SCHED_K_PUSHER defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_ELEVATOR_DEFLECTION
#error "NO ROT_WING_EFF_SCHED_K_ELEVATOR_DEFLECTION defined"
#ifndef ROTWING_EFF_SCHED_K_ELEVATOR_DEFLECTION
#error "NO ROTWING_EFF_SCHED_K_ELEVATOR_DEFLECTION defined"
#endif
#ifndef ROT_WING_EFF_SCHED_D_RUDDER_D_PPRZ
#error "NO ROT_WING_EFF_SCHED_D_RUDDER_D_PPRZ defined"
#ifndef ROTWING_EFF_SCHED_D_RUDDER_D_PPRZ
#error "NO ROTWING_EFF_SCHED_D_RUDDER_D_PPRZ defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_RPM_PPRZ_PUSHER
#error "NO ROT_WING_EFF_SCHED_K_RPM_PPRZ_PUSHER defined"
#ifndef ROTWING_EFF_SCHED_K_RPM_PPRZ_PUSHER
#error "NO ROTWING_EFF_SCHED_K_RPM_PPRZ_PUSHER defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_LIFT_WING
#error "NO ROT_WING_EFF_SCHED_K_LIFT_WING defined"
#ifndef ROTWING_EFF_SCHED_K_LIFT_WING
#error "NO ROTWING_EFF_SCHED_K_LIFT_WING defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_LIFT_FUSELAGE
#error "NO ROT_WING_EFF_SCHED_K_LIFT_FUSELAGE defined"
#ifndef ROTWING_EFF_SCHED_K_LIFT_FUSELAGE
#error "NO ROTWING_EFF_SCHED_K_LIFT_FUSELAGE defined"
#endif
#ifndef ROT_WING_EFF_SCHED_K_LIFT_TAIL
#error "NO ROT_WING_EFF_SCHED_K_LIFT_TAIL defined"
#ifndef ROTWING_EFF_SCHED_K_LIFT_TAIL
#error "NO ROTWING_EFF_SCHED_K_LIFT_TAIL defined"
#endif
struct rot_wing_eff_sched_param_t eff_sched_p = {
.Ixx_body = ROT_WING_EFF_SCHED_IXX_BODY,
.Iyy_body = ROT_WING_EFF_SCHED_IYY_BODY,
.Izz = ROT_WING_EFF_SCHED_IZZ,
.Ixx_wing = ROT_WING_EFF_SCHED_IXX_WING,
.Iyy_wing = ROT_WING_EFF_SCHED_IYY_WING,
.m = ROT_WING_EFF_SCHED_M,
.DMdpprz_hover_roll = ROT_WING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL,
.hover_roll_pitch_coef = ROT_WING_EFF_SCHED_HOVER_ROLL_PITCH_COEF,
.hover_roll_roll_coef = ROT_WING_EFF_SCHED_HOVER_ROLL_ROLL_COEF,
.k_elevator = ROT_WING_EFF_SCHED_K_ELEVATOR,
.k_rudder = ROT_WING_EFF_SCHED_K_RUDDER,
.k_aileron = ROT_WING_EFF_SCHED_K_AILERON,
.k_flaperon = ROT_WING_EFF_SCHED_K_FLAPERON,
.k_pusher = ROT_WING_EFF_SCHED_K_PUSHER,
.k_elevator_deflection = ROT_WING_EFF_SCHED_K_ELEVATOR_DEFLECTION,
.d_rudder_d_pprz = ROT_WING_EFF_SCHED_D_RUDDER_D_PPRZ,
.k_rpm_pprz_pusher = ROT_WING_EFF_SCHED_K_RPM_PPRZ_PUSHER,
.k_lift_wing = ROT_WING_EFF_SCHED_K_LIFT_WING,
.k_lift_fuselage = ROT_WING_EFF_SCHED_K_LIFT_FUSELAGE,
.k_lift_tail = ROT_WING_EFF_SCHED_K_LIFT_TAIL
struct rotwing_eff_sched_param_t eff_sched_p = {
.Ixx_body = ROTWING_EFF_SCHED_IXX_BODY,
.Iyy_body = ROTWING_EFF_SCHED_IYY_BODY,
.Izz = ROTWING_EFF_SCHED_IZZ,
.Ixx_wing = ROTWING_EFF_SCHED_IXX_WING,
.Iyy_wing = ROTWING_EFF_SCHED_IYY_WING,
.m = ROTWING_EFF_SCHED_M,
.DMdpprz_hover_roll = ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL,
.hover_roll_pitch_coef = ROTWING_EFF_SCHED_HOVER_ROLL_PITCH_COEF,
.hover_roll_roll_coef = ROTWING_EFF_SCHED_HOVER_ROLL_ROLL_COEF,
.k_elevator = ROTWING_EFF_SCHED_K_ELEVATOR,
.k_rudder = ROTWING_EFF_SCHED_K_RUDDER,
.k_aileron = ROTWING_EFF_SCHED_K_AILERON,
.k_flaperon = ROTWING_EFF_SCHED_K_FLAPERON,
.k_pusher = ROTWING_EFF_SCHED_K_PUSHER,
.k_elevator_deflection = ROTWING_EFF_SCHED_K_ELEVATOR_DEFLECTION,
.d_rudder_d_pprz = ROTWING_EFF_SCHED_D_RUDDER_D_PPRZ,
.k_rpm_pprz_pusher = ROTWING_EFF_SCHED_K_RPM_PPRZ_PUSHER,
.k_lift_wing = ROTWING_EFF_SCHED_K_LIFT_WING,
.k_lift_fuselage = ROTWING_EFF_SCHED_K_LIFT_FUSELAGE,
.k_lift_tail = ROTWING_EFF_SCHED_K_LIFT_TAIL
};
float eff_sched_pusher_time = 0.002;
float roll_eff_scaling = 1.f;
struct rot_wing_eff_sched_var_t eff_sched_var;
struct rotwing_eff_sched_var_t eff_sched_var;
inline void eff_scheduling_rot_wing_update_wing_angle(void);
inline void eff_scheduling_rot_wing_update_MMOI(void);
inline void eff_scheduling_rot_wing_update_cmd(void);
inline void eff_scheduling_rot_wing_update_airspeed(void);
inline void eff_scheduling_rot_wing_update_hover_motor_effectiveness(void);
inline void eff_scheduling_rot_wing_update_elevator_effectiveness(void);
inline void eff_scheduling_rot_wing_update_rudder_effectiveness(void);
inline void eff_scheduling_rot_wing_update_aileron_effectiveness(void);
inline void eff_scheduling_rot_wing_update_flaperon_effectiveness(void);
inline void eff_scheduling_rot_wing_update_pusher_effectiveness(void);
inline void eff_scheduling_rot_wing_schedule_liftd(void);
inline void eff_scheduling_rotwing_update_wing_angle(void);
inline void eff_scheduling_rotwing_update_MMOI(void);
inline void eff_scheduling_rotwing_update_cmd(void);
inline void eff_scheduling_rotwing_update_airspeed(void);
inline void eff_scheduling_rotwing_update_hover_motor_effectiveness(void);
inline void eff_scheduling_rotwing_update_elevator_effectiveness(void);
inline void eff_scheduling_rotwing_update_rudder_effectiveness(void);
inline void eff_scheduling_rotwing_update_aileron_effectiveness(void);
inline void eff_scheduling_rotwing_update_flaperon_effectiveness(void);
inline void eff_scheduling_rotwing_update_pusher_effectiveness(void);
inline void eff_scheduling_rotwing_schedule_liftd(void);
inline float guidance_indi_get_liftd(float pitch UNUSED, float theta UNUSED);
void stabilization_indi_set_wls_settings(void);
@@ -170,10 +170,10 @@ void stabilization_indi_set_wls_settings(void);
/** ABI binding wing position data.
*/
#ifndef WING_ROTATION_CAN_ROT_WING_ID
#define WING_ROTATION_CAN_ROT_WING_ID ABI_BROADCAST
#ifndef WING_ROTATION_CAN_ROTWING_ID
#define WING_ROTATION_CAN_ROTWING_ID ABI_BROADCAST
#endif
PRINT_CONFIG_VAR(WING_ROTATION_CAN_ROT_WING_ID)
PRINT_CONFIG_VAR(WING_ROTATION_CAN_ROTWING_ID)
static abi_event wing_position_ev;
static void wing_position_cb(uint8_t sender_id UNUSED, struct act_feedback_t *pos_msg, uint8_t num_act)
@@ -190,7 +190,7 @@ static void wing_position_cb(uint8_t sender_id UNUSED, struct act_feedback_t *po
}
}
void eff_scheduling_rot_wing_init(void)
void eff_scheduling_rotwing_init(void)
{
// Initialize variables to quad values
eff_sched_var.Ixx = eff_sched_p.Ixx_body + eff_sched_p.Ixx_wing;
@@ -204,7 +204,7 @@ void eff_scheduling_rot_wing_init(void)
eff_sched_var.sinr3 = 0;
// Set moment derivative variables
eff_sched_var.pitch_motor_dMdpprz = ROT_WING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH;
eff_sched_var.pitch_motor_dMdpprz = ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH;
eff_sched_var.roll_motor_dMdpprz = (eff_sched_p.DMdpprz_hover_roll[0] + (MAX_PPRZ/2.) * eff_sched_p.DMdpprz_hover_roll[1]) / 10000.; // Dmdpprz hover roll for hover thrust
eff_sched_var.cmd_elevator = 0;
@@ -216,29 +216,29 @@ void eff_scheduling_rot_wing_init(void)
eff_sched_var.airspeed2 = 0;
// Get wing angle
AbiBindMsgACT_FEEDBACK(WING_ROTATION_CAN_ROT_WING_ID, &wing_position_ev, wing_position_cb);
AbiBindMsgACT_FEEDBACK(WING_ROTATION_CAN_ROTWING_ID, &wing_position_ev, wing_position_cb);
}
void eff_scheduling_rot_wing_periodic(void)
void eff_scheduling_rotwing_periodic(void)
{
// your periodic code here.
// freq = 10.0 Hz
eff_scheduling_rot_wing_update_wing_angle();
eff_scheduling_rot_wing_update_MMOI();
eff_scheduling_rot_wing_update_cmd();
eff_scheduling_rot_wing_update_airspeed();
eff_scheduling_rotwing_update_wing_angle();
eff_scheduling_rotwing_update_MMOI();
eff_scheduling_rotwing_update_cmd();
eff_scheduling_rotwing_update_airspeed();
// Update the effectiveness values
eff_scheduling_rot_wing_update_hover_motor_effectiveness();
eff_scheduling_rot_wing_update_elevator_effectiveness();
eff_scheduling_rot_wing_update_rudder_effectiveness();
eff_scheduling_rot_wing_update_aileron_effectiveness();
eff_scheduling_rot_wing_update_flaperon_effectiveness();
eff_scheduling_rot_wing_update_pusher_effectiveness();
eff_scheduling_rot_wing_schedule_liftd();
eff_scheduling_rotwing_update_hover_motor_effectiveness();
eff_scheduling_rotwing_update_elevator_effectiveness();
eff_scheduling_rotwing_update_rudder_effectiveness();
eff_scheduling_rotwing_update_aileron_effectiveness();
eff_scheduling_rotwing_update_flaperon_effectiveness();
eff_scheduling_rotwing_update_pusher_effectiveness();
eff_scheduling_rotwing_schedule_liftd();
}
void eff_scheduling_rot_wing_update_wing_angle(void)
void eff_scheduling_rotwing_update_wing_angle(void)
{
// Calculate sin and cosines of rotation
eff_sched_var.wing_rotation_deg = eff_sched_var.wing_rotation_rad / M_PI * 180.;
@@ -253,7 +253,7 @@ void eff_scheduling_rot_wing_update_wing_angle(void)
}
void eff_scheduling_rot_wing_update_MMOI(void)
void eff_scheduling_rotwing_update_MMOI(void)
{
eff_sched_var.Ixx = eff_sched_p.Ixx_body + eff_sched_var.cosr2 * eff_sched_p.Ixx_wing + eff_sched_var.sinr2 * eff_sched_p.Iyy_wing;
eff_sched_var.Iyy = eff_sched_p.Iyy_body + eff_sched_var.sinr2 * eff_sched_p.Ixx_wing + eff_sched_var.cosr2 * eff_sched_p.Iyy_wing;
@@ -263,7 +263,7 @@ void eff_scheduling_rot_wing_update_MMOI(void)
Bound(eff_sched_var.Iyy, 0.01, 100.);
}
void eff_scheduling_rot_wing_update_cmd(void)
void eff_scheduling_rotwing_update_cmd(void)
{
// These indexes depend on the INDI sequence, not the actuator IDX
eff_sched_var.cmd_elevator = actuator_state_filt_vect[5];
@@ -272,7 +272,7 @@ void eff_scheduling_rot_wing_update_cmd(void)
eff_sched_var.cmd_T_mean_scaled = (actuator_state_filt_vect[0] + actuator_state_filt_vect[1] + actuator_state_filt_vect[2] + actuator_state_filt_vect[3]) / 4. * 0.000853229; // Scaled with 8181 / 9600 / 1000
}
void eff_scheduling_rot_wing_update_airspeed(void)
void eff_scheduling_rotwing_update_airspeed(void)
{
eff_sched_var.airspeed = stateGetAirspeed_f();
Bound(eff_sched_var.airspeed, 0. , 30.);
@@ -280,7 +280,7 @@ void eff_scheduling_rot_wing_update_airspeed(void)
Bound(eff_sched_var.airspeed2, 0. , 900.);
}
void eff_scheduling_rot_wing_update_hover_motor_effectiveness(void)
void eff_scheduling_rotwing_update_hover_motor_effectiveness(void)
{
// Pitch motor effectiveness
@@ -330,7 +330,7 @@ void eff_scheduling_rot_wing_update_hover_motor_effectiveness(void)
g1g2[1][3] = -roll_motor_q_eff; // pitch effectiveness left motor
}
void eff_scheduling_rot_wing_update_elevator_effectiveness(void)
void eff_scheduling_rotwing_update_elevator_effectiveness(void)
{
float de = eff_sched_p.k_elevator_deflection[0] + eff_sched_p.k_elevator_deflection[1] * eff_sched_var.cmd_elevator;
@@ -352,7 +352,7 @@ void eff_scheduling_rot_wing_update_elevator_effectiveness(void)
g1g2[1][5] = eff_y_elev;
}
void eff_scheduling_rot_wing_update_rudder_effectiveness(void)
void eff_scheduling_rotwing_update_rudder_effectiveness(void)
{
float dMzdr = (eff_sched_p.k_rudder[0] * eff_sched_var.cmd_pusher_scaled * eff_sched_var.cmd_T_mean_scaled +
eff_sched_p.k_rudder[1] * eff_sched_var.cmd_T_mean_scaled * eff_sched_var.airspeed2 * eff_sched_var.cosr +
@@ -370,7 +370,7 @@ void eff_scheduling_rot_wing_update_rudder_effectiveness(void)
g1g2[2][4] = eff_z_rudder;
}
void eff_scheduling_rot_wing_update_aileron_effectiveness(void)
void eff_scheduling_rotwing_update_aileron_effectiveness(void)
{
float dMxdpprz = (eff_sched_p.k_aileron * eff_sched_var.airspeed2 * eff_sched_var.sinr3) / 1000000.;
float eff_x_aileron = dMxdpprz / eff_sched_var.Ixx;
@@ -378,7 +378,7 @@ void eff_scheduling_rot_wing_update_aileron_effectiveness(void)
g1g2[0][6] = eff_x_aileron;
}
void eff_scheduling_rot_wing_update_flaperon_effectiveness(void)
void eff_scheduling_rotwing_update_flaperon_effectiveness(void)
{
float dMxdpprz = (eff_sched_p.k_flaperon * eff_sched_var.airspeed2 * eff_sched_var.sinr3) / 1000000.;
float eff_x_flap_aileron = dMxdpprz / eff_sched_var.Ixx;
@@ -386,7 +386,7 @@ void eff_scheduling_rot_wing_update_flaperon_effectiveness(void)
g1g2[0][7] = eff_x_flap_aileron;
}
void eff_scheduling_rot_wing_update_pusher_effectiveness(void)
void eff_scheduling_rotwing_update_pusher_effectiveness(void)
{
float rpmP = eff_sched_p.k_rpm_pprz_pusher[0] + eff_sched_p.k_rpm_pprz_pusher[1] * eff_sched_var.cmd_pusher + eff_sched_p.k_rpm_pprz_pusher[2] * eff_sched_var.cmd_pusher * eff_sched_var.cmd_pusher;
@@ -399,9 +399,9 @@ void eff_scheduling_rot_wing_update_pusher_effectiveness(void)
g1g2[4][8] = eff_pusher;
}
float eff_scheduling_rot_wing_lift_d = 0.0f;
float eff_scheduling_rotwing_lift_d = 0.0f;
void eff_scheduling_rot_wing_schedule_liftd(void)
void eff_scheduling_rotwing_schedule_liftd(void)
{
float lift_d_wing = (eff_sched_p.k_lift_wing[0] + eff_sched_p.k_lift_wing[1] * eff_sched_var.sinr2) * eff_sched_var.airspeed2 / eff_sched_p.m;
float lift_d_fuselage = eff_sched_p.k_lift_fuselage * eff_sched_var.airspeed2 / eff_sched_p.m;
@@ -412,12 +412,12 @@ void eff_scheduling_rot_wing_schedule_liftd(void)
lift_d = 0.0;
}
Bound(lift_d, -130., 0.);
eff_scheduling_rot_wing_lift_d = lift_d;
eff_scheduling_rotwing_lift_d = lift_d;
}
// Override standard LIFT_D function
float guidance_indi_get_liftd(float pitch UNUSED, float theta UNUSED) {
return eff_scheduling_rot_wing_lift_d;
return eff_scheduling_rotwing_lift_d;
}
void stabilization_indi_set_wls_settings(void)
@@ -18,17 +18,17 @@
* <http://www.gnu.org/licenses/>.
*/
/** @file "modules/ctrl/eff_scheduling_rot_wing.h"
/** @file "modules/ctrl/eff_scheduling_rotwing.h"
* @author Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
* The control effectiveness scheduler for the rotating wing drone type
*/
#ifndef CTRL_EFF_SCHED_ROT_WING_H
#define CTRL_EFF_SCHED_ROT_WING_H
#ifndef CTRL_EFF_SCHED_ROTWING_H
#define CTRL_EFF_SCHED_ROTWING_H
#include "std.h"
struct rot_wing_eff_sched_param_t {
struct rotwing_eff_sched_param_t {
float Ixx_body; // body MMOI around roll axis [kgm²]
float Iyy_body; // body MMOI around pitch axis [kgm²]
float Izz; // total MMOI around yaw axis [kgm²]
@@ -51,7 +51,7 @@ struct rot_wing_eff_sched_param_t {
float k_lift_tail;
};
struct rot_wing_eff_sched_var_t {
struct rotwing_eff_sched_var_t {
float Ixx; // Total MMOI around roll axis [kgm²]
float Iyy; // Total MMOI around pitch axis [kgm²]
float wing_rotation_rad; // Wing rotation angle in radians: from ABI message
@@ -84,8 +84,8 @@ extern int16_t rotation_cmd;
extern float eff_sched_pusher_time;
extern void eff_scheduling_rot_wing_init(void);
extern void eff_scheduling_rot_wing_periodic(void);
extern void eff_scheduling_rotwing_init(void);
extern void eff_scheduling_rotwing_periodic(void);
#endif // CTRL_EFF_SCHED_ROT_WING_H
#endif // CTRL_EFF_SCHED_ROTWING_H
@@ -18,12 +18,12 @@
* <http://www.gnu.org/licenses/>.
*/
/** @file "modules/ctrl/eff_scheduling_rot_wing_V2.c"
/** @file "modules/ctrl/eff_scheduling_rotwing_V2.c"
* @author Tomaso De Ponti <T.M.L.DePonti@tudelft.nl>
* The control effectiveness scheduler for the rotating wing drone type
*/
#include "modules/ctrl/eff_scheduling_rot_wing_V2.h"
#include "modules/ctrl/eff_scheduling_rotwing_V2.h"
#include "generated/airframe.h"
#include "state.h"
#include "modules/actuators/actuators.h"
@@ -38,33 +38,33 @@ float actuator_state_filt_vect[EFF_MAT_COLS_NB] = {0};
#include "firmwares/rotorcraft/stabilization/stabilization_indi.h"
#endif
#ifndef ROT_WING_EFF_SCHED_IXX_BODY
#error "NO ROT_WING_EFF_SCHED_IXX_BODY defined"
#ifndef ROTWING_EFF_SCHED_IXX_BODY
#error "NO ROTWING_EFF_SCHED_IXX_BODY defined"
#endif
#ifndef ROT_WING_EFF_SCHED_IYY_BODY
#error "NO ROT_WING_EFF_SCHED_IYY_BODY defined"
#ifndef ROTWING_EFF_SCHED_IYY_BODY
#error "NO ROTWING_EFF_SCHED_IYY_BODY defined"
#endif
#ifndef ROT_WING_EFF_SCHED_IZZ
#error "NO ROT_WING_EFF_SCHED_IZZ defined"
#ifndef ROTWING_EFF_SCHED_IZZ
#error "NO ROTWING_EFF_SCHED_IZZ defined"
#endif
#ifndef ROT_WING_EFF_SCHED_IXX_WING
#error "NO ROT_WING_EFF_SCHED_IXX_WING defined"
#ifndef ROTWING_EFF_SCHED_IXX_WING
#error "NO ROTWING_EFF_SCHED_IXX_WING defined"
#endif
#ifndef ROT_WING_EFF_SCHED_IYY_WING
#error "NO ROT_WING_EFF_SCHED_IYY_WING defined"
#ifndef ROTWING_EFF_SCHED_IYY_WING
#error "NO ROTWING_EFF_SCHED_IYY_WING defined"
#endif
#ifndef ROT_WING_EFF_SCHED_M
#error "NO ROT_WING_EFF_SCHED_M defined"
#ifndef ROTWING_EFF_SCHED_M
#error "NO ROTWING_EFF_SCHED_M defined"
#endif
/* Effectiveness Matrix definition */
float G2_RW[EFF_MAT_COLS_NB] = {0};//ROT_WING_EFF_SCHED_G2; //scaled by RW_G_SCALE
float G1_RW[EFF_MAT_ROWS_NB][EFF_MAT_COLS_NB] = {0};//{ROT_WING_EFF_SCHED_G1_ZERO, ROT_WING_EFF_SCHED_G1_ZERO, ROT_WING_EFF_SCHED_G1_THRUST, ROT_WING_EFF_SCHED_G1_ROLL, ROT_WING_EFF_SCHED_G1_PITCH, ROT_WING_EFF_SCHED_G1_YAW}; //scaled by RW_G_SCALE
float G2_RW[EFF_MAT_COLS_NB] = {0};//ROTWING_EFF_SCHED_G2; //scaled by RW_G_SCALE
float G1_RW[EFF_MAT_ROWS_NB][EFF_MAT_COLS_NB] = {0};//{ROTWING_EFF_SCHED_G1_ZERO, ROTWING_EFF_SCHED_G1_ZERO, ROTWING_EFF_SCHED_G1_THRUST, ROTWING_EFF_SCHED_G1_ROLL, ROTWING_EFF_SCHED_G1_PITCH, ROTWING_EFF_SCHED_G1_YAW}; //scaled by RW_G_SCALE
float EFF_MAT_RW[EFF_MAT_ROWS_NB][EFF_MAT_COLS_NB] = {0};
static float flt_cut = 1.0e-4;
@@ -78,8 +78,8 @@ float ele_min = 0.0;
/* Define Forces and Moments tructs for each actuator*/
struct RW_Model RW;
inline void eff_scheduling_rot_wing_update_wing_angle(void);
inline void eff_scheduling_rot_wing_update_airspeed(void);
inline void eff_scheduling_rotwing_update_wing_angle(void);
inline void eff_scheduling_rotwing_update_airspeed(void);
void ele_pref_sched(void);
void update_attitude(void);
void sum_EFF_MAT_RW(void);
@@ -88,10 +88,10 @@ void calc_G1_G2_RW(void);
/** ABI binding wing position data.
*/
#ifndef WING_ROTATION_CAN_ROT_WING_ID
#define WING_ROTATION_CAN_ROT_WING_ID ABI_BROADCAST
#ifndef WING_ROTATION_CAN_ROTWING_ID
#define WING_ROTATION_CAN_ROTWING_ID ABI_BROADCAST
#endif
PRINT_CONFIG_VAR(WING_ROTATION_CAN_ROT_WING_ID)
PRINT_CONFIG_VAR(WING_ROTATION_CAN_ROTWING_ID)
static abi_event wing_position_ev;
float skew_meas = 0.0;
@@ -106,11 +106,11 @@ static void wing_position_cb(uint8_t sender_id UNUSED, struct act_feedback_t *po
}
}
void eff_scheduling_rot_wing_init(void)
void eff_scheduling_rotwing_init(void)
{
init_RW_Model();
update_attitude();
AbiBindMsgACT_FEEDBACK(WING_ROTATION_CAN_ROT_WING_ID, &wing_position_ev, wing_position_cb);
AbiBindMsgACT_FEEDBACK(WING_ROTATION_CAN_ROTWING_ID, &wing_position_ev, wing_position_cb);
float tau_skew = 1.0 / (2.0 * M_PI * 5.0);
float sample_time = 1.0 / PERIODIC_FREQUENCY;
init_butterworth_2_low_pass(&skew_filt, tau_skew, sample_time, 0.0);
@@ -268,11 +268,11 @@ void calc_G1_G2_RW(void)
RW.P = actuator_state_1l[COMMAND_MOTOR_PUSHER] * RW.mP.dFdu;
}
void eff_scheduling_rot_wing_periodic(void)
void eff_scheduling_rotwing_periodic(void)
{
update_attitude();
eff_scheduling_rot_wing_update_wing_angle();
eff_scheduling_rot_wing_update_airspeed();
eff_scheduling_rotwing_update_wing_angle();
eff_scheduling_rotwing_update_airspeed();
ele_pref_sched();
calc_G1_G2_RW();
sum_EFF_MAT_RW();
@@ -359,7 +359,7 @@ void sum_EFF_MAT_RW(void) {
}
}
void eff_scheduling_rot_wing_update_wing_angle(void)
void eff_scheduling_rotwing_update_wing_angle(void)
{
// Calculate sin and cosines of rotation
update_butterworth_2_low_pass(&skew_filt, skew_meas);
@@ -379,7 +379,7 @@ void eff_scheduling_rot_wing_update_wing_angle(void)
}
float time = 0.0;
void eff_scheduling_rot_wing_update_airspeed(void)
void eff_scheduling_rotwing_update_airspeed(void)
{
RW.as = stateGetAirspeed_f();
Bound(RW.as, 0. , 30.);
@@ -18,13 +18,13 @@
* <http://www.gnu.org/licenses/>.
*/
/** @file "modules/ctrl/eff_scheduling_rot_wing_V2.h"
/** @file "modules/ctrl/eff_scheduling_rotwing_V2.h"
* @author Tomaso De Ponti <T.M.L.DePonti@tudelft.nl>
* The control effectiveness scheduler for the rotating wing drone type
*/
#ifndef CTRL_EFF_SCHED_ROT_WING_H
#define CTRL_EFF_SCHED_ROT_WING_H
#ifndef CTRL_EFF_SCHED_ROTWING_H
#define CTRL_EFF_SCHED_ROTWING_H
#include "std.h"
#include "generated/airframe.h"
@@ -65,7 +65,7 @@
extern float EFF_MAT_RW[EFF_MAT_ROWS_NB][EFF_MAT_COLS_NB];
extern float G2_RW[EFF_MAT_COLS_NB] ;
extern float G1_RW[EFF_MAT_ROWS_NB][EFF_MAT_COLS_NB] ;
struct rot_wing_eff_sched_param_t {
struct rotwing_eff_sched_param_t {
float Ixx_body; // body MMOI around roll axis [kgm²]
float Iyy_body; // body MMOI around pitch axis [kgm²]
float Izz; // total MMOI around yaw axis [kgm²]
@@ -88,7 +88,7 @@ struct rot_wing_eff_sched_param_t {
float k_lift_tail;
};
struct rot_wing_eff_sched_var_t {
struct rotwing_eff_sched_var_t {
float Ixx; // Total MMOI around roll axis [kgm²]
float Iyy; // Total MMOI around pitch axis [kgm²]
float wing_rotation_rad; // Wing rotation angle in radians: from ABI message
@@ -194,9 +194,9 @@ extern int16_t rotation_cmd;
extern float eff_sched_pusher_time;
extern void eff_scheduling_rot_wing_init(void);
extern void eff_scheduling_rot_wing_periodic(void);
extern void eff_scheduling_rotwing_init(void);
extern void eff_scheduling_rotwing_periodic(void);
extern struct RW_Model RW;
#endif // CTRL_EFF_SCHED_ROT_WING_H
#endif // CTRL_EFF_SCHED_ROTWING_H
+6 -6
View File
@@ -15,8 +15,8 @@
#ifndef EKF_AW_WRAPPER_ROT_WING
#define EKF_AW_WRAPPER_ROT_WING false
#ifndef EKF_AW_WRAPPER_ROTWING
#define EKF_AW_WRAPPER_ROTWING false
#endif
#ifndef EKF_AW_WRAPPER_RANDOM_INPUTS
#define EKF_AW_WRAPPER_RANDOM_INPUTS false
@@ -31,8 +31,8 @@
#define EKF_AW_DEBUG false
#endif
#if EKF_AW_WRAPPER_ROT_WING
#include "modules/rot_wing_drone/wing_rotation_controller_servo.h"
#if EKF_AW_WRAPPER_ROTWING
#include "modules/rotwing_drone/wing_rotation_controller_servo.h"
#endif
#if PERIODIC_TELEMETRY
@@ -348,7 +348,7 @@ void ekf_aw_wrapper_fetch(void)
// Getting body accel
struct FloatVect3 body_accel_f = {0.0f, 0.0f, 0.0f};
#if EKF_AW_WRAPPER_ROT_WING
#if EKF_AW_WRAPPER_ROTWING
// If body accel available, can use this
struct Int32Vect3 *body_accel_i;
body_accel_i = stateGetAccelBody_i();
@@ -387,7 +387,7 @@ void ekf_aw_wrapper_fetch(void)
}
update_butterworth_2_low_pass(&filt_pusher_prop_rpm, ekf_aw.last_RPM_pusher * 1.0f);
#if EKF_AW_WRAPPER_ROT_WING
#if EKF_AW_WRAPPER_ROTWING
update_butterworth_2_low_pass(&filt_skew, RadOfDeg(wing_rotation.wing_angle_deg));
// Get elevator pprz signal
@@ -18,12 +18,12 @@
* <http://www.gnu.org/licenses/>.
*/
/** @file "modules/rot_wing_drone/rot_wing_automation.c"
/** @file "modules/rotwing_drone/rotwing_automation.c"
* @author Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
* Fucntions to automate the navigation and guidance of the rotating wing drone
*/
#include "modules/rot_wing_drone/rot_wing_automation.h"
#include "modules/rotwing_drone/rotwing_automation.h"
#include "state.h"
#include "modules/datalink/telemetry.h"
#include "filters/low_pass_filter.h"
@@ -34,73 +34,73 @@
#include "generated/modules.h"
/*** Longitudinal maximum acceleration during a transition */
#ifndef ROT_WING_AUTOMATION_TRANS_ACCEL
#define ROT_WING_AUTOMATION_TRANS_ACCEL 1.0
#ifndef ROTWING_AUTOMATION_TRANS_ACCEL
#define ROTWING_AUTOMATION_TRANS_ACCEL 1.0
#endif
/*** Longitudinal maximum deceleration during a transition */
#ifndef ROT_WING_AUTOMATION_TRANS_DECEL
#define ROT_WING_AUTOMATION_TRANS_DECEL 0.5
#ifndef ROTWING_AUTOMATION_TRANS_DECEL
#define ROTWING_AUTOMATION_TRANS_DECEL 0.5
#endif
/*** Maximum transition distance (at which to draw waypoints) */
#ifndef ROT_WING_AUTOMATION_TRANS_LENGTH
#define ROT_WING_AUTOMATION_TRANS_LENGTH 200.0
#ifndef ROTWING_AUTOMATION_TRANS_LENGTH
#define ROTWING_AUTOMATION_TRANS_LENGTH 200.0
#endif
/*** Airspeed threshold above which the transiton is considered complete */
#ifndef ROT_WING_AUTOMATION_TRANS_AIRSPEED
#define ROT_WING_AUTOMATION_TRANS_AIRSPEED 15.0
#ifndef ROTWING_AUTOMATION_TRANS_AIRSPEED
#define ROTWING_AUTOMATION_TRANS_AIRSPEED 15.0
#endif
/*** Wind low-pass filtering cutoff frequency */
#ifndef ROT_WING_AUTOMATION_WIND_FILT_CUTOFF
#define ROT_WING_AUTOMATION_WIND_FILT_CUTOFF 0.001
#ifndef ROTWING_AUTOMATION_WIND_FILT_CUTOFF
#define ROTWING_AUTOMATION_WIND_FILT_CUTOFF 0.001
#endif
struct rot_wing_automation rot_wing_a;
struct rotwing_automation rotwing_a;
// Declare filters (for windspeed estimation)
Butterworth2LowPass rot_wing_automation_wind_filter[2]; // Wind filter
Butterworth2LowPass rotwing_automation_wind_filter[2]; // Wind filter
// declare function
inline void update_waypoint_rot_wing_automation(uint8_t wp_id, struct FloatVect3 *target_ned);
inline void update_waypoint_rotwing_automation(uint8_t wp_id, struct FloatVect3 *target_ned);
inline void update_wind_vector(void);
void init_rot_wing_automation(void)
void init_rotwing_automation(void)
{
rot_wing_a.trans_accel = ROT_WING_AUTOMATION_TRANS_ACCEL;
rot_wing_a.trans_decel = ROT_WING_AUTOMATION_TRANS_DECEL;
rot_wing_a.trans_length = ROT_WING_AUTOMATION_TRANS_LENGTH;
rot_wing_a.trans_airspeed = ROT_WING_AUTOMATION_TRANS_AIRSPEED;
rotwing_a.trans_accel = ROTWING_AUTOMATION_TRANS_ACCEL;
rotwing_a.trans_decel = ROTWING_AUTOMATION_TRANS_DECEL;
rotwing_a.trans_length = ROTWING_AUTOMATION_TRANS_LENGTH;
rotwing_a.trans_airspeed = ROTWING_AUTOMATION_TRANS_AIRSPEED;
rot_wing_a.transitioned = false;
rot_wing_a.windvect.x = 0.0;
rot_wing_a.windvect.y = 0.0;
rot_wing_a.windvect_f.x = 0.0;
rot_wing_a.windvect_f.y = 0.0;
rotwing_a.transitioned = false;
rotwing_a.windvect.x = 0.0;
rotwing_a.windvect.y = 0.0;
rotwing_a.windvect_f.x = 0.0;
rotwing_a.windvect_f.y = 0.0;
// Init windvector low pass filter
float tau = 1.0 / (2.0 * M_PI * ROT_WING_AUTOMATION_WIND_FILT_CUTOFF);
float sample_time = 1.0 / PERIODIC_ROT_WING_AUTOMATION_FREQ;
init_butterworth_2_low_pass(&rot_wing_automation_wind_filter[0], tau, sample_time, 0.0);
init_butterworth_2_low_pass(&rot_wing_automation_wind_filter[1], tau, sample_time, 0.0);
float tau = 1.0 / (2.0 * M_PI * ROTWING_AUTOMATION_WIND_FILT_CUTOFF);
float sample_time = 1.0 / PERIODIC_ROTWING_AUTOMATION_FREQ;
init_butterworth_2_low_pass(&rotwing_automation_wind_filter[0], tau, sample_time, 0.0);
init_butterworth_2_low_pass(&rotwing_automation_wind_filter[1], tau, sample_time, 0.0);
}
// periodic function
void periodic_rot_wing_automation(void)
void periodic_rotwing_automation(void)
{
update_wind_vector();
float airspeed = stateGetAirspeed_f();
if (airspeed > rot_wing_a.trans_airspeed) {
rot_wing_a.transitioned = true;
if (airspeed > rotwing_a.trans_airspeed) {
rotwing_a.transitioned = true;
} else {
rot_wing_a.transitioned = false;
rotwing_a.transitioned = false;
}
}
// Update a waypoint such that you can see on the GCS where the drone wants to go
void update_waypoint_rot_wing_automation(uint8_t wp_id, struct FloatVect3 *target_ned)
void update_waypoint_rotwing_automation(uint8_t wp_id, struct FloatVect3 *target_ned)
{
// Update the waypoint
@@ -128,15 +128,15 @@ void update_wind_vector(void)
float airspeed = stateGetAirspeed_f();
struct NedCoor_f *groundspeed = stateGetSpeedNed_f();
struct FloatVect2 airspeed_v = { cpsi * airspeed, spsi * airspeed };
VECT2_DIFF(rot_wing_a.windvect, *groundspeed, airspeed_v);
VECT2_DIFF(rotwing_a.windvect, *groundspeed, airspeed_v);
// Filter the wind
rot_wing_a.windvect_f.x = update_butterworth_2_low_pass(&rot_wing_automation_wind_filter[0], rot_wing_a.windvect.x);
rot_wing_a.windvect_f.x = update_butterworth_2_low_pass(&rot_wing_automation_wind_filter[1], rot_wing_a.windvect.y);
rotwing_a.windvect_f.x = update_butterworth_2_low_pass(&rotwing_automation_wind_filter[0], rotwing_a.windvect.x);
rotwing_a.windvect_f.x = update_butterworth_2_low_pass(&rotwing_automation_wind_filter[1], rotwing_a.windvect.y);
}
// Function to visualize from flightplan, call repeadely
void rot_wing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint8_t wp_end_id)
void rotwing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint8_t wp_end_id)
{
//state eulers in zxy order
struct FloatEulers eulers_zxy;
@@ -159,16 +159,16 @@ void rot_wing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint
// Move end transition waypoint at the correct length
struct FloatVect3 end_transition_rel_pos;
VECT3_COPY(end_transition_rel_pos, *drone_pos);
end_transition_rel_pos.x = cpsi * rot_wing_a.trans_length;
end_transition_rel_pos.y = spsi * rot_wing_a.trans_length;
end_transition_rel_pos.x = cpsi * rotwing_a.trans_length;
end_transition_rel_pos.y = spsi * rotwing_a.trans_length;
struct FloatVect3 end_transition_pos;
VECT3_SUM(end_transition_pos, end_transition_rel_pos, *drone_pos);
end_transition_pos.z = drone_pos->z;
update_waypoint_rot_wing_automation(wp_end_id, &end_transition_pos);
update_waypoint_rotwing_automation(wp_end_id, &end_transition_pos);
// Move transition waypoint
float airspeed_error = rot_wing_a.trans_airspeed - airspeed;
float transition_time = airspeed_error / rot_wing_a.trans_accel;
float airspeed_error = rotwing_a.trans_airspeed - airspeed;
float transition_time = airspeed_error / rotwing_a.trans_accel;
float average_ground_speed = ground_speed + airspeed_error / 2.;
float transition_distance = average_ground_speed * transition_time;
@@ -179,13 +179,13 @@ void rot_wing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint
struct FloatVect3 transition_pos;
VECT3_SUM(transition_pos, transition_rel_pos, *drone_pos);
transition_pos.z = drone_pos->z;
update_waypoint_rot_wing_automation(wp_transition_id, &transition_pos);
update_waypoint_rotwing_automation(wp_transition_id, &transition_pos);
// Move decel point
float final_groundspeed = ground_speed + airspeed_error;
float decel_time = final_groundspeed / rot_wing_a.trans_decel;
float decel_time = final_groundspeed / rotwing_a.trans_decel;
float decel_distance = (final_groundspeed / 2.) * decel_time;
float decel_distance_from_drone = rot_wing_a.trans_length - decel_distance;
float decel_distance_from_drone = rotwing_a.trans_length - decel_distance;
struct FloatVect3 decel_rel_pos;
VECT3_COPY(decel_rel_pos, *drone_pos);
@@ -194,5 +194,5 @@ void rot_wing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint
struct FloatVect3 decel_pos;
VECT3_SUM(decel_pos, decel_rel_pos, *drone_pos);
decel_pos.z = drone_pos->z;
update_waypoint_rot_wing_automation(wp_decel_id, &decel_pos);
update_waypoint_rotwing_automation(wp_decel_id, &decel_pos);
}
@@ -18,28 +18,28 @@
* <http://www.gnu.org/licenses/>.
*/
/** @file "modules/rot_wing_drone/rot_wing_automation.h"
/** @file "modules/rotwing_drone/rotwing_automation.h"
* @author Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
* Fucntions to automate the navigation and guidance of the rotating wing drone
*/
#ifndef ROT_WING_AUTOMATION_H
#define ROT_WING_AUTOMATION_H
#ifndef ROTWING_AUTOMATION_H
#define ROTWING_AUTOMATION_H
#include "std.h"
#include "math/pprz_algebra_float.h"
#ifdef RW_USE_MODULES_V2
#include "modules/rot_wing_drone/rotwing_state_V2.h"
#include "modules/rotwing_drone/rotwing_state_V2.h"
#else
#include "modules/rot_wing_drone/rotwing_state.h"
#include "modules/rotwing_drone/rotwing_state.h"
#endif
extern void init_rot_wing_automation(void);
extern void periodic_rot_wing_automation(void);
extern void rot_wing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint8_t wp_end_id);
extern void init_rotwing_automation(void);
extern void periodic_rotwing_automation(void);
extern void rotwing_vis_transition(uint8_t wp_transition_id, uint8_t wp_decel_id, uint8_t wp_end_id);
struct rot_wing_automation {
struct rotwing_automation {
// Constants
float trans_accel; // Acceleration during transition
float trans_decel; // Deceleration during transition
@@ -52,9 +52,9 @@ struct rot_wing_automation {
struct FloatVect2 windvect_f; // Filtered wind vector
};
extern struct rot_wing_automation rot_wing_a;
extern struct rotwing_automation rotwing_a;
#define RotWingAutomationReadyForForward() (rot_wing_a.transitioned && (rotwing_state_skewing.wing_angle_deg > 75.0))
#define RotWingAutomationReadyForForward() (rotwing_a.transitioned && (rotwing_state_skewing.wing_angle_deg > 75.0))
#endif // ROT_WING_AUTOMATION_H
#endif // ROTWING_AUTOMATION_H
@@ -23,7 +23,7 @@
* This module keeps track of the current state of a rotating wing drone and desired state set by the RC or flightplan. Paramters are being scheduled in each change of a current state and desired state. Functions are defined in this module to call the actual state and desired state and set a desired state.
*/
#include "modules/rot_wing_drone/rotwing_state.h"
#include "modules/rotwing_drone/rotwing_state.h"
#include "firmwares/rotorcraft/stabilization/stabilization_indi.h"
#include "firmwares/rotorcraft/guidance/guidance_indi_hybrid.h"
#include "modules/nav/nav_rotorcraft_hybrid.h"
@@ -23,7 +23,7 @@
* This module keeps track of the current state of a rotating wing drone and desired state set by the RC or flightplan. Paramters are being scheduled in each change of a current state and desired state. Functions are defined in this module to call the actual state and desired state and set a desired state.
*/
#include "modules/rot_wing_drone/rotwing_state_V2.h"
#include "modules/rotwing_drone/rotwing_state_V2.h"
#include "firmwares/rotorcraft/autopilot_firmware.h"
#include "modules/core/commands.h"
#include "modules/actuators/actuators.h"
@@ -18,12 +18,12 @@
* <http://www.gnu.org/licenses/>.
*/
/** @file "modules/rot_wing_drone/wing_rotation_adc_sensor.c"
/** @file "modules/rotwing_drone/wing_rotation_adc_sensor.c"
* @author Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
* Module to read skew angle from adc sensor
*/
#include "modules/rot_wing_drone/wing_rotation_adc_sensor.h"
#include "modules/rotwing_drone/wing_rotation_adc_sensor.h"
#include "generated/airframe.h"
#include "modules/core/abi.h"
@@ -18,7 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
/** @file "modules/rot_wing_drone/wing_rotation_controller_adc_sensor.h"
/** @file "modules/rotwing_drone/wing_rotation_controller_adc_sensor.h"
* @author Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
* Module to read skew angle from adc sensor
*/
@@ -19,11 +19,11 @@
#
import wx
import rot_wing_viewer
import rotwing_viewer
class RotWingApp(wx.App):
def OnInit(self):
self.main = rot_wing_viewer.RotWingFrame()
self.main = rotwing_viewer.RotWingFrame()
self.main.Show()
self.SetTopWindow(self.main)
return True
@@ -296,7 +296,7 @@ class RotWingFrame(wx.Frame):
self.w = WIDTH
self.h = WIDTH + BARH
self.cfg = wx.Config('rot_wing_conf')
self.cfg = wx.Config('rotwing_conf')
if self.cfg.Exists('width'):
self.w = int(self.cfg.Read('width'))
self.h = int(self.cfg.Read('height'))