Tony Peden writes:
> OK, I've figured out what the problem is.
> At intialization both the altitude and runway altitude are set:
> 
> Start common FDM init
> ...initializing position...
> FGJSBsim::set_Longitude: -2.0444
> FGJSBsim::set_Latitude: 0.572695
>  cur alt (ft) =  0
> FGJSBsim::set_Altitude: 382.535
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   lat (deg) = 32.813
> ...initializing ground elevation to 382.535ft...
> common_init(): set ground elevation 382.535
> FGJSBsim::set_Runway_altitude: 382.535
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ...initializing sea-level radius...
>  lat = 32.813 alt = 382.535
> FGJSBsim::set_Sea_level_radius: 2.09052e+07
> ...initializing velocities...
> FGJSBsim::set_V_calibrated_kts: 0
> ...initializing Euler angles...
> FGJSBsim::set_Euler_Angles: 0, 0.0074002, 5.14977
> End common FDM init
> 
> However, when the altitude is changed (for whatever reason)
> the ground elevation is not reset:
> 
> fgFDMForceAltitude: 126.073
> FGJSBsim::set_Altitude: 413.625
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   lat (deg) = 32.813
> FGJSBsim::set_Sea_level_radius: 2.09256e+07
> (*) Current Altitude = 116.60 < 123.07 forcing to 126.07
>   Ground Trim
> 
> So as far as JSBSim is concerned, the ground is still 
> at 382.53 ft and the trimming routine does exactly the
> right thing with that piece of information: it lowers
> the aircraft until the gear are holding it up.

Tony,

This seems to gell with what I saw (as far as I got yesterday.)

Question: Who's responsibility is it (or should it be) to set the
runway elevation inside of FGInterface?

Traditionally we have expected anything inside FGInterface to be set
by the flight dynamics model code.  In fact, FGInterface is a base
class for JSBSim, YASim, etc. so it doesn't really even exist on it's
own in the context of flightgear.

FlightGear does maintain and update the following variable:

    scenery.get_cur_elev()

It is the variables inside of FGInterface and JSBSim/YASim/etc. that
aren't getting set properly.

So, when you are looking at it from the perspective of the FDM, it
might seem like runway elevation should be set by FlightGear, but when
you are looking at it from the perspective of the FlightGear side,
FlightGear treats the FGInterface and everything below as "read only".

In the future, the way things are going, you could think of the
FGInterface class only as being there as a convenience for JSBSim and
YASim and LaRCsim, etc.  FlightGear will not care or know of it's
existance and the interface between FlightGear and the FDM models will
be handled completely through the property manager.

At that point, it will be the responsibility of the FDM to read the
important FlightGear properties (i.e. control positions, weather,
ground elevation, etc.) and then do what ever needs to be done
internally to keep track of these and use them as inputs to the flight
and gear models.

Does that make sense?  We have started down that direction somewhat,
but after 0.7.9 I'd like to finish up reworking the interface along
these lines.

We should also investigate why FlightGear is reporting one elevation
initially and then amending it to something else later ... there's
something not quite right there either.  That investigation isn't
going to happen though before 0.7.9.

Regards,

Curt.
-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    [EMAIL PROTECTED]                  [EMAIL PROTECTED]
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to