JSBsim: Piston Engine aircraft not taking off

I’m running JSBsim though ardupilot as outlined in the instructions below.
http://ardupilot.org/dev/docs/setting-up-sitl-on-linux.html

I’ve built a few aircraft through JSBsim’s Aeromatic program, and all the electrical engine variants work as intended. Whenever I load up a model with a piston engine, the model aircraft successfully arms, but the aircraft does not move. From the data logs, its clear the throttle is maxed, but there is no propulsion from the engine. I’ve tried it with one of JSBsim’s default aircraft like the L17 model, and ran into the same problem. Has anyone else experienced this problem? I’m only using the files generated by Aeromatic in Tools/autotest/aircraft and running the program through “sim_vehicle.py -f jsbsim”.

EDIT: Got the piston engine up and running! There is a folder in ardupilot under libraries/SITL that writes a script file for JSBSim and reads it. I added a few extra lines of code to start the engine and now the plane is flying. Plane is still taking off right as the simulation starts, so still need to work that out.

Does the petrol engine need a starter run or similar?

Could you put a branch up on github which we can test?

I can’t put a branch up, but I can provide the output data from JSBSim. I am getting some weird readings from the engine parameters. The horsepower is constant and negative, and the power is negative. Manifold pressure is hovering around 30 Hg and I have no thrust from the propeller. I’m also not seeing the second engine I’ve installed.

I’ve found the problem! There is a property called “propulsion/starter_cmd” that turns the engines on in JSBSim. This flag is not triggered through MAVProxy’s “arm throttle” command, so the engine just doesn’t start up. According to the reference manual, I should be able to access the parameter by manually flipping it on, or by executing a script file.

Problem is I don’t know how to access those features through sim_vehicle.py. How can I feed the startup information to the program?

I’ve found the problem! There is a property called “propulsion/starter_cmd”
that turns the engines on in JSBSim. This flag is not triggered through
MAVProxy’s “arm throttle” command, so the engine just doesn’t start up.
According to the reference manual, I should be able to access the parameter
by manually flipping it on, or by executing a script file.

Great stuff!

Problem is I don’t know how to access those features through sim_vehicle.py.
How can I feed the startup information to the program?

Dropping it somewhere in here should work, presumably:

Seriously advanced, over the top solution: plumb in our ICEngine support
and support passing script fragments into JSBSim…

Adding a few lines to the script file forces the engine to start, and it worked on my end. I don’t like altering the source code if I can help it, but sometimes that’s the only way to access whats needed.

I created a aircraft by aeromatic++ I would like to know how you did because when I try to get it’s catalog or simulate it I get errors.

my_aircraft --catalog > my_aircraft_catalog.txt

In file aircraft/my_aircraft/my_aircraft.xml: line 105
Tank capacity must not be zero. Reset to 0.00001 lbs!

In file aircraft/my_aircraft/my_aircraft.xml: line 452

Error loading aerodynamic function in aero/moment/Pitch_propwash:
FGTable: row lookup is not monotonically increasing
in row 3 of table in aero/moment/Pitch_propwash:
0<=0
Aborting.

Aircraft aerodynamics element has problems in file Path “aircraft/my_aircraft/my_aircraft.xml”
JSBSim could not be started

FGPropertyManager::GetNode() No node found for propulsion/engine[0]/thrust-coefficient

I tried getting the catalog out by script but I get error.
~/ardupilot/Tools/autotest$ JSBSim --aircraft=my_aircraft --catalog > my_aircraft_catalog.txt

In file aircraft/my_aircraft/my_aircraft.xml: line 105
Tank capacity must not be zero. Reset to 0.00001 lbs!

In file aircraft/my_aircraft/my_aircraft.xml: line 452

Error loading aerodynamic function in aero/moment/Pitch_propwash:
FGTable: row lookup is not monotonically increasing
in row 3 of table in aero/moment/Pitch_propwash:
0<=0
Aborting.

Aircraft aerodynamics element has problems in file Path “aircraft/my_aircraft/my_aircraft.xml”
JSBSim could not be started

FGPropertyManager::GetNode() No node found for propulsion/engine[0]/thrust-coefficient