diff --git a/Nasal/FMGC-b.nas b/Nasal/FMGC-b.nas
index 3399a8d8..8cdabe15 100644
--- a/Nasal/FMGC-b.nas
+++ b/Nasal/FMGC-b.nas
@@ -9,6 +9,8 @@
# IT-AUTOFLIGHT Based Autopilot #
#################################
+setprop("/it-autoflight/internal/heading-deg", 0);
+setprop("/it-autoflight/internal/track-deg", 0);
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
setprop("/it-autoflight/internal/heading-5-sec-ahead", 0);
setprop("/it-autoflight/internal/altitude-5-sec-ahead", 0);
@@ -251,7 +253,7 @@ var lateral = func {
alandt1.stop();
setprop("/it-autoflight/output/loc-armed", 0);
setprop("/it-autoflight/output/appr-armed", 0);
- var hdg5sec = int(getprop("/it-autoflight/internal/heading-5-sec-ahead") + 0.5);
+ var hdg5sec = math.round(getprop("/it-autoflight/internal/heading-5-sec-ahead"));
setprop("/it-autoflight/input/hdg", hdg5sec);
setprop("/it-autoflight/output/lat", 0);
setprop("/it-autoflight/mode/lat", "HDG");
@@ -288,9 +290,9 @@ var lat_arm = func {
}
} else if (latset == 3) {
if (getprop("/it-autoflight/custom/trk-fpa") == 1) {
- var hdgnow = int(getprop("/instrumentation/pfd/track-deg") + 0.5);
+ var hdgnow = math.round(getprop("/it-autoflight/internal/track-deg"));
} else {
- var hdgnow = int(getprop("/instrumentation/pfd/heading-deg") + 0.5);
+ var hdgnow = math.round(getprop("/it-autoflight/internal/heading-deg"));
}
setprop("/it-autoflight/input/hdg", hdgnow);
setprop("/it-autoflight/input/lat-arm", 0);
@@ -621,7 +623,7 @@ setlistener("/it-autoflight/input/toga", func {
var togasel = func {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
- var iasnow = int(getprop("/instrumentation/airspeed-indicator/indicated-speed-kt")+0.5);
+ var iasnow = math.round(getprop("/instrumentation/airspeed-indicator/indicated-speed-kt"));
setprop("/it-autoflight/input/spd-kts", iasnow);
setprop("/it-autoflight/input/kts-mach", 0);
setprop("/it-autoflight/mode/vert", "G/A CLB");
diff --git a/Systems/fmgc-drivers.xml b/Systems/fmgc-drivers.xml
index aebb9fb5..6d345f65 100644
--- a/Systems/fmgc-drivers.xml
+++ b/Systems/fmgc-drivers.xml
@@ -24,7 +24,7 @@
0
- /instrumentation/pfd/heading-deg
+ /it-autoflight/internal/heading-deg
@@ -33,7 +33,7 @@
1
- /instrumentation/pfd/track-deg
+ /it-autoflight/internal/track-deg
5.0
@@ -385,6 +385,58 @@
/instrumentation/airspeed-indicator/indicated-mach
+
+
+ HEADING DEG
+ gain
+ 1.0
+
+
+ /instrumentation/efis/mfd/true-north
+
+ /orientation/heading-deg
+
+
+ /orientation/heading-magnetic-deg
+
+ 0
+
+
+
+
+
+ TRACK DEG
+ gain
+ 1.0
+
+
+
+ /instrumentation/efis/mfd/true-north
+
+ /velocities/groundspeed-kt
+ 1
+
+
+
+ /orientation/track-deg
+
+
+
+
+ /instrumentation/efis/mfd/true-north
+
+ /velocities/groundspeed-kt
+ 1
+
+
+
+ /orientation/track-magnetic-deg
+
+ /instrumentation/pfd/heading-deg
+ 0
+
+
+
HEADING ERROR DEG
@@ -405,7 +457,7 @@
/it-autoflight/input/hdg
- /instrumentation/pfd/heading-deg
+ /it-autoflight/internal/heading-deg
-1.0
@@ -424,7 +476,7 @@
/it-autoflight/input/hdg
- /instrumentation/pfd/track-deg
+ /it-autoflight/internal/track-deg
-1.0
diff --git a/Systems/pfd.xml b/Systems/pfd.xml
index d49194ca..04344711 100644
--- a/Systems/pfd.xml
+++ b/Systems/pfd.xml
@@ -50,56 +50,6 @@
-
- Heading Deg
- gain
- 1.0
-
-
- /instrumentation/efis/mfd/true-north
-
- /orientation/heading-deg
-
-
- /orientation/heading-magnetic-deg
-
- 0
-
-
-
-
- Track Deg
- gain
- 1.0
-
-
-
- /instrumentation/efis/mfd/true-north
-
- /velocities/groundspeed-kt
- 1
-
-
-
- /orientation/track-deg
-
-
-
-
- /instrumentation/efis/mfd/true-north
-
- /velocities/groundspeed-kt
- 1
-
-
-
- /orientation/track-magnetic-deg
-
- /instrumentation/pfd/heading-deg
- 0
-
-
-
Track heading diff
gain
diff --git a/revision.txt b/revision.txt
index 9c49c9a9..4896bf67 100644
--- a/revision.txt
+++ b/revision.txt
@@ -1 +1 @@
-4004
\ No newline at end of file
+4005
\ No newline at end of file