On 02/11/2007 11:29 PM, Dave Perry wrote: > By the way, I agree that the current algorithm in altimeter.cxx is > wrong. This evening, I had time to look at your posted patch and I > think it would give the right hi.
It is, for now, restricted to the troposphere (36000 feet and below). Extending it would be straightforward ... but see remarks below. > It does require two calls to ln() and > exp() (i.e. the pow function). Have you thought of just using the C > term in equation (15) and PA = pressure altitude which is already being > computed. That would only require one call to pow(). Or since > > C = ( hi offset from PA) > > only varies with S, compute a replacement table for delta h in terms of > S and interpolate that table. Then current hi = PA + interp(S). I considered that, but: 1) It's only a factor-of-two improvement, and 2) This code ought not exist at all. It's hard for me to get excited about optimizing something that needs to be thrown out and redesigned. It does not make sense for altimeter.cxx to be implementing its own model of the atmosphere; instead it should be making a structured call to some sort of atmosphere model module. This and related issues are discussed at http://www.av8n.com/fly/fgfs/README.altimetry.html That document has more questions than answers; if anybody has answers please let us know. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel