David Megginson
2017-07-15 15:42:01 UTC
Our ADF instrument is currently unrealistic, because it's unaffected by
aircraft attitude. In reality, since the ADF can detect direction in only
two dimensions (oriented with the aircraft), the apparent direction of the
NDB transmitted should change as the aircraft banks.
There's a nice layperson's explanation online here
<http://www.pprune.org/tech-log/234057-adf-dip-error.html#post2711405> (for
the example, the aircraft heading is 45° displaced from the bearing to the
NDB):
*"The ADF is a dumb gadget and just points at the beacon. If you're wings
level and the beacon is 45 degrees from the nose, it will point 45 degrees
off the index. But imagine you are in a 30 degree turn towards the beacon.
The relative bearing reduces.*
*"Can't imagine that, well now bank to 90 degrees. The relative bearing of
the beacon is now on the nose and you are apparently pointing straight at
it. *
*"Still not got it? Well, take your coffee mug off the coaster and place it
to the right of the desk. Pick up the coaster and hold it level above your
desk. This is your aircraft. Now pick up your biro and place it on the
coaster pointing at the coffee mug (the beacon). Now bank the coaster
towrds the mug while keeping the biro pointing at the mug. What happens?
You should notice the biro turning towards the nose of the aircraft and the
relative bearing reducing. Now expalin to your wife how you got the hot
drink ring on the desk."*
I'm willing to write the code, but I need help with the formula. The
*MagCompass::update* method in src/Instrumentation/mag-compass.cxx has
what I think is an applicable formula (if we replace magnetic dip with the
vertical angle to the NDB tower), but when I wrote the module 14 years ago,
I had a lot of help and basically copied the formula from elsewhere.
Here's the formula used for the mag compass:
/*
Formula for northernly turning error from
http://williams.best.vwh.net/compass/node4.html:
Hc: compass heading
psi: magnetic heading
theta: bank angle (right positive; should be phi here)
mu: dip angle (down positive)
Hc = atan2(sin(Hm)cos(theta)-tan(mu)sin(theta), cos(Hm))
This function changes the variable names to the more common psi
for the heading, theta for the pitch, and phi for the roll (and
target_deg for Hc). It also modifies the equation to
incorporate pitch as well as roll, as suggested by Chris
Metzler.
*/
The other option, of course, is just to approximate a needle swivel and not
worry about getting it right.
Thanks!
David
aircraft attitude. In reality, since the ADF can detect direction in only
two dimensions (oriented with the aircraft), the apparent direction of the
NDB transmitted should change as the aircraft banks.
There's a nice layperson's explanation online here
<http://www.pprune.org/tech-log/234057-adf-dip-error.html#post2711405> (for
the example, the aircraft heading is 45° displaced from the bearing to the
NDB):
*"The ADF is a dumb gadget and just points at the beacon. If you're wings
level and the beacon is 45 degrees from the nose, it will point 45 degrees
off the index. But imagine you are in a 30 degree turn towards the beacon.
The relative bearing reduces.*
*"Can't imagine that, well now bank to 90 degrees. The relative bearing of
the beacon is now on the nose and you are apparently pointing straight at
it. *
*"Still not got it? Well, take your coffee mug off the coaster and place it
to the right of the desk. Pick up the coaster and hold it level above your
desk. This is your aircraft. Now pick up your biro and place it on the
coaster pointing at the coffee mug (the beacon). Now bank the coaster
towrds the mug while keeping the biro pointing at the mug. What happens?
You should notice the biro turning towards the nose of the aircraft and the
relative bearing reducing. Now expalin to your wife how you got the hot
drink ring on the desk."*
I'm willing to write the code, but I need help with the formula. The
*MagCompass::update* method in src/Instrumentation/mag-compass.cxx has
what I think is an applicable formula (if we replace magnetic dip with the
vertical angle to the NDB tower), but when I wrote the module 14 years ago,
I had a lot of help and basically copied the formula from elsewhere.
Here's the formula used for the mag compass:
/*
Formula for northernly turning error from
http://williams.best.vwh.net/compass/node4.html:
Hc: compass heading
psi: magnetic heading
theta: bank angle (right positive; should be phi here)
mu: dip angle (down positive)
Hc = atan2(sin(Hm)cos(theta)-tan(mu)sin(theta), cos(Hm))
This function changes the variable names to the more common psi
for the heading, theta for the pitch, and phi for the roll (and
target_deg for Hc). It also modifies the equation to
incorporate pitch as well as roll, as suggested by Chris
Metzler.
*/
The other option, of course, is just to approximate a needle swivel and not
worry about getting it right.
Thanks!
David