#$ TITLE: UAV Tech - 5in (590-630g AUW)
#$ FIRMWARE_VERSION: 4.3
#$ CATEGORY: TUNE
#$ STATUS: COMMUNITY
#$ KEYWORDS: 4S, 6S, 5in, 5", freestyle
#$ AUTHOR: UAV Tech (Mark Spatz)

#$ PARSER: MARKED

#$ DESCRIPTION: I am a Betaflight contributor, Youtube content creator, and professional tuner [www.theuavtech.com](https://www.theuavtech.com)
#$ DESCRIPTION: 
#$ DESCRIPTION: <a href="https://www.youtube.com/c/spatzengr-uav_tech"><img src="https://i0.wp.com/theuavtech.com/wp-content/uploads/2020/10/icon-150x150-1.png" width="125px" style="margin-left: auto; margin-right: auto; display: block;"/></a>
#$ DESCRIPTION: 
#$ DESCRIPTION: PIDs Tab Changes:
#$ DESCRIPTION:
#$ DESCRIPTION: <a href="https://user-images.githubusercontent.com/25570978/158019544-b4f42518-3b2b-4101-afde-671a44647ee5.png"><img src="https://user-images.githubusercontent.com/25570978/158019544-b4f42518-3b2b-4101-afde-671a44647ee5.png" width="500px" style="margin-left: auto; margin-right: auto; display: block;"/></a>
#$ DESCRIPTION:
#$ DESCRIPTION: Filters Tab Changes:
#$ DESCRIPTION:
#$ DESCRIPTION: <a href="https://user-images.githubusercontent.com/25570978/175781771-5adb9234-6f6b-4f42-8fbe-294699959dad.png"><img src="https://user-images.githubusercontent.com/25570978/175781771-5adb9234-6f6b-4f42-8fbe-294699959dad.png" width="500px" style="margin-left: auto; margin-right: auto; display: block;"/></a>
#$ DESCRIPTION:
#$ DESCRIPTION: Information:
#$ DESCRIPTION: -----------
#$ DESCRIPTION: Base tune for a 5in quad with HD camera, approximate weight 630grams.  This tune is good for 4S or 6S batteries.
#$ DESCRIPTION: The base preset assume you have your ESC set to 24K PWM (default).  If you are on 48K+ ESC PWM, click that option above.
#$ DESCRIPTION: Also if you would like to use with the RPM filtering or Dynamic Idle, click the option above.
#$ DESCRIPTION: If you don't know what these features mean, click the links below for videos on each topic.
#$ DESCRIPTION:
#$ DESCRIPTION: Options (click for video):
#$ DESCRIPTION: -----------
#$ DESCRIPTION: - [Low Gyro Noise](https://youtu.be/WiWr0gP3AT0) <--CLICK for topic video
#$ DESCRIPTION:
#$ DESCRIPTION: <a href="https://user-images.githubusercontent.com/25570978/175781642-3e42c38b-2ca6-440a-928b-854dd4d32d2c.png"><img src="https://user-images.githubusercontent.com/25570978/175781642-3e42c38b-2ca6-440a-928b-854dd4d32d2c.png" width="500px" style="margin-left: auto; margin-right: auto; display: block;"/></a>
#$ DESCRIPTION:
#$ DESCRIPTION: - [48K ESC PWM](https://youtu.be/v3806Incpvo) <--CLICK for topic video
#$ DESCRIPTION:
#$ DESCRIPTION: <a href="https://user-images.githubusercontent.com/25570978/158003506-357ef669-d03d-4b54-8509-e167c5f857ef.png"><img src="https://user-images.githubusercontent.com/25570978/158003506-357ef669-d03d-4b54-8509-e167c5f857ef.png" width="500px" style="margin-left: auto; margin-right: auto; display: block;"/></a>
#$ DESCRIPTION:
#$ DESCRIPTION: - [RPM Filter](https://youtu.be/ve_TNB0D87U) <--CLICK for topic video
#$ DESCRIPTION:
#$ DESCRIPTION: <a href="https://user-images.githubusercontent.com/25570978/158003431-63c95403-6c7a-4b40-bb63-89e3ae994139.png"><img src="https://user-images.githubusercontent.com/25570978/158003431-63c95403-6c7a-4b40-bb63-89e3ae994139.png" width="500px" style="margin-left: auto; margin-right: auto; display: block;"/></a>
#$ DESCRIPTION:
#$ DESCRIPTION: - [Dynamic Idle](https://youtu.be/2Mr-AP7K8YE) <--CLICK for topic video
#$ DESCRIPTION:
#$ DESCRIPTION: <a href="https://user-images.githubusercontent.com/25570978/158003472-4a03ae4c-e593-4ef7-b418-9eee00757665.png"><img src="https://user-images.githubusercontent.com/25570978/158003472-4a03ae4c-e593-4ef7-b418-9eee00757665.png" width="500px" style="margin-left: auto; margin-right: auto; display: block;"/></a>
#$ DESCRIPTION:
#$ WARNING: **DO NOT** select the RPM Filter option unless your ESCs support DSHOT and Bi-Directional Communication.  If you are unsure, HIT CANCEL and de-select that option, OTHERWISE it can spin up motors even before you arm your quad!!!
#$ DISCUSSION: https://github.com/betaflight/firmware-presets/pull/201
#$ INCLUDE: presets/4.3/tune/defaults.txt
#$ INCLUDE: presets/4.3/filters/defaults.txt


# -- Filter Settings --
set simplified_gyro_filter = ON
set simplified_gyro_filter_multiplier = 60
set dyn_notch_count = 3
set dyn_notch_min_hz = 125
set dyn_notch_max_hz = 650
set simplified_dterm_filter = ON
set simplified_dterm_filter_multiplier = 120
set yaw_lowpass_hz = 0

# -- PID Settings --
set anti_gravity_gain = 5000
set yaw_lowpass_hz = 0
set simplified_master_multiplier = 135
set simplified_pi_gain = 110
set simplified_dmax_gain = 0
set simplified_feedforward_gain = 130
set simplified_pitch_d_gain = 100
set simplified_pitch_pi_gain = 100
set pidsum_limit = 1000
set pidsum_limit_yaw = 1000

simplified_tuning apply

#$ OPTION BEGIN (UNCHECKED): LOW GYRO NOISE BUILDS
# -- ADDER: For low gyro noise builds --
set simplified_gyro_filter = OFF
set gyro_lpf1_static_hz = 0
set gyro_lpf2_static_hz = 0
set gyro_lpf1_dyn_min_hz = 0
set gyro_lpf1_dyn_max_hz = 0
set dyn_notch_count = 4
#$ OPTION END

#$ OPTION BEGIN (UNCHECKED): 48k+ ESC PWM
# -- ADDER: For 48khz+ PWM --
set thrust_linear = 20
#$ OPTION END

#$ OPTION BEGIN (UNCHECKED): RPM filtering
# -- ADDER: Enabling RPM filtering --
set motor_pwm_protocol = DSHOT600
set dshot_bidir = ON
set rpm_filter_harmonics = 2
set dyn_notch_count = 2
#$ OPTION END

#$ OPTION BEGIN (UNCHECKED): Dynamic Idle
# -- ADDER: Enabling Dynamic Idle --
set dyn_idle_min_rpm = 35
#$ OPTION END