diff --git a/Models/Instruments/ND/canvas/style.nas b/Models/Instruments/ND/canvas/style.nas
index 68886194..26b2437a 100644
--- a/Models/Instruments/ND/canvas/style.nas
+++ b/Models/Instruments/ND/canvas/style.nas
@@ -62,7 +62,7 @@ canvas.NDStyles["Airbus"] = {
adf2_frq: "/instrumentation/adf[1]/frequencies/selected-khz",
dep_rwy: "/autopilot/route-manager/departure/runway",
dest_rwy: "/autopilot/route-manager/destination/runway",
- wp_count: "autopilot/route-manager/route/num",
+ wp_count: "/FMGC/flightplan[2]/num",
level_off_alt: "/autopilot/route-manager/vnav/level-off-alt",
athr: "/it-autoflight/output/athr",
app_mode: "/instrumentation/nd/app-mode",
@@ -759,13 +759,18 @@ canvas.NDStyles["Airbus"] = {
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
is_true: func(nd) {
#var cur_wp = getprop("/autopilot/route-manager/current-wp");
+ var deg = nil;
if (nd.get_switch("toggle_true_north")) {
- var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course"));
+ var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course")) or 0;
} else {
- var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course-mag"));
+ var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course-mag")) or 0;
+ }
+ if (deg != nil) {
+ nd.symbols.wpActiveCrs.setText(sprintf("%03.0f", deg) ~ "°");
+ nd.symbols.wpActiveCrs.show();
+ } else {
+ nd.symbols.wpActiveCrs.hide();
}
- nd.symbols.wpActiveCrs.setText((deg or "")~"°");
- nd.symbols.wpActiveCrs.show();
},
is_false: func(nd) nd.symbols.wpActiveCrs.hide(),
}, # of wpActiveId.impl
diff --git a/Nasal/FMGC/flightplan.nas b/Nasal/FMGC/flightplan.nas
index 8cd23e7c..4a584789 100644
--- a/Nasal/FMGC/flightplan.nas
+++ b/Nasal/FMGC/flightplan.nas
@@ -10,6 +10,7 @@ var courseDistanceFrom = nil;
var courseDistanceFromPrev = nil;
var sizeWP = nil;
var magTrueError = 0;
+var storeCourse = nil;
var DEBUG_DISCONT = 0;
@@ -759,8 +760,15 @@ var flightPlanController = {
me.distToWpt.setValue(me.currentToWpt.courseAndDistanceFrom(curAircraftPos)[1]);
magTrueError = magHDG.getValue() - trueHDG.getValue();
- me.courseMagToWpt.setValue(me.courseToWpt.getValue() + magTrueError);
+ storeCourse = me.courseToWpt.getValue() + magTrueError;
+ if (storeCourse >= 360) {
+ storeCourse -= 360;
+ } elsif (storeCourse < 0) {
+ storeCourse += 360;
+ }
+
+ me.courseMagToWpt.setValue(storeCourse);
}
if (me.num[india].getValue() != me.flightplans[india].getPlanSize()) {
diff --git a/Systems/cfm56-sound.xml b/Systems/cfm56-sound.xml
index ca57a9a1..a460ce48 100644
--- a/Systems/cfm56-sound.xml
+++ b/Systems/cfm56-sound.xml
@@ -411,7 +411,7 @@
0
-
+