On 09/13/09 19:22, Ron Jensen wrote: > 639 : timoore 1.28 if (elevation_ft >= ISA_def[1].height) { > 640 : SG_LOG(SG_GENERAL, SG_ALERT, "recalc_sl_temperature: " > 641 : << "valid only in troposphere, not " << elevation_ft); > 642 : return; > > > Quick question. The old code would silently ignore updating the sea > level temperature if we were above 28000 ft. This code seems to want to > spit gratuitous error messages if we get above whatever altitude > ISA_def[1].height represents.
1) As the message indicates, the altitude in question is the top of the troposphere. The layer numbers and names are documented near the top of http://www.av8n.com/physics/altimetry.htm I suppose the code would be improved by const int tropopause(1); ....... if (elevation_ft >= ISA_def[tropopause].height) 2) How sure are you that the error message is gratuitous? > Is calling _recalc_sl_temperature () above some vaguely defined > altitude an error that deserves to be an SG_ALERT? IMHO, yes. It seems to me that it really is an error to call _recalc_sl_temperature with a wildly out-of-range parameter. Outside the troposphere the semantics of such a call is undefined and undefinable. Perhaps it would be constructive to figure out what routine is making this call, and figure out why it is doing something that doesn't make sense. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel