Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Silly wee altitude hold problem

Featured Replies

  • Commercial Member

Can't figure this at all (scratches head).... If altitude lock is set to the current altitude (wing leveler off :( ) and I set a new altitude target, the aircraft sails merrily on at the original altitude.

send_key_event(KEY_AP_ALT_HOLD_OFF,0);send_key_event(KEY_AP_ALT_VAR_SET_ENGLISH,ap_alt_target);send_key_event(KEY_AP_ALT_HOLD_ON,0);

AUTOPILOT_ALTITUDE_LOCK_VAR confirms the new target (ap_alt_target) and AUTOPILOT_ALTITUDE_LOCK confirms that the hold is switched back on. Interestingly, giving the joystick a severe tweak hardly disturbs the aircraft at all in pitch. Does anyone have any idea which bit of the autopilot is fighting back this time?MTIA-Dai

.

Chris Koegler

Hello!That is weird, The A/C should be fliyng to the new ALT. Hard to say with no code to check, but maybe you are updating a L:var rather than (A:Autopilot altitude lock var, feet) or maybe something else is writing 0 to the V/S parameter thus the plane does not dive nor climb holding the current ALT.Javier

  • Commercial Member

..Along Javier

What was it a configuration or an XML issue?Javier

  • Author
  • Commercial Member
What was it a configuration or an XML issue?Javier
Neither :( I don't use XML (don't know how to). I had turned the VS hold off in code, done some work and turned it back on again, only FS was ignoring the command to turn it back on. To fix the problem I moved the 'turn on again' command from the middle of the code block to the end of the code block (a whole eleven lines further down) and that was it. Just another one of those 'FS thingstm'.-Dai

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.