Can't play ArduPlane SITL with Xplane 11

Hi @RCnorm,

This issue has nothing to do with ArduPilot. I think all you have to do is tell X-Plane support that “Joystick raw axis deflections” are not output depending on the type of Joystick.

Yes I told them just so.

Hi, @Gary_Mortimer

Data output via UDP ticks is shown below.

Plane-4.4 requests X-Plane to send these data, and we cannot check anything else in X-Plane when running SITL.

Index Data to Output
1 Times
3 Speeds
4 Mach, VVI, g-load
13 Trim, flap, stats, & speedbrakes
16 Angular velocities
17 Pitch, roll, & headings
20 Latitude, longitude, & altitude
21 Location, velocity, & distance traveled
37 Engine RPM
38 Propeller RPM
39 Propeller pitch
136 Joystick raw axis deflections

I mean you don’t have to talk to X-Plane support about ArduPilot. If you tell them that there is a communication problem between ArduPilot and X-Plane, X-Plane support will respond that the problem would be on the ArduPilot side.

Thanks @hatnac I will give it a try

X-Plane support will respond that the problem would be on the ArduPilot side

hatnac-san,
That was exactly what Xplane support responded.

Hi again, after following the suggestions here, I managed to fly fixed-wing aircrafts successfully. However, when I try to configure a VTOL aircraft (after I enable Q_ENABLE) the aircraft would take-off to the desired altitude successfully (in quadcopter mode) and transition to fixed-wing mode, fly following the set flight path, but after that it would could not track the desired altitude and keeps climbing until the end of the mission. I have also realized that the target pitch is always positive despite the target altitude. Do you have any suggestions for that?

Have you tuned your model?

Yes, I have tuned my model before enabling quadcopter mode (Q_enable). After successful tests using only fixed-wing mode, I enabled quadcopted mode (to enable VTOL) and tuned my q_ parameters and got satisfactory vertical take-off and landing performance (using the VTOL rotors). This issue arises after transition. Does tuning differ when Q_enable is 1?

update: I think it is probably another radio calibration issue, the same configurations as the built-in “quadplane” simulator of the mission planner was used, the aircraft would still lock-up on some positive pitch angle and keeping climbing throughout the flight… Unfortunately, I still couldnt figure a workaround for this problem. Nonetheless, I think the issues involving X-Plane SITL with ardupilot through mission planner should get the developer’s attention.

I tried the joystick function of Mission Planner but it didn’t work. Teach me why. The procedure I tried was,

  1. Click “joystick” button of Mission Planner’s Data pannel.
  2. The joystick setting page popups.
  3. With TX’s switch ON, select the “Enable” button.
  4. RC1 thru RC4 are automatically connected and they move in accordance with TX’s joysticks movements.
  5. RC1 is assigned X, RC2 is Y, RC3 is Z and RC4 is Rx automatically.
  6. Save this condition.
  7. Change flight mode from RTL to Mannual.
  8. Check control surfaces movements by moving joystick, but no surface moved.

This is the setting situation.

Try following steps.

  • Start X-Plane

  • Launch Mission Planner

  • Launch ArduPlane.exe from the command prompt.
    image

  • Enable the Joystick in Mission Planner.

  • Click the “CONNECT” button in Mission Planner and enter 127.0.0.1 as IP address, 5760 as remote port.

How I can launch ArduPlane.exe from the command prompt you had shown me?

  1. Press “WIn + R” key.
  2. enter “cmd” to open the command prompt.
  3. Enter the following command in the command prompt.
    cd Documents\Mission Planner\sitl
  4. Enter the following command in the command prompt.
    ArduPilot.exe -Mxplane

An error message is appeared after the step 4.

Sorry, execute not “ArduPilot.exe” but “ArduPlane.exe”.
ArduPlane.exe -Mxplane

It worked! Thank you.
But all outputs for RC1 through RC4 are small, say from 1200 to 1700. even if I set them as min=1100 and max=1900. How I can widen them?

You rely too much on others.
Please read the document first and try to solve the problem by yourself.

I’m so sorry. I was so hurry to play with joystick. I will read manual and test it. if still there remains something I can’t solve I will ask your help.

  1. As soon as the ArduPlane is downloaded, all control surfaces of the Xplane’s aircraft move to their maximum end points and can’t be controlled by the TX.

The very first mode when you start SITL is RTL, and home position is a little bit back of the current position. So all the controls are setted maximum to turn airplane back.

  1. The Xplane’s joystick setting bars moves well following the TX’s sticks movements.

Yes, which means joystick is connected to X-Plane well. But you can’t control the airplane by joystick.
That’s because you already overrode joystick by SITL.
Maybe you’ve already seen this file before.
It is setted in xplane_plane.json, you put it to Mission Planner’s sitl folder.

{
“settings” : { “debug” : 0 },
“sim/operation/override/override_joystick” : { “type” : “fixed”, “value” : 1 },
“sim/operation/override/override_throttles” : { “type” : “fixed”, “value” : 1 },

sim/operation/override/override_joystick : 1.00 → means that DO NOT use joystick which is connected to X-Plane. SITL would control the airplane.
So, how do I control my airplane by joystick?
Set other modes, MANUAL or other modes like FBWA which is controled by joystick.
Click Joystick button in Mission Planner, set properly and click Enable button.
image
Remember that
RC1 → Roll, RC2 → Pitch, RC3 → Throttle, RC4 → Yaw.