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.

Still don't get it! (C Whiskey Compass)

Featured Replies

Hi all,Still trying to work through the C examples from the SDK and I am confused by the whiskey compass....Looking at the code below you can see that val (used in the x direction callback) will return a value between 0 and 360.However when you look at the BMP used it is 651 pixels wide - so how does it relate? If it only moves 360 pixels in the X direction it cannot cover the whole width?!Also, at what position does the BMP start? I.e. in the make_moving macro we set 22,41 as the pos for the mask, will the top left of the moving image align to that? Any help would be much appreciated!!Cheers,Paul.FLOAT64 FSAPI wiskey_moving_card_x_cb( PELEMENT_MOVING_IMAGE pelement ){ FLOAT64 val = 360.0 - pelement->source_var_x.var_value.n; if( val >= 0 && val <= 360 ) return val; else return 0;}FLOAT64 FSAPI wiskey_moving_card_y_cb( PELEMENT_MOVING_IMAGE pelement ){ return 1.0;}MAKE_MOVING( wiskey_moving_card, BMP_COMPASS_SMALL_CARD, NULL, wiskey_fail, IMAGE_USE_ERASE | IMAGE_USE_TRANSPARENCY, 0, 22,41, WHISKEY_COMPASS_DEGREES, wiskey_moving_card_x_cb, 0, 360, MODULE_VAR_NONE, wiskey_moving_card_y_cb, 0, 0)

Have also a look at :... WHISKEY_COMPASS_DEGREES, wiskey_moving_card_x_cb, 0, 360,...it means that with return value 0 the moving card is aligned to the left of the mask image. If the return value is 360 the moving card is aligned to the right of the mask image. A value in between gives an interpolated shift. You could e.g. reverse the movement by swapping "0, 360," to "360, 0,". Because of the outer alignement, the moving card is always wider then expected, exactly the width of the mask is added (or height for vertical movement).Arne Bartels

Oh I see!So the numbers don't relate to actual pixel deflection like in XML.Thanks Arne,

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.