#!/bin/sh
#
# @name ThunderFly TF-G1
# ThunderFly TF-G1 autogyro airframe. Only for FlightGear simulator
#
# @type Autogyro
# @class Autogyro
#
# @url https://github.com/ThunderFly-aerospace/TF-G1/
#
#

sh /etc/init.d/rc.fw_defaults

if [ $AUTOCNF = yes ]
then
	param set EKF2_ARSP_THR 8
	param set EKF2_FUSE_BETA 1
	param set ASPD_STALL 10.0

	param set FW_P_RMAX_NEG 20.0
	param set FW_P_RMAX_POS 60.0
	param set FW_W_RMAX 10
	param set FW_W_EN 1

	param set FW_PR_IMAX 0.4
	param set FW_R_TC 0.4
	param set FW_RR_FF 0.5
	param set FW_RR_I 0.1
	param set FW_RR_IMAX 0.2
	param set FW_RR_P 0.08

	param set MIS_LTRMIN_ALT 50
	param set MIS_TAKEOFF_ALT 3

	param set NAV_ACC_RAD 20
	param set NAV_DLL_ACT 2
	param set NAV_LOITER_RAD 100

	param set RWTO_TKOFF 1
	param set MAV_BROADCAST 1

	param set FW_ARSP_SCALE_EN 0

	param set FW_AIRSPD_MAX 35
	param set FW_AIRSPD_MIN 7
	param set FW_AIRSPD_TRIM 15

	param set FW_P_LIM_MAX 25
	param set FW_P_LIM_MIN -5
	param set FW_R_LIM 30

	param set FW_MAN_P_MAX 30.0
	param set FW_MAN_R_MAX 30.0

	param set FW_THR_CRUISE 0.8
	param set FW_THR_IDLE 0
	param set COM_DISARM_PRFLT 0

fi


set MIXER_FILE etc/mixers-sitl/autogyro_sitl.main.mix
set MIXER custom
