Is System.cfg [AUTOPILOT] altimeter_altitude referencing incorrect altimeter ?
For example, take any Asobo GA plane, ie the C172 Classic:
SYSTEM.CFG
[AUTOPILOT]
altimeter_indicator = 2
=======================================
COCKPIT.CFG
[ALTIMETERS]
altimeter.0 = 1
altimeter.1 = 1
altimeter.2 = 1 ; KAP140 altimeter
altimeter.3 = 1 ; Transponder altimeter
STEAM GAUGE ALTIMETER
SimVar.SetSimVarValue("K:KOHLSMAN_INC", "number", 1);
KAP.js -------------- (Autopilot)
if (this.RightBlockCurrDisplay == 2) {
this.RightBlockReinitTime = 3000;
switch (_args[0]) {
case "KAP140_Knob_Inner_INC":
case "KAP140_Knob_Outer_INC":
SimVar.SetSimVarValue("K:KOHLSMAN_INC", "number", 2);
break;
case "KAP140_Knob_Outer_DEC":
case "KAP140_Knob_Inner_DEC":
SimVar.SetSimVarValue("K:KOHLSMAN_DEC", "number", 2);
break;
}
KT76C.js -------------- (Transponder)
getAltitude() {
return SimVar.GetSimVarValue("INDICATED ALTITUDE:3", "feet");
}
================================================
ISSUE
[AUTOPILOT]
altimeter_indicator = 2 ---- The AUTOPILOT designated Altitude Reference
altimeter.2 ; KAP140 altimeter (Autopilot)
Which implies the Autopilot will use altimeter2 in the Autopilot KAP140
(which is what it SHOULD)
But setting altimeter_indicator = 2 is actually using altimeter,"altimeter_indicator" + 1) ie the Transponder altimeter.3 ;
As it function now:
altimeter_indicator = 0 -----> altimeter.1
altimeter_indicator = 1 -----> altimeter.2
altimeter_indicator = 2 -----> altimeter.3
But clearly, it was assumed by ASOBO that altimeter_indicator = 2 -----> altimeter.2
which is how they have coded all their planes to refence the AP with altimeter.2
but is really using altimeter.3 (typically the Transponder)
BTW: The Transponder Baro "SHOULD" stay at Std Pressure 29.92, no matter what the others change to when the "B" key is pressed (another issue)
==================================================
PROOF
C172 example above
With current altimeter_indicator = 2 -- Adjust the KAP140 baro setting -- make no difference to AP altitude hold height
Set altimeter_indicator = 1 -- Adjust the KAP140 baro setting -- will adjusts AP altitude hold height
Set altimeter_indicator = 0 -- Adjust the Steam Gauge Altimeter Knob -- will adjusts AP altitude hold height
This becomes obvious when using te Baro knobs to adjust Altimeter settings
If you use the "B" key, ALL Baros are set, and the issues is not apparent.
Suggested Solution
Correct the kernel incorrect indexing.
This will make all Asobo Plane work correctly, and also 3rd party planes that assumes the 2:2 index matching, copying the Asobo Plane examples.
It would seem that a few 3rd part Plane developers have caught this, and altered their altimeter_indicator from example 2, to a working 1.
(But did they tell any other developers, or even Asobo ?).
They will need to correct their Planes if Asobo corrects the issue in the Kernel.