From 1b1479a92b61ca700b69f34da531674a4fcf4d8c Mon Sep 17 00:00:00 2001 From: alexklimaj Date: Sun, 3 Mar 2024 19:22:51 -0400 Subject: [PATCH] airframes: Droneblocks DEXI 5 --- .../init.d/airframes/4601_droneblocks_dexi_5 | 78 +++++++++++++++++++ .../init.d/airframes/CMakeLists.txt | 1 + boards/ark/pi6x/init/rc.board_defaults | 17 ++++ 3 files changed, 96 insertions(+) create mode 100644 ROMFS/px4fmu_common/init.d/airframes/4601_droneblocks_dexi_5 diff --git a/ROMFS/px4fmu_common/init.d/airframes/4601_droneblocks_dexi_5 b/ROMFS/px4fmu_common/init.d/airframes/4601_droneblocks_dexi_5 new file mode 100644 index 000000000000..c1484d0b417c --- /dev/null +++ b/ROMFS/px4fmu_common/init.d/airframes/4601_droneblocks_dexi_5 @@ -0,0 +1,78 @@ +#!/bin/sh +# +# @name Droneblocks DEXI 5 +# +# @type Quadrotor x +# @class Copter +# +# @maintainer Dennis Baldwin +# @maintainer Alex klimaj +# +# @board px4_fmu-v2 exclude +# @board px4_fmu-v3 exclude +# @board px4_fmu-v4 exclude +# @board px4_fmu-v4pro exclude +# @board px4_fmu-v5 exclude +# @board px4_fmu-v5x exclude +# @board px4_fmu-v6x exclude +# @board bitcraze_crazyflie exclude +# @board diatone_mamba-f405-mk2 exclude +# @board ark_fmu-v6x exclude +# + +. ${R}etc/init.d/rc.mc_defaults + +param set-default BAT1_CAPACITY 4000 +param set-default BAT1_N_CELLS 6 +param set-default BAT1_V_EMPTY 3.3 +param set-default BAT1_V_LOAD_DROP 0.5 +param set-default BAT_AVRG_CURRENT 13 + +# Square quadrotor X PX4 numbering +param set-default CA_ROTOR_COUNT 4 +param set-default CA_ROTOR0_PX 0.0762 +param set-default CA_ROTOR0_PY 0.09525 +param set-default CA_ROTOR0_KM 0.05 +param set-default CA_ROTOR1_PX -0.0762 +param set-default CA_ROTOR1_PY -0.09525 +param set-default CA_ROTOR1_KM 0.05 +param set-default CA_ROTOR2_PX 0.0762 +param set-default CA_ROTOR2_PY -0.09525 +param set-default CA_ROTOR2_KM -0.05 +param set-default CA_ROTOR3_PX -0.0762 +param set-default CA_ROTOR3_PY 0.09525 +param set-default CA_ROTOR3_KM -0.05 + +param set-default EKF2_MIN_RNG 0.01 +param set-default EKF2_OF_POS_X 0.043 +param set-default EKF2_OF_POS_Y 0.011 +param set-default EKF2_OF_QMIN_GND 1 +param set-default EKF2_RNG_POS_X 0.043 +param set-default EKF2_RNG_POS_Y 0.0 + +param set-default IMU_GYRO_DNF_EN 2 + +param set-default MC_PITCHRATE_D 0.0013 +param set-default MC_PITCHRATE_I 0.185 +param set-default MC_PITCHRATE_P 0.105 +param set-default MC_PITCH_P 7.5 +param set-default MC_ROLLRATE_D 0.0010 +param set-default MC_ROLLRATE_I 0.165 +param set-default MC_ROLLRATE_P 0.095 +param set-default MC_ROLL_P 7.5 +param set-default MC_YAWRATE_I 0.35 +param set-default MC_YAWRATE_P 0.13 + +param set-default MPC_THR_HOVER 0.22 +param set-default MPC_THR_MAX 0.5 +param set-default MPC_THR_MIN 0.025 +param set-default MPC_VEL_MANUAL 5.0 +param set-default MPC_XY_VEL_MAX 8.0 + +param set-default RTL_RETURN_ALT 15 + +param set-default SENS_FLOW_MINHGT 0.0 + +param set-default SER_TEL2_BAUD 3000000 + +param set-default UXRCE_DDS_CFG 102 diff --git a/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt b/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt index 66e29e32b4dd..89498206c3e9 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt +++ b/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt @@ -69,6 +69,7 @@ if(CONFIG_MODULES_MC_RATE_CONTROL) 4071_ifo 4073_ifo-s 4500_clover4 + 4601_droneblocks_dexi_5 4901_crazyflie21 # [5000, 5999] Quadrotor + diff --git a/boards/ark/pi6x/init/rc.board_defaults b/boards/ark/pi6x/init/rc.board_defaults index 978dcf43d3cd..03134c887801 100644 --- a/boards/ark/pi6x/init/rc.board_defaults +++ b/boards/ark/pi6x/init/rc.board_defaults @@ -31,3 +31,20 @@ then # TODO: Add the correct sensor ID param set-default SENS_TEMP_ID 2490378 fi + +param set-default EKF2_BARO_DELAY 13 +param set-default EKF2_BARO_NOISE 0.9 +param set-default EKF2_HGT_REF 2 +param set-default EKF2_MAG_DELAY 100 +param set-default EKF2_MAG_NOISE 0.06 +param set-default EKF2_MULTI_IMU 2 +param set-default EKF2_OF_CTRL 1 +param set-default EKF2_OF_DELAY 48 +param set-default EKF2_OF_N_MIN 0.05 +param set-default EKF2_RNG_A_HMAX 25 +param set-default EKF2_RNG_DELAY 48 +param set-default EKF2_RNG_NOISE 0.03 +param set-default EKF2_RNG_QLTY_T 0.1 +param set-default EKF2_RNG_SFE 0.03 + +param set-default SENS_FLOW_RATE 150