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.

Detecting Rate of Change

Featured Replies

I would like to detect the rate at which a variable is changing and react to the rate, as opposed to the number in the variable.For instance, if I adjust the throttle too quickly, I would like to make another user defined variable dependant upon the rate it is increased, but if the throttle is adjusted slowly, there would be no impact on the second variable.Any thoughts?Steve

  • Author

Hi Steve,That's not very complicated.- Read the throttle, and save it's value in a temp variable.- In the next schedule, read the throttle again and compare with the previously saved value. Since the interval time betwen two samples is known (and fixed in in FS) you have a measure for the speed of change.(IN XML: the UPDATE FREQUENCY determines the schedue rate).If you want to make it more accurate:use either a fixed average (calculate the average over a fixed time (eg. 10 or 20 samples), or use a moving average (the average over the last x samples at any point in time).Disadvantage of using an average, is of course a "lag" in response time.Or even more complex (which eliminates this "lag"): make a predictive algoritm (so assume future values based on history); and constantly verify/adapt that.Cheers, Rob Barendregt.

RobCan you post an example of the xml code??Im lost on this one.Steve

  • Author

Steve, (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) (G:Var1) - (>G:Var2) (* Var2 contains the difference between current read throttle position and previous one *) .... .... (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) (>G:Var1) Example:if the value of G:Var2 is 2, it means that in this interval the throttle is changing at a rate of 6*2= 12 % per sec.If this doesn't make it clear, I suggest you better describe exactly what you want to accomplish.. That will make it easier to give a good example ..Cheers, Rob

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.