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,22 +447,18 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
|
||||||
var vorheading = userHdgTru;
|
var vorheading = userHdgTru;
|
||||||
var adfheading = userHdgMag;
|
var adfheading = userHdgMag;
|
||||||
}
|
}
|
||||||
if (getprop("/instrumentation/nav[2]/heading-deg") != nil and me.get_switch("toggle_true_north") == 0) {
|
if (getprop("/instrumentation/nav[2]/heading-deg") != nil) {
|
||||||
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) {
|
|
||||||
var nav0hdg = getprop("/instrumentation/nav[2]/heading-deg") - getprop("/orientation/heading-deg");
|
var nav0hdg = getprop("/instrumentation/nav[2]/heading-deg") - getprop("/orientation/heading-deg");
|
||||||
} else {
|
} else {
|
||||||
var nav0hdg = 0;
|
var nav0hdg = 0;
|
||||||
}
|
}
|
||||||
if (getprop("/instrumentation/nav[3]/heading-deg") != nil and me.get_switch("toggle_true_north") == 0) {
|
if (getprop("/instrumentation/nav[3]/heading-deg") != nil) {
|
||||||
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) {
|
|
||||||
var nav1hdg = getprop("/instrumentation/nav[3]/heading-deg") - getprop("/orientation/heading-deg");
|
var nav1hdg = getprop("/instrumentation/nav[3]/heading-deg") - getprop("/orientation/heading-deg");
|
||||||
} else {
|
} else {
|
||||||
var nav1hdg = 0;
|
var nav1hdg = 0;
|
||||||
}
|
}
|
||||||
var adf0hdg=getprop("instrumentation/adf/indicated-bearing-deg");
|
var adf0hdg = getprop("instrumentation/adf/indicated-bearing-deg");
|
||||||
var adf1hdg=getprop("instrumentation/adf[1]/indicated-bearing-deg");
|
var adf1hdg = getprop("instrumentation/adf[1]/indicated-bearing-deg");
|
||||||
if(!me.get_switch("toggle_centered"))
|
if(!me.get_switch("toggle_centered"))
|
||||||
{
|
{
|
||||||
if(me.in_mode("toggle_display_mode", ["PLAN"]))
|
if(me.in_mode("toggle_display_mode", ["PLAN"]))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
4615
|
4616
|
Reference in a new issue