David Megginson wrote: > I've added two new properties tied to the FGEnvironment class (you'll > see these only if you compile with --with-new-environment): > > /environment/temperature-sea-level-degc > /environment/pressure-sea-level-inhg > > I'm sticking with sea-level-equivalent values for now, because I know > that the FDM people are pretty possessive of their atmosphere models. > Later I might add properties and methods for the values at current > altitude as well.
Possesive? Heh, I hereby declare that I'd be extraordinarily happy to dump the YASim atmosphere model in favor of a standard one. The reason it's there at all is for the solver -- it's nice to be able to specify a cruise altitude instead of an air temperature and pressure, and there has to be some way to convert altitude to these values. The current model doesn't extrapolate from sea level values at all, in fact. It just stores a table of standard values. So, all other things being equal, what I'd like to see is the environment code doing all the work, and simply handing me values for temperature, pressure, and density. > We might also need a relative-humidity property. What units should > we use? Do the FDMs care about humidity? The effect of humidity is on the molar weight of the gas, and thus the density. So, yeah, a good model should include it. Compared to temperature and pressure effects, which (over typical flight regimes) can change values within 30% and 400%, respectively, humidity is a pretty low-key effect; no more than a few percent. So skipping it wouldn't hurt too much either. The way it would work would be similar to how you posit. You'd get a percentage saturation from somewhere (100% in clouds or rain, 20-50% for normal days at low altitudes near large bodies of water, 0-10% in "deserts", and guesses for everywhere else) and would use that, in combination with temperature and pressure, to look up a vapor pressure for water in a table typed in from a CRC handbook. The molecular weight of H2O is 0.625 that of air. Interpolate appropriately to get the density. Real pedants will point out that water isn't a diatomic gas like air is, and will therefore have a different specific heat ratio. This will, in turn, change the gamma values used for mach compression calculations and energy transfer in the engine models. I'd be really shocked if it actually mattered. Andy -- Andrew J. Ross NextBus Information Systems Senior Software Engineer Emeryville, CA [EMAIL PROTECTED] http://www.nextbus.com "Men go crazy in conflagrations. They only get better one by one." - Sting (misquoted) _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
