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.
when first running `make px4_sitl jsbsim", CMake fails to find Mavlink headers. A work-around is to build JMavSim simulation once. Afterwards, the JSBSim build runs through.
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:
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 ?
@Scavanger Thank you for the info and the alternate motor model. It works well for me and I can finally fly the Rascal plane again. Do you know if this is a known issue on JSBSim side? Do you think it would be worth to report this as a bug?
@literAlbDev The “height estimate not stable” problem seems related to the baro emulation. My current work-around is to reduce the noise added to the pressure readings by adding <baro_mbar_rms_noise>0.1</baro_mbar_rms_noise> to the barometer config inside configs/rascal.xml. The default value of 1.0 is hard-coded inside sensor_baro_plugin.h