Skip to content

Commit

Permalink
FEATURE: Support ArduPilot traditional Heli vehicles
Browse files Browse the repository at this point in the history
Many thanks to Allister Scheiber
  • Loading branch information
amilcarlucas committed Aug 27, 2024
1 parent 625d406 commit 27ab301
Show file tree
Hide file tree
Showing 53 changed files with 2,701 additions and 0 deletions.
797 changes: 797 additions & 0 deletions MethodicConfigurator/configuration_steps_Heli.json

Large diffs are not rendered by default.

1,122 changes: 1,122 additions & 0 deletions vehicle_templates/Heli/Allister/00_default.param

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BRD_HEAT_TARG,65 # Reasonable for most places on this planet
INS_LOG_BAT_MASK,7 # Calculate IMU calibration for all IMUs, irrespective of their usage in a future step. Saves the trouble of recalibrating an inactive IMU if you later decide to activate it
INS_TCAL1_ENABLE,2 # Activates the temperature calibration for IMU 1 at the next start
INS_TCAL1_TMAX,65 # CubeOrange has an heater that heats up the board to almost 70 deg
INS_TCAL2_ENABLE,2 # Activates the temperature calibration for IMU 2 at the next start
INS_TCAL2_TMAX,65 # CubeOrange has an heater that heats up the board to almost 70 deg
INS_TCAL3_ENABLE,2 # Activates the temperature calibration for IMU 3 at the next start
LOG_BITMASK,524416 # Only for IMU and Raw-IMU
LOG_DISARMED,1 # Gather data for the offline IMU temperature calibration while the FC is disarmed
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
INS_TCAL1_ACC1_X,-940.540894
INS_TCAL1_ACC1_Y,274.553375
INS_TCAL1_ACC1_Z,-3712.647705
INS_TCAL1_ACC2_X,6.756036
INS_TCAL1_ACC2_Y,-16.502184
INS_TCAL1_ACC2_Z,-12.091681
INS_TCAL1_ACC3_X,0.218629
INS_TCAL1_ACC3_Y,-1.069348
INS_TCAL1_ACC3_Z,0.573851
INS_TCAL1_ENABLE,1
INS_TCAL1_GYR1_X,-480.346069
INS_TCAL1_GYR1_Y,9.009283
INS_TCAL1_GYR1_Z,-56.848328
INS_TCAL1_GYR2_X,74.190918
INS_TCAL1_GYR2_Y,-35.16431
INS_TCAL1_GYR2_Z,-2.668966
INS_TCAL1_GYR3_X,1.776504
INS_TCAL1_GYR3_Y,-1.017865
INS_TCAL1_GYR3_Z,0.014865
INS_TCAL1_TMAX,64.599998
INS_TCAL1_TMIN,-14.7
INS_TCAL2_ACC1_X,6649.077148
INS_TCAL2_ACC1_Y,1555.664062
INS_TCAL2_ACC1_Z,-6349.13916
INS_TCAL2_ACC2_X,-25.260532
INS_TCAL2_ACC2_Y,-13.881091
INS_TCAL2_ACC2_Z,10.675395
INS_TCAL2_ACC3_X,-0.592201
INS_TCAL2_ACC3_Y,-0.260141
INS_TCAL2_ACC3_Z,0.579426
INS_TCAL2_ENABLE,1
INS_TCAL2_GYR1_X,-158.147049
INS_TCAL2_GYR1_Y,-137.744614
INS_TCAL2_GYR1_Z,2.657249
INS_TCAL2_GYR2_X,0.037288
INS_TCAL2_GYR2_Y,-0.209617
INS_TCAL2_GYR2_Z,0.216658
INS_TCAL2_GYR3_X,-0.018463
INS_TCAL2_GYR3_Y,-0.028847
INS_TCAL2_GYR3_Z,0.005903
INS_TCAL2_TMAX,64.5
INS_TCAL2_TMIN,-14
INS_TCAL3_ACC1_X,-1465.066631
INS_TCAL3_ACC1_Y,458.876384
INS_TCAL3_ACC1_Z,2544.281946
INS_TCAL3_ACC2_X,3.881862
INS_TCAL3_ACC2_Y,6.304407
INS_TCAL3_ACC2_Z,16.704325
INS_TCAL3_ACC3_X,1.217049
INS_TCAL3_ACC3_Y,-0.670616
INS_TCAL3_ACC3_Z,-1.336885
INS_TCAL3_ENABLE,0
INS_TCAL3_GYR1_X,-311.394615
INS_TCAL3_GYR1_Y,44.271917
INS_TCAL3_GYR1_Z,46.22566
INS_TCAL3_GYR2_X,-0.843643
INS_TCAL3_GYR2_Y,1.902223
INS_TCAL3_GYR2_Z,-0.561675
INS_TCAL3_GYR3_X,0.004107
INS_TCAL3_GYR3_Y,-0.061594
INS_TCAL3_GYR3_Z,0.019881
INS_TCAL3_TMAX,57.3
INS_TCAL3_TMIN,-27.7
3 changes: 3 additions & 0 deletions vehicle_templates/Heli/Allister/04_board_orientation.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AHRS_ORIENTATION,4 # Point forward in the direction of travel
BRD_HEAT_TARG,45 # Reset to default after offline IMU temperature calibration
LOG_DISARMED,0 # Log disarmed was only required for offline IMU temperature calibration
9 changes: 9 additions & 0 deletions vehicle_templates/Heli/Allister/05_remote_controller.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARMING_RUDDER,2
RC_OPTIONS,800
RC_PROTOCOLS,1 # Selected in the component editor
RC10_OPTION,0
RC6_OPTION,0
RC7_OPTION,32
RC8_OPTION,0
RC9_OPTION,0
RSSI_TYPE,3
2 changes: 2 additions & 0 deletions vehicle_templates/Heli/Allister/06_telemetry.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BRD_SER1_RTSCTS,2
SERIAL2_BAUD,115
22 changes: 22 additions & 0 deletions vehicle_templates/Heli/Allister/07_esc.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ATC_RAT_PIT_SMAX,0 # limit the slew rate to prevent possible ESC desync - https://ardupilot.org/copter/docs/common-servo-limit-cycle-detection.html
ATC_RAT_RLL_SMAX,0 # limit the slew rate to prevent possible ESC desync - https://ardupilot.org/copter/docs/common-servo-limit-cycle-detection.html
ATC_RAT_YAW_SMAX,0 # limit the slew rate to prevent possible ESC desync - https://ardupilot.org/copter/docs/common-servo-limit-cycle-detection.html
NTF_BUZZ_TYPES,5
NTF_LED_TYPES,123079
PSC_ACCZ_SMAX,0 # limit the slew rate to prevent possible ESC desync - https://ardupilot.org/copter/docs/common-servo-limit-cycle-detection.html
SERVO_BLH_POLES,14 # Specified in component editor window
SERVO_FTW_POLES,14 # Specified in component editor window
SERVO1_MAX,2000 # Operating Pulse Width:1050-1950us(Fixed or cannot be Programmed)
SERVO1_MIN,1000 # Operating Pulse Width:1050-1950us(Fixed or cannot be Programmed)
SERVO1_TRIM,1500 # Operating Pulse Width:1050-1950us(Fixed or cannot be Programmed)
SERVO13_FUNCTION,0 # For matek H743Slim v3 board
SERVO2_MAX,2000 # Operating Pulse Width:1050-1950us(Fixed or cannot be Programmed)
SERVO2_MIN,1000 # Operating Pulse Width:1050-1950us(Fixed or cannot be Programmed)
SERVO2_TRIM,1500 # Operating Pulse Width:1050-1950us(Fixed or cannot be Programmed)
SERVO3_MAX,2000 # Operating Pulse Width:1050-1950us(Fixed or cannot be Programmed)
SERVO3_MIN,1000 # Operating Pulse Width:1050-1950us(Fixed or cannot be Programmed)
SERVO3_TRIM,1485
SERVO4_MAX,885
SERVO4_MIN,620
SERVO4_TRIM,750
TKOFF_SLEW_TIME,2
12 changes: 12 additions & 0 deletions vehicle_templates/Heli/Allister/08_batt1.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BATT_AMP_PERVLT,36.360001
BATT_ARM_VOLT,23.6 # Don’t allow arming below this voltage
BATT_CAPACITY,30000 # Total battery capacity specified in the component editor
BATT_CRT_MAH,0
BATT_CRT_VOLT,21.3 # (Critical voltage + 0.0) x no. of cells
BATT_FS_CRT_ACT,1 # Land ASAP
BATT_FS_LOW_ACT,2 # Return and land at home or rally point
BATT_FS_VOLTSRC,0
BATT_LOW_MAH,0
BATT_LOW_VOLT,21.6 # (Low voltage + 0.0) x no. of cells
BATT_MONITOR,4
BATT_VOLT_MULT,18.454201
10 changes: 10 additions & 0 deletions vehicle_templates/Heli/Allister/10_gnss.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BRD_SAFETY_DEFLT,0 # CubeOrange has no safety switch
CAN_D1_PROTOCOL,1 # set virtual driver of CAN1 to DRONECAN for Here3
CAN_P1_DRIVER,0 # Enable CAN1 bus for Here3
GPS_GNSS_MODE,0 # limit the constellations to ensure an update rate higher than 5Hz
GPS_POS1_X,0
GPS_POS1_Y,0
GPS_POS1_Z,0
GPS_TYPE,1 # Defined in component editor
NTF_LED_TYPES,123079
WPNAV_RADIUS,200
15 changes: 15 additions & 0 deletions vehicle_templates/Heli/Allister/11_initial_atc.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ATC_ACCEL_P_MAX,14300 # Derived from vehicle component editor propeller size
ATC_ACCEL_R_MAX,14300 # Derived from vehicle component editor propeller size
ATC_ACCEL_Y_MAX,8000 # Derived from vehicle component editor propeller size
ATC_ANG_YAW_P,1.3 # Derived from vehicle component editor propeller size
ATC_RAT_PIT_FLTD,10 # INS_GYRO_FILTER / 2
ATC_RAT_PIT_FLTE,0 # Initial value, will be improved at a later step
ATC_RAT_PIT_FLTT,10 # INS_GYRO_FILTER / 2
ATC_RAT_RLL_FLTD,10 # INS_GYRO_FILTER / 2
ATC_RAT_RLL_FLTE,0 # Initial value, will be improved at a later step
ATC_RAT_RLL_FLTT,10 # INS_GYRO_FILTER / 2
ATC_RAT_YAW_FLTD,0 # Initial value, will be improved at a later step
ATC_RAT_YAW_FLTE,2 # Initial value, will be improved at a later step
ATC_RAT_YAW_FLTT,10 # INS_GYRO_FILTER / 2
INS_ACCEL_FILTER,10 # The default is 20Hz but that is too high in most situations
INS_GYRO_FILTER,20 # Derived from vehicle component editor propeller size
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
AHRS_TRIM_X,-0.033033
AHRS_TRIM_Y,-0.023843
ATC_ACCEL_P_MAX,110000
ATC_ACCEL_R_MAX,110000
ATC_ACCEL_Y_MAX,80000
ATC_RAT_PIT_FLTD,0 # INS_GYRO_FILTER / 2
ATC_RAT_PIT_FLTT,20 # INS_GYRO_FILTER / 2
ATC_RAT_RLL_FLTD,0 # INS_GYRO_FILTER / 2
ATC_RAT_RLL_FLTT,20 # INS_GYRO_FILTER / 2
ATC_RAT_YAW_FLTE,20
ATC_RAT_YAW_FLTT,20 # INS_GYRO_FILTER / 2
COMPASS_EXTERNAL,1
COMPASS_ORIENT,6
COMPASS_PRIO1_ID,658961
COMPASS_USE2,1
COMPASS_USE3,0
FENCE_ACTION,1
FENCE_ALT_MAX,100
FENCE_ENABLE,1
FENCE_RADIUS,300
FLTMODE1,0
FLTMODE2,2
FLTMODE3,5
FLTMODE4,5
FLTMODE5,15
FLTMODE6,6
FRAME_CLASS,6
FRAME_TYPE,1
INS_ACC1_CALTEMP,44.806763
INS_ACC2_CALTEMP,47
INS_ACC2SCAL_X,0.982365
INS_ACC2SCAL_Y,0.99757
INS_ACC2SCAL_Z,0.961732
INS_ACC3SCAL_X,1
INS_ACC3SCAL_Y,1
INS_ACC3SCAL_Z,1
INS_ACCSCAL_X,0.998809
INS_ACCSCAL_Y,0.996635
INS_ACCSCAL_Z,0.998027
INS_GYRO_FILTER,20
INS_USE3,1
MOT_BAT_VOLT_MAX,26.1
MOT_BAT_VOLT_MIN,19.799999
MOT_SPIN_ARM,0.06
MOT_SPIN_MAX,0.95
MOT_SPIN_MIN,0.09
MOT_THST_EXPO,0.82
MOT_THST_HOVER,0.2
RC1_MAX,2011
RC1_MIN,988
RC1_TRIM,1500
RC10_MAX,1900
RC10_MIN,1100
RC10_TRIM,1500
RC2_MAX,2011
RC2_MIN,988
RC2_TRIM,1500
RC3_MAX,2011
RC3_MIN,988
RC3_TRIM,988
RC4_MAX,2011
RC4_MIN,988
RC4_TRIM,1497
RC5_MAX,1900
RC5_MIN,1100
RC5_TRIM,1500
RC6_MAX,1900
RC6_MIN,1100
RC6_TRIM,1500
RC7_MAX,1900
RC7_MIN,1100
RC7_TRIM,1500
RC8_MAX,1900
RC8_MIN,1100
RC8_TRIM,1500
RC9_MAX,1900
RC9_MIN,1100
RC9_TRIM,1500
SERVO1_FUNCTION,33
SERVO2_FUNCTION,34
SERVO3_FUNCTION,35
SERVO4_FUNCTION,36
18 changes: 18 additions & 0 deletions vehicle_templates/Heli/Allister/13_general_configuration.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ARMING_CHECK,1 # Perform all arming checks. If you have a problem fix its source. Do NOT change this
AUTO_OPTIONS,0
BRD_HEAT_TARG,45 # Operate at a constant IMU temperature
BRD_RTC_TZ_MIN,0
EK3_SRC1_POSZ,1
FENCE_TYPE,7
FS_EKF_ACTION,1
INS_ACCEL_FILTER,20 # the default is 20 and that lets too much noise in
INS_POS1_X,0
INS_POS1_Y,0
INS_POS2_X,0
INS_POS2_Y,0
LAND_ALT_LOW,1000
RTL_ALT,2000
RTL_LOIT_TIME,5000
SCHED_LOOP_RATE,400
SCR_ENABLE,1 # Use lua scripting for VTOL-Quicktune, MagFit automation and Windspeed Estimation automation
SERIAL7_PROTOCOL,2 # Do not use CubeOrange ADSB receiver
6 changes: 6 additions & 0 deletions vehicle_templates/Heli/Allister/14_logging.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
INS_LOG_BAT_CNT,1024 # the default of 1024 causes some problems with https://firmware.ardupilot.org/Tools/WebTools/FilterReview/
INS_LOG_BAT_MASK,3 # Will use 2 of 3 IMU
INS_LOG_BAT_OPT,4 # Logs measured data both before and after the filters for Filter Review Webtool usage
INS_RAW_LOG_OPT,0
LOG_BITMASK,2242524 # Logs Notch filter data and other control signals
LOG_FILE_DSRMROT,1 # One .bin log file per flight, not per battery/reboot
16 changes: 16 additions & 0 deletions vehicle_templates/Heli/Allister/15_initial_yaw.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ATC_ACCEL_Y_MAX,80000

