Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: source/src/Environment atmosphere.cxx, 1.3, 1.4 atmosphere.hxx, 1.3, 1.4 environment.cxx, 1.27, 1.28 environment.hxx, 1.11, 1.12

2009-09-20 Thread John Denker
On 09/20/09 08:52, Torsten Dreyer wrote:
 Hi John,
 
 I just fixed what appeared to me as a bug:
 mixing altitude_ft and altitude_m and wrong sign when computing temperature 
 at 
 sea level from temperature at altitude. 
 Can you check and confirm that this is correct and reflects your original 
 intention?

I'm not in a position to check it at the moment.

I'm happy to take your word for it.  If the fix
looks right to you, go for it.

My code adheres to the convention that says the 
lapse is a positive number in the troposphere.  
Note the minus sign:

d(temp)/d(height) = - lambda

The opposite convention is encountered often enough
to cause all sorts of confusion.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: source/src/Environment atmosphere.cxx, 1.3, 1.4 atmosphere.hxx, 1.3, 1.4 environment.cxx, 1.27, 1.28 environment.hxx, 1.11, 1.12

2009-09-13 Thread Ron Jensen
On Sat, 2009-09-12 at 10:21 -0500, Tim Moore wrote:
 Update of /var/cvs/FlightGear-0.9/source/src/Environment
 In directory baron.flightgear.org:/tmp/cvs-serv2733/src/Environment
 
 Modified Files:
   atmosphere.cxx atmosphere.hxx environment.cxx environment.hxx 
 Log Message:
 Merge branch 'topic/atmos-merge' into next
 
 John Denker's atmosphere changes. Original commit message:
 Two-parameter physics-based model of atmosphere up to 262,467 ft i.e.
 the top of the mesosphere. Correctly exhibits the HALT phenomenon.


Index: environment.cxx
629 : curt 1.1 FGEnvironment::_recalc_sl_temperature ()
630 : {

(...)

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. 

Is calling  _recalc_sl_temperature () above some vaguely defined
altitude an error that deserves to be an SG_ALERT?

Thanks,
Ron



--
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


Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: source/src/Environment atmosphere.cxx, 1.3, 1.4 atmosphere.hxx, 1.3, 1.4 environment.cxx, 1.27, 1.28 environment.hxx, 1.11, 1.12

2009-09-13 Thread John Denker
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