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.

whiskey compass and heading trouble xml

Featured Replies

Hi,I am working on a whiskey compass where I also can see the preselected heading of the autopilot. My problem is that when the preselected heading is below 0/360 the heading indicating triangle is positioned a long way to the right instead of the left see my picture.So how can solve this problem?Best regardsEugen(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor%((A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor)%!03d!

  • Author

Eugen, Been thinking about this one all day.. Maybe this will help. You would use a non-linearity table where "zero" is in the middle and 335 on the left and 25 on the right. But you would need 2 tables, left and right. You may want the bug to disappear if greater than 25 and less than 335. (A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees, degrees) - dnor s1 335 > l1 359.9999 < &l1(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees, degrees) - dnor s1 0 > l1 25 < &l1Replace the red Xs with coordinates for left, center and right placements. Also I noticed in your string that your are finding the difference.. Would you not want the actual autopilot selected heading to be displayed ?%((A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor)%!03d!%((A:Autopilot heading lock dir, degrees))%!03d!Maybe this will help, maybe not... Not tested.. Just an idea and may be better ways. Note, the way it looks here on the forum is different since HTML has processed it. On paper the " < " would be " & l t ; " , the " > " would be " & g t ; " and the " & " would be " & a m p ; ". All without the quotes and remove spaces between characters.Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Roman,Many thanks for your dedicated support, I'll have look at it tomorrow while it is past midnight here and it is bedtime, simming late :-) Lets stay in touch Btw I had look at your 737 project screenshots looks really really good, looking forward for the release :-)BrgdsEugen

Roman,I was experimenting with the following code below to get it to work. If the value is above 180 then make it negative by subtracting 360but I did'nt manage maybee wrong syntax ? It Always chooses the second if condtion? Wonder why?(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor s1 180 <= if{ l1 } els { l1 360 - }%((A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor s1 180 <= if{ l1 } els { l1 360 - } )%!03d! Best regardsEugen

  • Author

Eugen, WOW that should work then with one ... I would still use the tag w/ the following:(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees, degrees) - dnor s1 180 <= if{ l1 } els{ l1 360 - s1 } + l1 -25 > l1 25 < &And the folllowing table: As for your problem with the if{ } els{ } the only thing I see is that you have a space ( a no no ) between the els and the {Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Hi Roman,It was the space so the code below works now :-)However one strange thing that I discovered was that -09 and above becomes 0-9 but -10 is alright see attached picture. A bug? Any idea why it happens?BrgdsEugen(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees, degrees) - dnor s1 180 <= if{ l1 } els{ l1 360 - s1 } + l1 -25 > l1 25 < &(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor s1 180 <= if{ l1 } els{ l1 360 - }

Roman,How does this "string formatting" work I have just studied the code in other gauges and done try and error I haven't really understood how it works, what is the structure and logic?BrgdsEugen

Thanks, That did it! I had missed the zipped files in Arne Bartels xml guide.An other question is there a way to get the actual track (trk) and the flight path angle fpa I saw somewhere that fs 2002 does'nt support this, is there a workaround can it be calculated?BrgdsEugen

  • Author

Hi Eugen, For flight track try (from 747-400 hsi):(A:Velocity world X, m/s) (A:Velocity world Z, m/s) atg2 (A:Magvar, radians) - (A:Plane heading degrees gyro, radians) - For FPA I truly think its possible. I made some design notes for this.. ( Damn if I can find them now ) But.... If you take the groundspeed, feet per second and apply some trig..(vertical speed ft/sec) (groundspeed ft/sec) / tan * = FPAI think that is right... My trig is lacking. But to control FPA is another story as VS is limited by the autopilot to +/- 100 Ft/min ( 1.666 Ft/sec ).. You most likely would have to have your own VS section made to control this as the ground speed changes so does the V/S rate to keep the same angle.. You could though just display current FPA in the VS window using above formula.. ( if correct )Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

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.