ATC_ANG_YAW_P,4.5

ATC_RAT_YAW_D,0.003
ATC_RAT_YAW_FLTD,0
ATC_RAT_YAW_FLTE,20
ATC_RAT_YAW_FLTT,20

ATC_RAT_YAW_I,0.12
ATC_RAT_YAW_ILMI,0.0
ATC_RAT_YAW_IMAX,0.33

ATC_RAT_YAW_P,0.18

ATC_RAT_YAW_FF,0.0
27 changes: 27 additions & 0 deletions vehicle_templates/Heli/Allister/16_initial_PR.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ATC_ACCEL_P_MAX,110000
ATC_ACCEL_R_MAX,110000

ATC_ANG_PIT_P,4.5
ATC_ANG_RLL_P,4.5

ATC_RAT_PIT_D,0
ATC_RAT_PIT_FLTD,0
ATC_RAT_PIT_FLTE,20
ATC_RAT_PIT_FLTT,20
ATC_RAT_PIT_I,0.1
ATC_RAT_PIT_ILMI,0.05
ATC_RAT_PIT_IMAX,0.40
ATC_RAT_PIT_P,0
ATC_RAT_PIT_FF,0.15

ATC_RAT_RLL_D,0
ATC_RAT_RLL_FLTD,0
ATC_RAT_RLL_FLTE,20
ATC_RAT_RLL_FLTT,20
ATC_RAT_RLL_I,0.1
ATC_RAT_RLL_ILMI,0.05
ATC_RAT_RLL_IMAX,0.40
ATC_RAT_RLL_P,0
ATC_RAT_RLL_FF,0.15

