ArduPlane v4.4/MissionPlanner SITL with XPlane11 run LUA script?

This is the .bin log file you requested.

When starting SITL, did you turn on the “wipe” checkbox?

Yes I turn on the wipe box everytime.

Try the following steps.

  • Check “wipe” and start SITL with XPlane-11
  • Set SCR_ENABLE to 1 and set SCR_HEAP_SIZE to 300000.
  • Exit SITL
  • Copy plane_aerobatics.lua to the scripts folder
  • Start SITL without “wipe” checked.

Aerobatic tricks were almost done!
The tricks I set are loops just after the WP1 and WP3.
These loops were started and aborted a few seconds later. There are messages like this,
21:20:18: Starting Loop!
21:20:23: aborting -0.04 at 300 tv=(0.26,0.59,-1.55) vx=49.9"
21:20:23: 0 adt=0.04
21:20:23: Finishing Loop!

Anyway the script was executed. Thank you, but why it was done!?

“wipe” is an option to reset the parameter to default. xplane has a default value of zero for SCR_ENALBE.

SCR_ENABLE is a parameter that requires a SITL restart." If “wipe” is enabled, SCR_ENABLE will be set back to zero each time you start SITL, so if you set it to “1” each time, the script will not run.

In plane-3d, the default value of SCR_ENABLE seems to be “1”.

There is no need to check “wipe” after that.

Now I have understood. Thank you very much for your very kind help.
I could have very comfortable new year.
I hope you have a happy new year!