Hi - I posted this question on the MSFS Forums a few days ago before I realised this forum existed.
I am attempting to set AP_ALT_VAR_SET_ENGLISH, or something equivalent to set autopilot altitude. It works fine on the default 747, but behaves differently on e.g. the default Cessna 172 G1000.
Here is the code:
simconnect.MapClientEventToSimEvent(EVENT_ID.ALT, "AP_ALT_VAR_SET_ENGLISH");
simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, EVENT_ID.ALT, 5000, EVENT_ID.GROUP, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
simconnect.MapClientEventToSimEvent(EVENT_ID.ALTINC, "AP_ALT_VAR_INC");
simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, EVENT_ID.ALTINC, 100, EVENT_ID.GROUP, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
When I run this code with the default Boeing 747 it works as expected, setting the altitude selector to 5000, then increasing it to 5100.
When I run this code with the default Cessna 172 G1000, AP_ALT_VAR_SET_ENGLISH will either increment or decrement the altitude by 1000, depending on the size of the value I set. The AP_ALT_VAR_INC does work on the Cessna.
Here’s what happens when I try to set these values using AP_ALT_VAR_SET_ENGLISH:
10 → decrements set altitude by 1000
100 → decrements by 1000
1000 → decrements by 1000
2000 → decrements by 1000
4000 → increments by 1000
10000 → increments by 1000
20000 → increments by 1000
40000 → increments by 1000
3000 does nothing and there seems to be smaller incremental changes for numbers near 3000 e.g. 2999.
I'm trying to get the ability to set the autopilot settings across as many planes as possible and so far am a bit stumped by setting altitude.
I am attempting to set AP_ALT_VAR_SET_ENGLISH, or something equivalent to set autopilot altitude. It works fine on the default 747, but behaves differently on e.g. the default Cessna 172 G1000.
Here is the code:
simconnect.MapClientEventToSimEvent(EVENT_ID.ALT, "AP_ALT_VAR_SET_ENGLISH");
simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, EVENT_ID.ALT, 5000, EVENT_ID.GROUP, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
simconnect.MapClientEventToSimEvent(EVENT_ID.ALTINC, "AP_ALT_VAR_INC");
simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, EVENT_ID.ALTINC, 100, EVENT_ID.GROUP, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
When I run this code with the default Boeing 747 it works as expected, setting the altitude selector to 5000, then increasing it to 5100.
When I run this code with the default Cessna 172 G1000, AP_ALT_VAR_SET_ENGLISH will either increment or decrement the altitude by 1000, depending on the size of the value I set. The AP_ALT_VAR_INC does work on the Cessna.
Here’s what happens when I try to set these values using AP_ALT_VAR_SET_ENGLISH:
10 → decrements set altitude by 1000
100 → decrements by 1000
1000 → decrements by 1000
2000 → decrements by 1000
4000 → increments by 1000
10000 → increments by 1000
20000 → increments by 1000
40000 → increments by 1000
3000 does nothing and there seems to be smaller incremental changes for numbers near 3000 e.g. 2999.
I'm trying to get the ability to set the autopilot settings across as many planes as possible and so far am a bit stumped by setting altitude.