ATC_INPUT_TC,0.15
4 changes: 4 additions & 0 deletions vehicle_templates/Heli/Allister/17_remote_id.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DID_CANDRIVER,0
DID_ENABLE,0 # Our RemoteID module does not communicate with ArduPilot
DID_MAVPORT,2 # The serial port attached to the OpenDroneID module
DID_OPTIONS,0
10 changes: 10 additions & 0 deletions vehicle_templates/Heli/Allister/18_notch_filter_setup.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
INS_FAST_SAMPLE,3 # Two IMUs can run fast on the CubeOrange flight controller
INS_GYRO_RATE,1 # The CubeOrange can do 2KHz here
INS_HNTCH_ATT,40 # this is just a hunch, it must be improved after the first flight (by the next file)
INS_HNTCH_BW,10 # this is just a hunch, it must be improved after the first flight (by the next file)
INS_HNTCH_ENABLE,1 # Use the first notch filter to filter the noise created by the motors/propellers
INS_HNTCH_FREQ,28 # Use 1.4 * INS_GYRO_FILTER as a first guess
INS_HNTCH_HMNCS,3 # start with a single frequency
INS_HNTCH_MODE,0 # Trottle based notch
INS_HNTCH_OPTS,0
INS_HNTCH_REF,0 # Calculate and change this according to the wiki
7 changes: 7 additions & 0 deletions vehicle_templates/Heli/Allister/19_notch_filter_results.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
INS_HNTCH_ATT,40 # just enough to filter the noise created by the motors/propellers
INS_HNTCH_BW,10 # just enough to filter the noise created by the motors/propellers
INS_HNTCH_FM_RAT,0.9 # Allowed undercutting of the base frequency of the first notch filter
INS_HNTCH_FREQ,33.299999 # the minimum frequency that the motors are expected to operate at
INS_HNTCH_HMNCS,3 # the motors produce secondary harmonics on this vehicle
INS_HNTCH_OPTS,0
INS_HNTCH_REF,0 # MOT_THST_HOVER * SQUARE(min_freq / hover_freq)
3 changes: 3 additions & 0 deletions vehicle_templates/Heli/Allister/20_throttle_controller.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ATC_THR_MIX_MAN,0.5
PSC_ACCZ_I,1
PSC_ACCZ_P,0.28
2 changes: 2 additions & 0 deletions vehicle_templates/Heli/Allister/21_ekf_config.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EK3_ACC_P_NSE,0.35 # higher value -> trust accelerometer less, compared to other sources
EK3_ALT_M_NSE,2 # lower value -> trust baro more, compared to other sources
14 changes: 14 additions & 0 deletions vehicle_templates/Heli/Allister/22_quick_tune_setup.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
QUIK_AUTO_FILTER,1
QUIK_AUTO_SAVE,0
QUIK_AXES,7
QUIK_DOUBLE_TIME,10
QUIK_ENABLE,1 # Use VTOL-Quicktune lua script to estimate a good PID starting values
QUIK_GAIN_MARGIN,60
QUIK_MAX_REDUCE,20
QUIK_OPTIONS,0
QUIK_OSC_SMAX,5
QUIK_RC_FUNC,300 # the script uses this value to listen to RC switch
QUIK_RP_PI_RATIO,1
QUIK_Y_PI_RATIO,10
QUIK_YAW_D_MAX,0.01
QUIK_YAW_P_MAX,0.5
10 changes: 10 additions & 0 deletions vehicle_templates/Heli/Allister/23_quick_tune_results.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ATC_RAT_PIT_D,0.000267 # Tuned in a Hangar
ATC_RAT_PIT_I,0.054859 # Tuned in a Hangar
ATC_RAT_PIT_P,0.028604 # Tuned in a Hangar
ATC_RAT_RLL_D,0.00024 # Tuned in a Hangar
ATC_RAT_RLL_I,0.06414 # Tuned in a Hangar
ATC_RAT_RLL_P,0.045 # Tuned in a Hangar
ATC_RAT_YAW_D,0.004231 # Tuned in a Hangar
ATC_RAT_YAW_FLTD,0 # Tuned in a Hangar
ATC_RAT_YAW_I,0.020179 # Tuned in a Hangar
ATC_RAT_YAW_P,0.201791 # Tuned in a Hangar
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MAGH_ALT_DELTA,10 # Height difference between the highest and lowest point of the eight
MAGH_B,1.2 # Geometric factor for the width of the eight
MAGH_CMD,117 # Script_Time command value for identification of the script
MAGH_COUNT,6 # Number of times the drone repeats the eight
MAGH_LOG_ENABLE,1 # Activates the logging of the MAGH.Active message
MAGH_MIN_SPEED,5 # Starting speed for the mission; slowly adjusts to the general speed in auto-missions
MAGH_NUM_WP,18 # Number of waypoints from which the eight is built
MAGH_USE_LOITER,0 # Sets a Loiter_unlimited command at the beginning of the mission to check the generated waypoints
Loading

0 comments on commit 27ab301

Please sign in to comment.