2017-07-15 15:42:01 UTC
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
the example, the aircraft heading is 45Â° displaced from the bearing to the
*"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
*"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
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
The other option, of course, is just to approximate a needle swivel and not
worry about getting it right.