Hi there,
trying to run a JSBSim SITL as per documentation, I seem to be facing several issues:
- known bug regarding regarding number of simulated accelerometers, fixed as suggested here: https://github.com/Auterion/px4-jsbsim-bridge/pull/66
- preflight checks report “height estimate not stable”
- when commanding a take-off or switching to manual, the plane rolls over / crashes quickly. Looking at a JSBSim CSV log, it seems the engine is seeing a large step in RPM at the time of the mode switch.
This was tested with PX4 v1.15.3 (also tried 1.16-alpha2) and JSBSim versions 1.1.0 (first one supporting Jammy) and v1.2.1 (latest release).
Attached are output of “make px4_sitl jsbsim” command, PX4 ulog and JSBSim CSV log. I am looking for some feedback if anyone reproduces these issues and tips on what to look into. I would be happy to open and work on issues on a repository (PX4 firmware, JSBSim bridge, Rascal model, …) once I have some more infos on this.
Here is a zip with the logs: https://filedn.eu/lFK71hM6HqNfQErsmMLIGC4/px4_jsbsim_sitl_fail_logs.zip
Looking forward to any help, thank you.
Adding to the log of issues:
On the plus side, I could successfully run both YaSim and JSBSim Rascal models via FlightGear. For my purposes, however, I need “native” JSBSim version with lockstep mechanism.
I had the same problem that the engine of the Rascal generates so much torque at the first(!) start that the airplane tips over. Apparently there is a bug in the simulation of the electric motor in JSBSim, FlightGear somehow avoids the bug.
Anyway, the solution is to use a brushless motor.
I have modeled a Hacker A-50 for JSB sim which fits the Rascal quite well:
In the “Engine” folder of JSBSim create a file named “HACKER-A60.xml” with the following content:
<?xml version="1.0"?>
<!--bldc_engine name=Hacker A60-5XS"-->
<brushless_dc_motor name="Hacker A60-5XS">
<velocityconstant> 420 </velocityconstant>
<coilresistance>0.012</coilresistance>
<noloadcurrent>2.40</noloadcurrent>
<maxvolts> 25.2</maxvolts>
</brushless_dc_motor>
and in the XML file of the Rascal (aircraft folder) under <propulsion>
change the tag
<engine file=“Zenoah_G-26A”>
to <engine file=“HACKER-A60”>
.
I also had the problem of sudden torque so i tested most of the jsbsim-devel versions and got to this conclusion: all versions above v1.1.2 have this problem. so you can either use a brushless motor like @Scavanger said or using any version below v1.1.3
That said was you able to fix the “height estimate not stable” problem ?