Takeoff command doesnt work in SITL ArduPlane

I am trying to build an autonomous plane with a companion computer (using MAVROS to be precise). I am using sitl to test out the code I have developed. When I send a takeoff command such as “takeoff 40” (in guided mode) using the mavproxy terminal I get a “Got COMMAND_ACK: NAV_TAKEOFF: FAILED”. When i switch to Takeoff mode however the plane takes off without a problem. The takeoff command works fine when i switch to Copter. Is this a configuration issue or is there another problem?
Thanks in advance.
Here are my parameters:
params.txt (29.7 KB)

SOLVED: I looked through the aruplane source code and apparently the arduplane code only allows you to use the takeoff command when quadplane (vtol) mode is on. I was lucky as I was already going to use quadplane configuration anyways

How can ı open quadplane (vtol) mode

Change the q_enable parameter