• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 XML Coding Mystery

As part of my autopilot control coding, the two code blocks below are used to turn the autopilot BC hold function on and off. To prevent flooding, the next to last line in the first block checks the value of (A:AUTOPILOT BACKCOURSE HOLD, bool) before turning on the BC hold function. But doing this check causes some type of conflict such that the value of (A:AUTOPILOT BACKCOURSE HOLD, bool) rapidly and continually flips back and forth between 0 and 1. It does this even if I completely remove the second code block below which turns the BC hold function off. If I remove the (A:AUTOPILOT BACKCOURSE HOLD, bool) check in the first block, everything works as intended. Nowhere else in the overall autopilot control code is BC hold turned on or off using the associated K events. I can't figure out why checking the value of (A:AUTOPILOT BACKCOURSE HOLD, bool) before turning on BC hold causes this problem. Would appreciate hearing any ideas.

(L:BC_MODE, bool)  1 ==
(L:NAV_MODE, bool)  1 == and
(A:GPS DRIVES NAV1, bool)  0 == and
(L:NAV_CAP_BC,bool) 1 == and
if{ (>K:AP_BC_HOLD_ON) }

(L:BC_MODE, bool)  0 ==
(L:NAV_MODE, bool)  0 == or
(A:GPS DRIVES NAV1, bool)  1 == or
(L:NAV_CAP_BC,bool)  0 == or
if{ (>K:AP_BC_HOLD_OFF) }
Last edited:


Resource contributor
I assume another part of your code or another gauge is turning the BC mode off? Or something is changing the values of your L: variables back and forth?
Tom, thanks for the respons.
The problem turned out to be a conflict between (>K:AP_LOC_HOLD_ON) and (>K:AP_BC_HOLD_ON). I had thought that these events 'worked together' for a back course approach with the AP_BC_HOLD_ON event basically just taking care of the CDI reverse sensing issue. But it seems AP_LOC_HOLD_ON and AP_BC_HOLD_ON are mutually exclusive and AP_BC_HOLD_ON is all that is needed for the back course approach.