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.

GDI+ Nonlinearity Needles (C++)

Featured Replies

Hello at all!I have one Question: has anyone figured out or could anyone explain me how to Setup nonlinearity Needles in GDI+ Gauges using C++? My linearity Transformations working fine but i have no Idea how to make this for Nonlineraity. I want to draw a Needle for the Vertical Speed (Values in Range +- 6000ft) similar to the Airbus or Boeing PFD's.Thanks for your Help.RegardsSven

  • Author

>Hello at all!>>I have one Question: has anyone figured out or could anyone>explain me how to Setup nonlinearity Needles in GDI+ Gauges>using C++? My linearity Transformations working fine but i>have no Idea how to make this for Nonlineraity. I want to draw>a Needle for the Vertical Speed (Values in Range +- 6000ft)>similar to the Airbus or Boeing PFD's.>>Thanks for your Help.>>Regards>SvenIn the easiest case the scale will be split up into linear parts, depends on the type of aircraft you are modelling obviously. That way you could just define an if-construction, like:if VS between -1000 and 1000, move needle at (fictious) speed 3if VS between 1000 and 3000, move needle at speed 2 (same for negative values)if VS between 3000 and 6000, move needle at speed 1Cheers, :-beerchugEtienne :-wave

  • Moderator

In GDI+ (as well as XML "vector drawing") movement is accomplished by shifting x and/or y coordinate values by some calculated factor.For example, if you need to shift the x coordinate from 0 to 1000, and the total "distance in pixels" between 0 and 1000 is say, 300, then you will need to calculate the appropriate factor by dividing delta-pixels by the delta-value:300pix / 1000ft-min = 0.3 pix per ft-minIf the next range from 1000 to 2000 is only 200 pixels, then the factor becomes:200pix / 1000ft-min = 0.2 pix per ft-minAlternatively, you can use a similar method to calculate a rotational factor based on the degree of rotation needed for each non-linear portion of your scale.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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.