From 30aef3eee148bb8afab989c67b7b73bb643e77c6 Mon Sep 17 00:00:00 2001 From: Gijs de Rooy Date: Sun, 29 Nov 2015 17:35:09 +0100 Subject: [PATCH] Navdisplay: magnetic variation for wind arrow by Michael Soitanen --- Nasal/canvas/map/navdisplay.styles | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nasal/canvas/map/navdisplay.styles b/Nasal/canvas/map/navdisplay.styles index 46a2305d7..aa66ecaf9 100644 --- a/Nasal/canvas/map/navdisplay.styles +++ b/Nasal/canvas/map/navdisplay.styles @@ -871,7 +871,7 @@ var NDStyles = { is_true: func(nd) { if (nd.windShown != 0) { nd.symbols.windArrow.show(); - var windArrowRot = getprop("environment/wind-from-heading-deg"); + var windArrowRot = getprop("environment/wind-from-heading-deg") - getprop("environment/magnetic-variation-deg"); if((nd.in_mode('toggle_display_mode', ['MAP','PLAN']) and nd.get_switch('toggle_display_type') == "CRT") or (nd.get_switch('toggle_track_heading') and nd.get_switch('toggle_display_type') == "LCD")) windArrowRot = windArrowRot - nd.aircraft_source.get_trk_mag(); @@ -2305,7 +2305,7 @@ var NDStyles = { predicate: func(nd) (!(nd.in_mode('toggle_display_mode', ['PLAN']) and (nd.get_switch('toggle_display_type') == "LCD"))), is_true: func(nd) { nd.symbols.windArrow.show(); - var windArrowRot = getprop("environment/wind-from-heading-deg"); + var windArrowRot = getprop("environment/wind-from-heading-deg") - getprop("environment/magnetic-variation-deg"); if(nd.in_mode('toggle_display_mode', ['MAP','PLAN'])) { if(nd.get_switch('toggle_true_north')) windArrowRot = windArrowRot - nd.aircraft_source.get_trk_tru();