[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] JSBSim for fixedwing example

From: Andreas Gaeb
Subject: Re: [Paparazzi-devel] JSBSim for fixedwing example
Date: Thu, 10 Feb 2011 09:50:46 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv: Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

Am 10.02.2011 04:14, schrieb Stephen Dwyer:
> [...]
> alt= 668.773061 time= 0.187000 lat=0.934216 lon=1.766669
> [...]
> alt= 664.905993 time= 0.238000 lat=0.934217 lon=1.766668
> gspeed=166771165678573428146176.000000
> Something clearly is not working out well.
looks like the airframe drops below the ground and the gear divergence
occurs. I noticed the call to check_crash_jsbsim in sim_ac_jsbsim.c:82
is commented out in the master branch, so that's why the divergence is
not caught. Commenting it in should at least stop the simulation when
contacting ground.

> I believe the Invalid_argument("Latlong.of_utm") originates from the
> latlong.mli file in paparazzi/sw/lib/ocaml/ right around lines
> 107-108. But I could be wrong, I really don't understand OCAML at all
> unfortunately (I can barely read C).
the error message may be caused by a missing GPS_USE_LATLONG flag, but I
don't think that's the case here. If the message only showed after the
divergence set in, the reason would be clear, but as it already shows
with the airframe waiting for takeoff, I have no idea what's causing it.

> Another thing, changed one other thing in sim_ac_jsbsim.c, I switched
> the SetDebugLevel for JSBSim to 4 and I notice that will the frames of
> the simulation continue to propagate, the time of the simulation never
> makes it past 0.2 seconds (frames keep growing time goes
> 0.0,0.1,0.2,0.2,......,0.2,..........).
this might be due to the divergence. You could check this by printing
out FDMExec->GetSimTime() with more digits. JSBSim also freezes if it
detects a crash (hitting the ground too fast) internally, which means
integration is suspended but the program does not exit.

> Are you using the current github code or have you made significant
> changes to your code along the way to make jsbsim work?
I have made a few changes here and there, though nothing should touch
basic functionality.
One thing that might prove helpful is attached as a patch: run JSBSim
multiple times per control loop execution. 60 Hz is quite a small
integration rate for RC model sized aircraft. I use a speedup factor of 4.

> Any other ideas on what the matter may be?
you might try playing around with the gear spring constants. Physically
meaningful values usually require integration rates of several kHz,
though, so you'll have to look for values that work without too much
divergence. Speeding up JSBSim integration will help as you won't drop
so far below the surface during a single time step. However, if ground
contact is detected, the sim should stop anyway, so I wouldn't spend too
much time on this.

Best regards,

Attachment: jsb_speedup.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]