#!/bin/sh
#
# @name VTOL Tiltrotor
#
# @type VTOL Tiltrotor
#

sh /etc/init.d/rc.vtol_defaults

if [ $AUTOCNF = yes ]
then
	param set FW_ARSP_MODE 1
	param set FW_AIRSPD_MAX 25
	param set FW_AIRSPD_MIN 14
	param set FW_AIRSPD_TRIM 16
	param set FW_L1_PERIOD 12

	param set MC_ROLLRATE_P 0.3

	param set MIS_LTRMIN_ALT 10
	param set MIS_TAKEOFF_ALT 10
	param set MIS_YAW_TMT 10

	param set MPC_ACC_HOR_MAX 2
	param set MPC_ACC_HOR_MAX 2
	param set MPC_THR_MIN 0.1
	param set MPC_TKO_SPEED 1
	param set MPC_XY_P 0.15
	param set MPC_XY_VEL_D_ACC 0.1
	param set MPC_XY_VEL_I_ACC 4
	param set MPC_XY_VEL_P_ACC 1
	param set MPC_Z_VEL_MAX_DN 1.5
	param set MPC_Z_VEL_P_ACC 16

	param set NAV_ACC_RAD 5
	param set NAV_LOITER_RAD 80

	param set VT_F_TRANS_DUR 5.0
	param set VT_F_TRANS_THR 0.75
	param set VT_FWD_THRUST_SC 1.1
	param set VT_TILT_FW 1
	param set VT_TILT_TRANS 0.6
	param set VT_ELEV_MC_LOCK 0
	param set VT_TYPE 1
	param set VT_B_TRANS_DUR 8

fi

set MAV_TYPE 21

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