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.

Finding deltas

Featured Replies

Does anyone have a working callback that demonstrats how they are capturing a change (delta) in a FS value like an RPM or other FLOAT64 var?I'd like to be able to check on the rate of change of some vars, and not sure the best way to do this.I have tried something like this:

FLOAT64 FSAPI TorqueNeedle_cb(PELEMENT_NEEDLE pelement){	previousTorque = currentTorque;	currentTorque = pelement->source_var.var_value.n / 163.84;	deltaTorque = currentTorque - previousTorque;	return currentTorque;}
but, of course, the change at 18hz is very small, and I'm not sure this is a good approach.What are others doing?Patrick
  • Moderator

Well, you could use a timer to set your test interval......alternatively, sometimes a simple 'counter' will suffice! ;)if (count == 20){ count = 0; do_stuff ; count++ ; }

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Roman,Thanks, I know the meaning of Deltas in mathmatics.I probably forgot to mention in my original post but I'm working in C/C++, and so I'm looking for how others are doing it in C.But, that is a great topic for those using XML.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.