From 6dbfabf8de7f564d9f4aff6802561eab0fdf6de8 Mon Sep 17 00:00:00 2001 From: "cesar.alejandro" Date: Wed, 31 Aug 2022 17:29:05 -0300 Subject: [PATCH] Updating airframes to work with version 1.13dev of PX4 Firmware --- airframes/4000_spiri | 42 +++++++++++++++++++++++++----- airframes/4001_spiri_with_tether | 44 ++++++++++++++++++++++++++------ models/spiri/spiri.sdf | 2 +- 3 files changed, 72 insertions(+), 16 deletions(-) diff --git a/airframes/4000_spiri b/airframes/4000_spiri index 55e853b..f419a52 100644 --- a/airframes/4000_spiri +++ b/airframes/4000_spiri @@ -7,18 +7,46 @@ . ${R}etc/init.d/rc.mc_defaults -param set-default MC_ROLLRATE_K 2.35 -param set-default MC_ROLLRATE_D 0.0032 -param set-default MC_ROLLRATE_I 0.15 +param set-default MC_ROLLRATE_K 1.00 +param set-default MC_ROLLRATE_D 0.0060 +param set-default MC_ROLLRATE_I 0.35 -param set-default MC_PITCHRATE_K 2.35 -param set-default MC_PITCHRATE_D 0.0032 -param set-default MC_PITCHRATE_I 0.15 +param set-default MC_PITCHRATE_K 1.00 +param set-default MC_PITCHRATE_D 0.0060 +param set-default MC_PITCHRATE_I 0.35 + +param set-default MPC_Z_P 0.70 #param load spiri_param/Vehicle_230_Parameters.params -param set-default MPC_Z_VEL_MAX_UP 1.0 +#param set-default MC_PITCHRATE_P 0.0889 +#param set-default MC_ROLLRATE_P 0.0957 +param set-default CA_AIRFRAME 0 + +param set-default CA_ROTOR_COUNT 4 +param set-default CA_ROTOR0_PX 0.165037 +param set-default CA_ROTOR0_PY 0.165037 +param set-default CA_ROTOR0_KM 0.1 +param set-default CA_ROTOR1_PX -0.165037 +param set-default CA_ROTOR1_PY -0.165037 +param set-default CA_ROTOR1_KM 0.1 +param set-default CA_ROTOR2_PX 0.165037 +param set-default CA_ROTOR2_PY -0.165037 +param set-default CA_ROTOR2_KM -0.1 +param set-default CA_ROTOR3_PX -0.165037 +param set-default CA_ROTOR3_PY 0.165037 +param set-default CA_ROTOR3_KM -0.1 + +param set-default PWM_MAIN_FUNC1 101 +param set-default PWM_MAIN_FUNC2 102 +param set-default PWM_MAIN_FUNC3 103 +param set-default PWM_MAIN_FUNC4 104 param set-default COM_RCL_EXCEPT 4 +param set-default MPC_Z_VEL_MAX_UP 1.0 + +param set-default COM_RCL_EXCEPT 4 +param set-default NAV_RCL_ACT 1 + set MIXER quad_x set PWM_OUT 1234 diff --git a/airframes/4001_spiri_with_tether b/airframes/4001_spiri_with_tether index ee9687f..f419a52 100644 --- a/airframes/4001_spiri_with_tether +++ b/airframes/4001_spiri_with_tether @@ -7,18 +7,46 @@ . ${R}etc/init.d/rc.mc_defaults -param set-default MC_ROLLRATE_K 2.35 -param set-default MC_ROLLRATE_D 0.0030 -param set-default MC_ROLLRATE_I 0.15 +param set-default MC_ROLLRATE_K 1.00 +param set-default MC_ROLLRATE_D 0.0060 +param set-default MC_ROLLRATE_I 0.35 -param set-default MC_PITCHRATE_K 2.35 -param set-default MC_PITCHRATE_D 0.0030 -param set-default MC_PITCHRATE_I 0.15 +param set-default MC_PITCHRATE_K 1.00 +param set-default MC_PITCHRATE_D 0.0060 +param set-default MC_PITCHRATE_I 0.35 -param set-default MPC_Z_VEL_MAX_UP 0.5 -param set-default MPC_TKO_SPEED 1.0 +param set-default MPC_Z_P 0.70 + +#param load spiri_param/Vehicle_230_Parameters.params + +#param set-default MC_PITCHRATE_P 0.0889 +#param set-default MC_ROLLRATE_P 0.0957 +param set-default CA_AIRFRAME 0 + +param set-default CA_ROTOR_COUNT 4 +param set-default CA_ROTOR0_PX 0.165037 +param set-default CA_ROTOR0_PY 0.165037 +param set-default CA_ROTOR0_KM 0.1 +param set-default CA_ROTOR1_PX -0.165037 +param set-default CA_ROTOR1_PY -0.165037 +param set-default CA_ROTOR1_KM 0.1 +param set-default CA_ROTOR2_PX 0.165037 +param set-default CA_ROTOR2_PY -0.165037 +param set-default CA_ROTOR2_KM -0.1 +param set-default CA_ROTOR3_PX -0.165037 +param set-default CA_ROTOR3_PY 0.165037 +param set-default CA_ROTOR3_KM -0.1 + +param set-default PWM_MAIN_FUNC1 101 +param set-default PWM_MAIN_FUNC2 102 +param set-default PWM_MAIN_FUNC3 103 +param set-default PWM_MAIN_FUNC4 104 +param set-default COM_RCL_EXCEPT 4 + +param set-default MPC_Z_VEL_MAX_UP 1.0 param set-default COM_RCL_EXCEPT 4 +param set-default NAV_RCL_ACT 1 set MIXER quad_x set PWM_OUT 1234 diff --git a/models/spiri/spiri.sdf b/models/spiri/spiri.sdf index c4e401b..bb4c4f4 100644 --- a/models/spiri/spiri.sdf +++ b/models/spiri/spiri.sdf @@ -5,7 +5,7 @@ 0 0 0 0 -0 0 1 - 0 0.00268 -0.000742 0 -0 0 + 0 0 0 0 -0 0 1.437