On Fri, 2007-08-31 at 20:02 +0200, Timothy Moore wrote:
> Ron Jensen wrote:
> > On Fri, 2007-07-06 at 02:00 +0200, gh.robin wrote:
> > 
> >> Thanks John,
> >>
> >> Yes the patch has vanished , probably in the vacuum space  :)
> >>
> >> Because your patch  is only a simple extension of the existing table  it 
> >> could 
> >> be commit without any risk.
> >>
> >> Regards
> > 
> > Hi,
> > 
> > I freshened this patch to extend the altimeter from 62,000 ft to 100,000
> > ft.  gh.robin and I have both reviewed it and recommend it be committed.
> > 
> > Thanks,
> > 
> > Ron
> > 
> 
> Committed; thanks
> Tim

Andy asked me to patch src/FDM/YASim/Atmosphere.cpp to match these
changes to src/Environment/environment.cxx.

The attached patch should do that...  Could someone who flies YASIM
airplanes try this at high altitude (above 65K feet).

Thanks,

Ron

Index: src/FDM/YASim/Atmosphere.cpp
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/FDM/YASim/Atmosphere.cpp,v
retrieving revision 1.2
diff -u -r1.2 Atmosphere.cpp
--- src/FDM/YASim/Atmosphere.cpp	2 Mar 2003 01:43:39 -0000	1.2
+++ src/FDM/YASim/Atmosphere.cpp	1 Sep 2007 04:10:21 -0000
@@ -7,35 +7,50 @@
 // McCormick lists 299.16/101325/1.22500, but those don't agree with
 // R=287.  I chose to correct the temperature to 288.20, since 79F is
 // pretty hot for a "standard" atmosphere.
-//                             meters   kelvin      Pa   kg/m^3
-float Atmosphere::data[][4] = {{ 0.0f,     288.20f, 101325.0f, 1.22500f },
-			       {   900.0f, 282.31f,  90971.0f, 1.12260f },
-			       {  1800.0f, 276.46f,  81494.0f, 1.02690f },
-			       {  2700.0f, 270.62f,  72835.0f, 0.93765f },
-			       {  3600.0f, 264.77f,  64939.0f, 0.85445f },
-			       {  4500.0f, 258.93f,  57752.0f, 0.77704f },
-			       {  5400.0f, 253.09f,  51226.0f, 0.70513f },
-			       {  6300.0f, 247.25f,  45311.0f, 0.63845f },
-			       {  7200.0f, 241.41f,  39963.0f, 0.57671f },
-			       {  8100.0f, 235.58f,  35140.0f, 0.51967f },
-			       {  9000.0f, 229.74f,  30800.0f, 0.46706f },
-			       {  9900.0f, 223.91f,  26906.0f, 0.41864f },
-			       { 10800.0f, 218.08f,  23422.0f, 0.37417f },
-			       { 11700.0f, 216.66f,  20335.0f, 0.32699f },
-			       { 12600.0f, 216.66f,  17654.0f, 0.28388f },
-			       { 13500.0f, 216.66f,  15327.0f, 0.24646f },
-			       { 14400.0f, 216.66f,  13308.0f, 0.21399f },
-			       { 15300.0f, 216.66f,  11555.0f, 0.18580f },
-			       { 16200.0f, 216.66f,  10033.0f, 0.16133f },
-			       { 17100.0f, 216.66f,   8712.0f, 0.14009f },
-			       { 18000.0f, 216.66f,   7565.0f, 0.12165f },
-			       { 18900.0f, 216.66f,   6570.0f, 0.10564f }};
+// Numbers above 19000 meters calculated from src/Environment/environment.cxx
+//                                meters   kelvin      Pa     kg/m^3
+float Atmosphere::data[][4] = {{ -900.0f, 293.91f, 111679.0f, 1.32353f },
+                               {    0.0f, 288.11f, 101325.0f, 1.22500f },
+                               {  900.0f, 282.31f,  90971.0f, 1.12260f },
+                               { 1800.0f, 276.46f,  81494.0f, 1.02690f },
+                               { 2700.0f, 270.62f,  72835.0f, 0.93765f },
+                               { 3600.0f, 264.77f,  64939.0f, 0.85445f },
+                               { 4500.0f, 258.93f,  57752.0f, 0.77704f },
+                               { 5400.0f, 253.09f,  51226.0f, 0.70513f },
+                               { 6300.0f, 247.25f,  45311.0f, 0.63845f },
+                               { 7200.0f, 241.41f,  39963.0f, 0.57671f },
+                               { 8100.0f, 235.58f,  35140.0f, 0.51967f },
+                               { 9000.0f, 229.74f,  30800.0f, 0.46706f },
+                               { 9900.0f, 223.91f,  26906.0f, 0.41864f },
+                               {10800.0f, 218.08f,  23422.0f, 0.37417f },
+                               {11700.0f, 216.66f,  20335.0f, 0.32699f },
+                               {12600.0f, 216.66f,  17654.0f, 0.28388f },
+                               {13500.0f, 216.66f,  15327.0f, 0.24646f },
+                               {14400.0f, 216.66f,  13308.0f, 0.21399f },
+                               {15300.0f, 216.66f,  11555.0f, 0.18580f },
+                               {16200.0f, 216.66f,  10033.0f, 0.16133f },
+                               {17100.0f, 216.66f,   8712.0f, 0.14009f },
+                               {18000.0f, 216.66f,   7565.0f, 0.12165f },
+                               {18900.0f, 216.66f,   6570.0f, 0.10564f },
+                               {19812.0f, 216.66f,   5644.0f, 0.09073f },
+                               {20726.0f, 217.23f,   4884.0f, 0.07831f },
+                               {21641.0f, 218.39f,   4235.0f, 0.06755f },
+                               {22555.0f, 219.25f,   3668.0f, 0.05827f },
+                               {23470.0f, 220.12f,   3182.0f, 0.05035f },
+                               {24384.0f, 220.98f,   2766.0f, 0.04360f },
+                               {25298.0f, 221.84f,   2401.0f, 0.03770f },
+                               {26213.0f, 222.71f,   2087.0f, 0.03265f },
+                               {27127.0f, 223.86f,   1814.0f, 0.02822f },
+                               {28042.0f, 224.73f,   1581.0f, 0.02450f },
+                               {28956.0f, 225.59f,   1368.0f, 0.02112f },
+                               {29870.0f, 226.45f,   1196.0f, 0.01839f },
+                               {30785.0f, 227.32f,   1044.0f, 0.01599f }};
 
 // Universal gas constant for air, in SI units.  P = R * rho * T.
 // P in pascals (N/m^2), rho is kg/m^3, T in kelvin.
 const float R = 287.1f;
 
-// Specific heat ratio for air, at "low" temperatures.  
+// Specific heat ratio for air, at "low" temperatures.
 const float GAMMA = 1.4f;
 
 float Atmosphere::getStdTemperature(float alt)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to