On Friday 02 Apr 2004 5:19 am, Jim Wilson wrote:
> Jon Berndt said:
> > > Earlier we had a report of a reset issue on the list. It appears that
> > > the problem only affects a couple JSBSim aircraft...the c172 (all of
> > > them) and the 737. Everything else seems to trim fine.
> >
> > I wonder why this is only an issue with these aircraft ???
> >
> > > Which is why I'm calling this a JSBSim bug. If the altitude is < -9990
> >
> > and/or
> >
> > > the ground_elelvation is < -9990, would it be possible for JSBSim to
> > > not ground trim and instead go for a coffee or freeze or whatever it
> > > needs to do while the scenery system gets wound up?
> >
> > So, which one is the key? What is "altitude" in the above context? I
> > assume you are not talking about aircraft altitude ... ? What kind of
> > re-init is desired or expected?
> >
> > > In other words, rather than try and find another bandaid, what
> > > I would like to do is remove the elevation test from following code in
> > > main.cxx and let the fdm take care of itself:
> > >
> > > if ( !cur_fdm_state->get_inited() &&
> > > globals->get_scenery()->get_cur_elev() > -9990 )
> > > {
> > > SG_LOG(SG_FLIGHT,SG_INFO, "Finally initializing fdm");
> > > cur_fdm_state->init();
> > > if ( cur_fdm_state->get_bound() ) {
> > > cur_fdm_state->unbind();
> > > }
> > > cur_fdm_state->bind();
> > > }
> >
> > I'm all for "doing it right". I'm sure we can change this to make any
> > proposal work. I'm a little rusty on this stuff, though, so the more
> > input you give me the better.
>
> It's probably just ground_elev, although I notice the altitude is -9999 on
> the first pass. The init and reinit is fine, what is broken is how a
> bogus value (ground_evel of < -9990) is handled. The ground elevation
> test in the scenery code returns -9999 when the current scenery tile isn't
> loaded yet.
>
> I'm going to try testing the ground_elev in the update() call in
> JSBSim.cxx, but there are several places where elevation is looked at and
> it isn't clear to me where (or if) trouble might occur. Probably just
> checking before calling dotrim() will fix this particular issue. I would
> just ask the question, "if we knew that the elevation (and/or altitude?)
> values could be bogus, what would we do differently?" The other question I
> guess is how we define "bogus". Is "< -9990" for any value sufficient?
>
> As far as why those two aircraft not the others... I was hoping someone
> else might know :-)
>
Jim
For my enlightenment as much as anything else, will your diagnosis account for
the rotation about the y axis that one sees in the c172? It's consistent,
not random, so it comes from *somewhere*, and it's hard to see how it could
arise in a second or so if the initial rotations were all zero. Where should
I be looking in the code to learn more?
Thanks
Jonathan
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel