- Messages
- 497
- Country

I am trying to implement in a KAP140 AP, changing the ALT hold value in 20ft steps
(This happens in the RL AP, if you are in ALT mode, and press the UP / Down Buttons, as opposed to using the rotary switch, which will do 1000 and 100 ft increments .
The problem I am having, is that either
Reading AP_A:LT_VAR_SET_ENGLISH only returns Altitude Rounded to nearest 100 ft
or
Setting K:AP_ALT_VAR_SET_ENGLISH only sets the Altitude Rounded to nearest 100 ft
("Strange" rounding occurs about about xxx25 ft)
I tried keeping track of the Hold Altitude with my own ApAlt variable
I can obviously inc and dec that variable by any about , 100ft 20 ft 1 ft etc
ApAlt is the variable I am keeping track of what I want the AP Alt to be set to
var x = this.ShowStatus(this.ApAlt + "#" + this.CurrAlt); is a routine to show Variables in the Gauge (Crude -- I need the better way !!)
So it is displaying the my wanted ApAlt, and the AP read CurrAlt HOLD ALT
As I INC up the value, ApAlt increments correct by (in this case) 1 ft
But CurrAlt jumps at about APAlt = xxx25 ft and can only be in 100's of feet resolution
.
ApAlt: 3518 3519 3520 3521 3522 3523 3524 3525 3526
CurrAlt: 3500 3500 3500 3500 3500 3500 3500 3600 3600
Same happens when I DEC
So how do I set the AP to have a Hold Altitude with 20 ft resolution
(Note: Yes, I am using the Knob, not the Buttons for this test -- In RL the knob only does 1000 & 100, while the Buttons do 20 (short press) and 500 (long Press) )
(This happens in the RL AP, if you are in ALT mode, and press the UP / Down Buttons, as opposed to using the rotary switch, which will do 1000 and 100 ft increments .
The problem I am having, is that either
Reading AP_A:LT_VAR_SET_ENGLISH only returns Altitude Rounded to nearest 100 ft
or
Setting K:AP_ALT_VAR_SET_ENGLISH only sets the Altitude Rounded to nearest 100 ft
("Strange" rounding occurs about about xxx25 ft)
I tried keeping track of the Hold Altitude with my own ApAlt variable
I can obviously inc and dec that variable by any about , 100ft 20 ft 1 ft etc
case "KAP140_Knob_Inner_INC":
this.ApAlt = this.ApAlt + 1;
SimVar.SetSimVarValue("K:AP_ALT_VAR_SET_ENGLISH", "feet", this.ApAlt);
this.CurrAlt = (SimVar.GetSimVarValue("AUTOPILOT ALTITUDE LOCK VAR", "feet"));
var x = this.ShowStatus(this.ApAlt + "#" + this.CurrAlt);
break;
ApAlt is the variable I am keeping track of what I want the AP Alt to be set to
var x = this.ShowStatus(this.ApAlt + "#" + this.CurrAlt); is a routine to show Variables in the Gauge (Crude -- I need the better way !!)
So it is displaying the my wanted ApAlt, and the AP read CurrAlt HOLD ALT
As I INC up the value, ApAlt increments correct by (in this case) 1 ft
But CurrAlt jumps at about APAlt = xxx25 ft and can only be in 100's of feet resolution
.
ApAlt: 3518 3519 3520 3521 3522 3523 3524 3525 3526
CurrAlt: 3500 3500 3500 3500 3500 3500 3500 3600 3600
Same happens when I DEC
So how do I set the AP to have a Hold Altitude with 20 ft resolution
(Note: Yes, I am using the Knob, not the Buttons for this test -- In RL the knob only does 1000 & 100, while the Buttons do 20 (short press) and 500 (long Press) )






