On Freitag, 2. April 2004 15:13, Jim Wilson wrote:
> > Or, in other words, why should a FDM need to know that groundlevels below
> > -9990ft are an error condition of the tile loader?
>
> My response is that the Init is merely for setting up and initializing data
> structures.
Hmm, but virtually every FDM calls FGInterface::common_init() in init(). And
this one copies the initial values of the aircraft into the FDM. So if this
data is screwed up at call of init(), this screwed up data ends in the FDM.
> This should happen independent of what is on the bus. The
> updates should basically noop until all the parts it needs are initialized,
> although with something like this case it might be fine to merely delay the
> ground trimming, but go ahead and process non-external data.
Ok, I can find this is_suspended() call in the first line of
JSBSim::update(double). So I guess that this is_suspended() call should
return true as long as the remaining subsystems are not set up?
Or how is this interface supposed to know when it can start computing physics?
Ok, I have prepared all set_* calls in the JSBsim FGInterface with a
cout << <function name> << <function arguments>
to see what is different when the FDM is initialized at the first time and at
reset time.
This is the output at flightgear start:
virtual void FGJSBsim::init()
virtual void FGJSBsim::set_Longitude(double) long = 0.198215
virtual void FGJSBsim::set_Latitude(double) lat = 0.824871
virtual void FGJSBsim::set_Altitude(double) alt = 1949.82
virtual void FGJSBsim::set_V_calibrated_kts(double) vc = 0
virtual void FGJSBsim::set_Euler_Angles(double, double, double) phi = 0, theta
= 0.0074002, psi = 4.55583
virtual void FGJSBsim::set_Euler_Angles(double, double, double) phi = 0, theta
= 0.0074002, psi = 4.55583
virtual void FGJSBsim::set_Euler_Angles(double, double, double) phi = 0, theta
= 0.0074002, psi = 4.55583
virtual void FGJSBsim::set_Euler_Angles(double, double, double) phi = 0, theta
= 0.0074002, psi = 4.55583
virtual void FGJSBsim::update(double) is_suspended() 0
void FGJSBsim::do_trim()
virtual void FGJSBsim::update(double) is_suspended() 0
What we can see here is that there is no problem with agl or altitude below
-9990ft.
Also the is_suspended() call is never true.
This are the JSBSim FGInterface function entries when I press the reset menu
entry:
virtual void FGJSBsim::init()
virtual void FGJSBsim::set_Longitude(double) long = 0.198215
virtual void FGJSBsim::set_Latitude(double) lat = 0.824871
virtual void FGJSBsim::set_Altitude(double) alt = 1949.82
virtual void FGJSBsim::set_V_calibrated_kts(double) vc = 0
virtual void FGJSBsim::set_Euler_Angles(double, double, double) phi = 0, theta
= 0.0074002, psi = 4.55583
virtual void FGJSBsim::set_Euler_Angles(double, double, double) phi = 0, theta
= 0.0074002, psi = 4.55583
virtual void FGJSBsim::set_Euler_Angles(double, double, double) phi = 0, theta
= 0.0074002, psi = 4.55583
virtual void FGJSBsim::set_Euler_Angles(double, double, double) phi = 0, theta
= 0.0074002, psi = 4.55583
virtual void FGJSBsim::set_Climb_Rate(double) roc = -0.00421123
virtual void FGJSBsim::set_Gamma_vert_rad(double) gamma = -0.00082482
virtual void FGJSBsim::update(double) is_suspended() 0
void FGJSBsim::do_trim()
The set_Climb_Rate, set_Gamma_vert_rad calls are new here. And I think that
this is the problem.
The rest looks identical.
Ok, when I see this, I think that we should eliminate the duplicate calls. And
I still think that it is not the job of a specific FDM to check for an error
condition of the tile loader, even if this is not the error at the moment.
> BTW I'm not sure of your characterization of the relationship between these
> two subsystems. That was my question, is this more than just ground
> trimming?
I get more and more confused with this interface.
JSBSim, copies almost all initial conditions at the init() call and updates
these values with the ones superseeded by FGInterface::set_* calls. At the
first entry to update(double) it checks if some initial conditions have
changed and trims if required.
So how is this interface class supposed to work?
What could a FDM expect to be set up at which call to an interface function?
And where is this documented :-) ?
Greetings
Mathias
--
Mathias FrÃhlich, email: [EMAIL PROTECTED]
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel