Using the ArduPlane SITL Catapult/Launcher

Hello all,

I am trying to use SITL to simulate a catapult/launcher launch. I can see in the SIM_Plane.cpp there is provision for aircraft types with launchers and a launcher function. It seems to be triggered by RC 7 (input.servos[6]) > 1700. I have been using a plane with:

    have_launcher = true;

    launch_accel = 15;

    launch_time = 2;

Then I have tried setting both RC 6 and RC 7 to 2000us using Mav Proxy (I have tried both just in case the index is 1 not 0, but aileron is on 0 so I am fairly certain it is RC7).

I cannot get the launcher to trigger. The plane just sits there, armed, in auto, not receiving the initial G it needs to spin the propeller in TKOFF mode.

Can someone point me in the right direction for getting the SITL catapult/launcher to work?

Matt

Alright, I worked it out.

So the input.servos is the servo position being input into the SIM (from what I can tell) not the RC controller input to the sim.

I had to activate Servo 7 (because it is indexed from 0 for input.servos) set it to RCIN7Scaled and then used: “servo set 7 2000” and the catapult launch triggered.

Hope this helps someone else.

1 Like