On Wed, 3 Nov 2004 17:57:54 -0500, Chris Metzler <[EMAIL PROTECTED]> wrote:

> Checked; I can't find a mistake.  As a third check, I ran it through
> Maple and got the same result.  It appears to have the correct
> limiting behavior for both pitch --> 0 and roll --> 0 independently.
> And the problem seems straightforward to me.

Yes, you are right.  I ran some tests with both the original equation
and yours, and they both showed the same (initially) surprising
behaviour -- at my home airport (W75.5 N45.5), on a 270 magnetic
heading and a left bank, the compass needle will suddenly snap around
180 deg.  Here are the results with your equation in Perl for
different values of phi, using theta=0, heading=270, and dip=71:

20: 270
15: 270
10: 270
5: 270
0: 270
-5: 270
-10: 90
-15: 90
-20: 90

With the original equation, which I had put in a short C program, the
discontinuity occurs later:

20: 270
15: 270
10: 270
5: 270
0: 270
-5: 270
-10: 270
-15: 270
-20: 90

The difference is probably to do with internal precision in Perl and C
libraries rather than the equations themselves.

I understand, logically, why this is happening: flying west with a
magnetic dip of 71 and a bank of 20 to the south, I have an angle of
over 90 degrees to the magnetic flow.  I think I even remember the
original article mentioning something like this, but I have no
recollection of my airplane whiskey compass swinging around 180
degrees suddenly in real life -- if there's a window tomorrow before
the low icing stuff moves in, I'll try to go up and take a look at
what actually happens.


Thanks, and all the best,


David

-- 
http://www.megginson.com/

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to