Re: [Flightgear-devel] incorrect altimetry

2007-02-15 Thread Alex Perry
From: John Denker [EMAIL PROTECTED] Please do not write to me saying that SLP must equal QNH when you are flying at sea level. That's true in that narrow special case, but not representative of the general case. Supporting John's point: In real world operations, even when flying at sea

Re: [Flightgear-devel] incorrect altimetry

2007-02-15 Thread John Denker
On 02/15/2007 04:55 PM, Alex Perry wrote: More generally: It is always very important to distinguish between the facts that arise from the simulation of the planet (such as SLP and variation), and the facts that arise from simulation of the airspace (such as QNH and VOR alignment). Yes.

Re: [Flightgear-devel] incorrect altimetry

2007-02-13 Thread Durk Talsma
Dave Perry wrote: On Mon, 2007-02-12 at 21:18 -0500, John Denker wrote: When will you put this in cvs? Ha, funny joke. If you want to do the one-for-all function, the sooner the better. I hope I did not offend by poking, reading, and questioning. I know I like it when

Re: [Flightgear-devel] incorrect altimetry

2007-02-12 Thread Dave Perry
On Mon, 2007-02-12 at 01:41 -0500, John Denker wrote: 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,

Re: [Flightgear-devel] incorrect altimetry

2007-02-12 Thread Dave Perry
On Mon, 2007-02-12 at 11:33 -0500, John Denker wrote: Overnight I thought of a non-disgusting way to optimize the code. A new, muuuch better patch is now at: http://www.av8n.com/fly/fgfs/altimeter.diff The new patch gets the right answer without calling any transcendental functions.

Re: [Flightgear-devel] incorrect altimetry

2007-02-12 Thread Dave Perry
On Mon, 2007-02-12 at 17:24 -0700, Dave Perry wrote: On Mon, 2007-02-12 at 11:33 -0500, John Denker wrote: Overnight I thought of a non-disgusting way to optimize the code. A new, muuuch better patch is now at: http://www.av8n.com/fly/fgfs/altimeter.diff The new patch gets the

Re: [Flightgear-devel] incorrect altimetry

2007-02-12 Thread John Denker
On 02/12/2007 07:24 PM, Dave Perry wrote: This looks really slick, :-) ... why is this patch good above the troposphere ( 100,000 ft.)? It should give the same answer as the last patch, only much more efficiently. The tabulated numbers come from a three-layer model, namely layers 0

Re: [Flightgear-devel] incorrect altimetry

2007-02-12 Thread Dave Perry
Hi John, Thanks for answering my questions. I did not realize the interpolation table was for the first three layers. On Mon, 2007-02-12 at 21:18 -0500, John Denker wrote: The tabulated numbers come from a three-layer model, namely layers 0 through 2 as defined in the table at the front

Re: [Flightgear-devel] incorrect altimetry

2007-02-12 Thread John Denker
On 02/13/2007 12:11 AM, Dave Perry wrote: I can see how you generate a table that gives PA and C(s) for layers with nonzero lapse rate. I assume you use equation (8) solved for h to generate the table when lamda = 0. Yes, equation 8, but I don't even need to solve for h. That's the

Re: [Flightgear-devel] incorrect altimetry

2007-02-11 Thread Dave Perry
On Sun, 2007-02-11 at 00:22 -0500, John Denker wrote: Both the Weather Conditions popup and the atis.cxx code rely on the pressure-sea-level-inhg property and use it in ways that the altimeter setting should be used. This is at least a misnomer, and probably a misconception. The altimeter

Re: [Flightgear-devel] incorrect altimetry

2007-02-11 Thread Dave Perry
On Sun, 2007-02-11 at 08:02 -0700, Dave Perry wrote: Have you looked for bugs? I just looked at altimeter.cxx and altimeter.hxx. The indicated-altitude-ft is the result of a LowPass (taking into account the last altitude) of an iterpolation of a table created from an array in altimeter.cxx. I

Re: [Flightgear-devel] incorrect altimetry

2007-02-11 Thread John Denker
On Sun, 2007-02-11 at 00:22 -0500, John Denker wrote: Both the Weather Conditions popup and the atis.cxx code rely on the pressure-sea-level-inhg property and use it in ways that the altimeter setting should be used. This is at least a misnomer, and probably a misconception. The

Re: [Flightgear-devel] incorrect altimetry

2007-02-11 Thread John Denker
On 02/11/2007 01:42 PM, I wrote: OK ... assuming by altitude they mean pressure altitude not true altitude or absolute altitude or ... Typo: I meant indicated altitude instead of pressure altitude. Pressure altitude is something else yet again. Sorry for any added confusion; this was a

Re: [Flightgear-devel] incorrect altimetry

2007-02-11 Thread John Denker
Reference: Altimetry principles. Lurid details including equations and derivations. http://www.av8n.com/physics/altimetry.htm - Using Tomcat but need to do more? Need to support web services, security? Get stuff done

Re: [Flightgear-devel] incorrect altimetry

2007-02-11 Thread Dave Perry
On Sun, 2007-02-11 at 13:42 -0500, John Denker wrote: On 02/11/2007 10:02 AM, Dave Perry wrote: So the altimeter setting is the same thing as the mean-sea-level barometric pressure. Huh? That does not follow at all. The quoted passage does not say that at all. Your own paper implies

Re: [Flightgear-devel] incorrect altimetry

2007-02-11 Thread John Denker
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

[Flightgear-devel] incorrect altimetry

2007-02-10 Thread John Denker
There is evidently at least one serious misconception in the code that calculates atmospheric pressure, altimeter settings, et cetera. This can be easily demonstrated: Park at or near the threshold of runway 33 at Aspen (KASE). Under standard conditions, observe that the altimeter reads 7820 feet