DU: Fixed VOR needles not pointing to VORs accurately
VOR needles should always use true heading, not magnetic heading as a reference, since the FGFS nav radio gives the bearings in true headings. This fixes #24
This commit is contained in:
parent
aa6ca8be1b
commit
ad45590740
2 changed files with 5 additions and 9 deletions
|
@ -447,16 +447,12 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
|
|||
var vorheading = userHdgTru;
|
||||
var adfheading = userHdgMag;
|
||||
}
|
||||
if (getprop("/instrumentation/nav[2]/heading-deg") != nil and me.get_switch("toggle_true_north") == 0) {
|
||||
var nav0hdg = getprop("/instrumentation/nav[2]/heading-deg") - getprop("/orientation/heading-magnetic-deg");
|
||||
} else if (getprop("/instrumentation/nav[2]/heading-deg") != nil and me.get_switch("toggle_true_north") == 1) {
|
||||
if (getprop("/instrumentation/nav[2]/heading-deg") != nil) {
|
||||
var nav0hdg = getprop("/instrumentation/nav[2]/heading-deg") - getprop("/orientation/heading-deg");
|
||||
} else {
|
||||
var nav0hdg = 0;
|
||||
}
|
||||
if (getprop("/instrumentation/nav[3]/heading-deg") != nil and me.get_switch("toggle_true_north") == 0) {
|
||||
var nav1hdg = getprop("/instrumentation/nav[3]/heading-deg") - getprop("/orientation/heading-magnetic-deg");
|
||||
} else if (getprop("/instrumentation/nav[3]/heading-deg") != nil and me.get_switch("toggle_true_north") == 1) {
|
||||
if (getprop("/instrumentation/nav[3]/heading-deg") != nil) {
|
||||
var nav1hdg = getprop("/instrumentation/nav[3]/heading-deg") - getprop("/orientation/heading-deg");
|
||||
} else {
|
||||
var nav1hdg = 0;
|
||||
|
|
|
@ -1 +1 @@
|
|||
4615
|
||||
4616
|
Reference in a new issue