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.

Dampening in C

Featured Replies

Well, to control the bank indicator I tried this:double dampening = 0.91;FLOAT64 FSAPI Attitude_Bank_cb(PELEMENT_SPRITE pelement){ FLOAT64 bank_degs; lookup_var(&bank); // MODULE_VAR defined above if(isPowerOn & isGyroPowerOn) { // Battery ON AND Gyro switch ON -track toward var_value bank_degs = bank.var_old.n * dampening + bank.var_value.n * ( 1.0 - dampening ); bank.var_old.n = bank.var_value.n; } else { // Gyro not powered -track toward 28 degrees bank bank_degs = bank.var_old.n * dampening + 28 * ( 1.0 - dampening ); bank.var_old.n = bank.var_value.n; } return bank_degs;}but while the bank indicator moves as desired with both Gyro and Battery off, the second I turn on the Battery, it starts tracking to 0 bank (level) even though the Gyro switch is OFF.Any ideas on why? This seems to be impossible given the code above. Also, I hard coded two returns in the if statement, and they worked as expected. So, must be my formula.Patrick

"&&" instead of "&" maybe?

Thanks Arne, but even after correcting this mistake it doesn't work.Hmmmm I'll look at it later today, must be something I am missing.Patrick

After being more awake, correcting the error Arne spotted for me (thanks Arne), and further testing, I have concluded that actually the code was working, only so fast, it syncs up right away, and made me think it was not working.So, I just need to play more with it.Patrick

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.