Landing Altitude and HGS setting display

Has anyone found out how to adjust these two items without using a mouse. I have been trying using the Variables map and the Interface codes and LINDA but cannot get them to work. I tried using the Lvars quoted for the Landing Altitude gauge using a rotary encoder but the needle just jumped randomly all round the dial. I used the codes and values for the HGS to set up button instructions but when the buttons were pressed nothing happened to the values on the little screen on the Centre Pedestal. Any help will be gratefully accepted .

Comments

  • Hi,

    The landing altitude is handled in the XML interface via the variable

    Air_->controls.landing_altitude_input

    The calculation from feet to the value which you write into this variable is a bit tricky, if you read the documentation of that field. In LUA you could use a function like this to get the value from feet:

    function LdgAlt (pAlt)
    
        local lAlt = 65535 * ( 1 -( pAlt + 2000 ) / 16000 )
    
        if lAlt > 65535 then
            lAlt = 65535
        end
    
        if lAlt < 0 then
            lAlt = 0
        end
    
        return lAlt
    
    end
    

    In the documentation you find, that the range is from 0 (14000ft) to 0xFFFF (-2000ft).

    Rgds
    Reinhard

  • Hi,

    For the HGS I would try to use the XML variable HGS_->HUDControls.keyInput
    According to the documentation you must send the number listed after each command to trigger the key:

    HGSPANEL_KEY_MODE 1
    HGSPANEL_KEY_STBY 2
    HGSPANEL_KEY_RWY 3
    HGSPANEL_KEY_GS 4
    HGSPANEL_KEY_CLR 5
    HGSPANEL_KEY_BRT 6
    HGSPANEL_KEY_DIM 7
    HGSPANEL_KEY_ENTER 8
    HGSPANEL_KEY_TEST 9
    HGSPANEL_KEY_0 10
    HGSPANEL_KEY_1 11
    HGSPANEL_KEY_2 12
    HGSPANEL_KEY_3 13
    HGSPANEL_KEY_4 14
    HGSPANEL_KEY_5 15
    HGSPANEL_KEY_6 16
    HGSPANEL_KEY_7 17
    HGSPANEL_KEY_8 18
    HGSPANEL_KEY_9 19

    I personally did not test this so I don't now, if it works. To fire the mode switch I would try to send a one to this control via the XML interface.

    Rgds
    Reinhard

  • Thank you for your input. I will use the LUA function for the landing altitude and I managed to solve the HUD problem as you suggested.

Sign In or Register to comment.