I should have mentioned that the altimeter in my local source code is connected to the 
reported air pressure, rather than just an artificial conversion of the FDM's known 
altitude.  This is what I have in steam.cxx to find the static pressure:


#ifdef FG_WEATHERCM
        sgVec3 plane_pos = { cur_fdm_state->get_Latitude(),
                             cur_fdm_state->get_Longitude(),
                             cur_fdm_state->get_Altitude() * SG_FEET_TO_METER };
        double static_inhg = WeatherDatabase->get(plane_pos).AirPressure *
            (0.01 / INHG_TO_MB);
#else
        double static_inhg = 
globals->get_environment_mgr()->getEnvironment().get_pressure_inhg();
#endif

        set_lowpass ( & the_STATIC_inhg, static_inhg, dt ); 


It was working OK with WEATHER_CM, but not now with the new Environment.  
FGEnvironment::get_pressure_inhg() is returning a ridiculously tiny number.

By the way, I have just stepped through this and I noticed that 
FGEnvironmentMgr::getEnvironment returns a _copy_ of the environment object, which 
involves setting up new interpolation tables.  Wouldn't it be more appropriate to 
return a reference to it?

- Julian



Julian Foad wrote:
> 
> The altimeter seems to be broken at the moment.  /steam/altitude-ft shows a huge, 
>unchanging, random value for me, and the instrument (on more than one aircraft) just 
>stays at zero.

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

Reply via email to