paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] JSBSim for fixedwing example


From: Stephen Dwyer
Subject: Re: [Paparazzi-devel] JSBSim for fixedwing example
Date: Wed, 9 Feb 2011 20:14:12 -0700

Hello,

I have had some slight progress, but still not working correctly.

The compile issues with the radio_control_ppm.makefile were indeed
solved with the removal of the ifneq statement.

I changed the initial altitude in my flightplan (basic.xml) and also
changed a line in jsbsim_init function for the alt IC:
         IC->SetAltitudeAGLFtIC((GROUND_ALT + 4.5) / FT2M); //changed from 0.0

I think the altitude along with landing gear spring constant was the
culprit of the extreme values, as the large values would oscillate and
decay, just like a spring.

I sprinkled some cout commands with strings in the code so I could see
where it was getting to or not, and it seems to make it all the way to
the main loop without problems, or at least not severe ones.

I also added a couple debug statements to the
copy_outputs_from_jsbsim() function of sim_ac_fw.c in the gps update
IF statement:
    printf("alt= %f time= %f lat=%f lon=%f gspeed=%f climb= %f
\n",alt,time,lat,lon,gspeed,climb);
    cout << "finished a gps loop!" << endl;
to see what happened during the simulation. When I run the simulation,
this is what happens before takeoff:
.....
Simulation delta 0.017
Initialization from flight plan successful!!
Passed jsbsim_init
Broadcasting on network 127.255.255.255, port 2010
Passed ivy_transport_init
Passed autopilot_init
Passed GMainLoop creation
Passed g_timeout_add
alt= 672.500000 time= 0.000000 lat=0.934212 lon=1.766669
gspeed=0.000000 climb= 0.000000
finished a gps loop!
alt= 672.500000 time= 0.000000 lat=0.934212 lon=1.766669
gspeed=0.000000 climb= 0.000000
finished a gps loop!
alt= 672.500000 time= 0.000000 lat=0.934212 lon=1.766669
gspeed=0.000000 climb= 0.000000
finished a gps loop!
Invalid_argument("Latlong.of_utm")
alt= 672.500000 time= 0.000000 lat=0.934212 lon=1.766669
gspeed=0.000000 climb= 0.000000
finished a gps loop!
Invalid_argument("Latlong.of_utm")
alt= 672.500000 time= 0.000000 lat=0.934212 lon=1.766669
gspeed=0.000000 climb= 0.000000
finished a gps loop!
......... (and it continues)

Note that my basic.xml flightplan starts like this:
<flight_plan alt="743" ground_alt="668" lat0="53.526418"
lon0="-113.525683" max_dist_from_home="1500" name="Basic"
security_height="25">

After takeoff --> launch buttons:

finished a gps loop!
Invalid_argument("Latlong.of_utm")
Invalid_argument("Latlong.of_utm")
DETECT LAUNCH!
Invalid_argument("Latlong.of_utm")
alt= 668.773061 time= 0.187000 lat=0.934216 lon=1.766669
gspeed=191.571936 climb= -10.420492
finished a gps loop!
Invalid_argument("Latlong.of_utm")
Invalid_argument("Latlong.of_utm")
Invalid_argument("Latlong.of_utm")
alt= 664.905993 time= 0.238000 lat=0.934217 lon=1.766668
gspeed=166771165678573428146176.000000 climb=
347535870923624740290560.Invalid_argument("Latlong.of_utm")
Invalid_argument("Latlong.of_utm")
Invalid_argument("Latlong.of_utm")
Invalid_argument("Latlong.of_utm")
000000
finished a gps loop!
alt= 664.905993 time= 0.238000 lat=0.934217 lon=1.766668
gspeed=166771165678573428146176.000000 climb=
347535870923624740290560.Invalid_argument("Latlong.of_utm")
Invalid_argument("Latlong.of_utm")
Invalid_argument("Latlong.of_utm")
000000
finished a gps loop!
.......(and it continues in this way)

Something clearly is not working out well.

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).

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,..........).

Are you using the current github code or have you made significant
changes to your code along the way to make jsbsim work?

Any other ideas on what the matter may be?

Sorry to keep bothering with this. It has been quite frustrating,
though I am getting to know more about paparazzi at least.

Thanks,
-Stephen


On Wed, Feb 9, 2011 at 1:04 AM, Andreas Gäb <address@hidden> wrote:
> Am 09.02.2011 08:37, schrieb Stephen Dwyer (off list):
>>
>> I still can't get the jsbsim simulation to work correctly for me,
>> sadly. I can get the airframe to compile for the jsbsim target, but
>> things fall apart when I try to run the simulation. I press
>> takeoff->launch and the flightplan block changes, and altitude and
>> velocity go nuts (ie reaches mach, altitude varies by hundreds of
>> thousands).
> this might be due to an altitude mismatch (srtm available or not,
> flightplan alt and ground alt). You might be initializing below the
> ground. I had this case once, so my gear springs were compressed by an
> amount equal to the terrain elevation, giving the airframe enough
> momentum to leave the earth for outer space... You can check this by
> logging the following properties in your JSBSim output:
>  position/h-agl-ft
>  position/h-sl-ft
>  position/terrain-elevation-asl-ft
>
> Best regards,
>        Andreas
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>



reply via email to

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