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.

Distance to ADF question

Featured Replies

Dear Gauge Experts,I'd like to display the distance to ADF in my HUD but don't know how to calculate this, can anybody help me with a string?Thanks in advance.SLAMMER, Virtual Royal Netherlands Air Force

Hello SLAMMERAs in the real world distance to an NDB is not available from the ADF reciever in FS however you can get it by searching the station ident and using geocalc in the GPS module to get distance and bearing.Search for Taguilo in this forum for the relevant code to do this.

Paul EGLD

Hi,Which ADF, nearest?Then try for example:<FormattedText etc<String>%(0 (>@c:NearestNdbCurrentLine))%((@c:NearestNdbCurrentDistance,nmiles))%!2.1f!</String></FormattedText>Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

Jan and Paul,First i'd like to wish you all a happy new year and save landings. Thanks for helping me out on this one. Jan, for your question about which ADF it is any ADF that i tune in to, i've tried your string but unfortunatly the output is 0.0 on every ADF Freq.Greetz Slammer

Hi,Happy 2012 too!Did you try it with the necessary gps macro's and updates in your hud, like:<Macro Name="c">C:fs9gps</Macro>................etc.<Update Hidden="No">..............(A:PLANE LATITUDE,Radians) (>@c:NearestNdbCurrentLatitude,Radians)(A:PLANE LONGITUDE,Radians) (>@c:NearestNdbCurrentLongitude,Radians)20 (>@c:NearestNdbMaximumItems) 80 (>@c:NearestNdbMaximumDistance,NMiles)............</Update>If you just tune an ADF and expect the distance it becomes more complicated because there are a lot with same name and /or frequency.My code code only works for nearest ndb.A working way around:If you tune some ADF, it will be obvious one in the neighbourhood.Then instead of 0 (>@c:NearestNdbCurrentLine) you can use some L:Var to cycle between the available NDB'slike (L:NDB selection,number) (>@c:NearestNdbCurrentLine)You can see the ident and distance on the screen, but that will change because another one will take the place of the chosen, cause you 're flying and distances will vary.Naturally you need somewhere on the hudpanel a knob to cycle between the numbers like:<Click Kind="LeftSingle+RightSingle" Repeat="Yes">(M:Event) 'LeftSingle' scmp 0 == if{ (L:NDB selection,number) 1 - 0 max (>L:NDB selection,number) }(M:Event) 'RightSingle' scmp 0 == if{ (L:NDB selection,number) 1 +20 min (>L:NDB selection,number) }</Click>Succes!Jan

Edited by phjvh

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

Jan,Thanks, i'm going to work it out.Ed

Hi,tested this code and it works:

<Macro Name="c">C:fs9gps</Macro><Update>(A:PLANE LATITUDE,Radians) (>@c:NearestNdbCurrentLatitude,Radians)(A:PLANE LONGITUDE,Radians) (>@c:NearestNdbCurrentLongitude,Radians)20 (>@c:NearestNdbMaximumItems) 160 (>@c:NearestNdbMaximumDistance,NMiles)</Update><String>%((@c:NearestNdbCurrentIdent))%!s!n%((@c:NearestNdbCurrentDistance,nmiles))%!2.1f!</String><Click Kind="LeftSingle+RightSingle">(M:Event) 'LeftSingle' scmp 0 ==if{(L:NDB Select,enum) 1 - 0 max (>L:NDB Select,enum)(L:NDB Select,enum) (>@c:NearestNdbCurrentLine)}(M:Event) 'RightSingle' scmp 0 ==if{(L:NDB Select,enum) 1 + 20 min (>L:NDB Select,enum)(L:NDB Select,enum) (>@c:NearestNdbCurrentLine)}</Click>

Jan

Edited by phjvh

Jan

 

 

 

"Beatus ille qui procul negotiis..."

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.