Fix PFD typo, correct bearing could go below zero or above 360
This commit is contained in:
parent
155e710d33
commit
9e9d514cdd
2 changed files with 9 additions and 3 deletions
|
@ -1261,7 +1261,7 @@ var canvas_PFD_1 = {
|
||||||
tgt_ias = vapp;
|
tgt_ias = vapp;
|
||||||
tgt_kts = vapp;
|
tgt_kts = vapp;
|
||||||
} else if (FMGCphase.getValue() == 6) {
|
} else if (FMGCphase.getValue() == 6) {
|
||||||
vapp = getprop("/FMGC/internal/computed-speeds/clean");
|
clean = getprop("/FMGC/internal/computed-speeds/clean");
|
||||||
tgt_ias = clean;
|
tgt_ias = clean;
|
||||||
tgt_kts = clean;
|
tgt_kts = clean;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -71,10 +71,16 @@ var fplnItem = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getBrg: func() {
|
getBrg: func() {
|
||||||
return sprintf("%03.0f", math.round(fmgc.wpCourse[me.plan][me.index].getValue() - pts.Environment.magVar.getValue()));
|
me.brg = fmgc.wpCourse[me.plan][me.index].getValue() - pts.Environment.magVar.getValue();
|
||||||
|
if (me.brg < 0) { me.brg += 360; }
|
||||||
|
if (me.brg > 360) { me.brg -= 360; }
|
||||||
|
return sprintf("%03.0f", math.round(me.brg));
|
||||||
},
|
},
|
||||||
getTrack: func() {
|
getTrack: func() {
|
||||||
return sprintf("%03.0f", math.round(fmgc.wpCoursePrev[me.plan][me.index].getValue() - pts.Environment.magVar.getValue()));
|
me.trk = fmgc.wpCoursePrev[me.plan][me.index].getValue() - pts.Environment.magVar.getValue();
|
||||||
|
if (me.trk < 0) { me.trk += 360; }
|
||||||
|
if (me.trk > 360) { me.trk -= 360; }
|
||||||
|
return sprintf("%03.0f", math.round(me.trk));
|
||||||
},
|
},
|
||||||
getSpd: func() {
|
getSpd: func() {
|
||||||
return "---";
|
return "---";
|
||||||
|
|
Loading…
Add table
Reference in a new issue