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.

Reading an NDB position in XML ??

Featured Replies

Hi,When I have tuned into an NDB and found it (ie. ADF1 NAME and ADF1 IDENT give a string value, and ADF1 SIGNAL is greater than 0), I would like to read the NDB's position.Now, judging by the name, I assumed that variable ADF1 LATLONALT would give this somehow, but whatever "unit" I read this variable with, it also reads 0 (or an empty string).Any pointers ???Thanks, Rob

  • Author

Rob, Maybe bearing, distance, own position and great-circle formula??Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Possibly. I tried several of the radio LATLONALT variables, but couldn't find anything usable. They aren't mentioned in the SDK so that might be a clue that they are not (yet?) active.Arne Bartels

  • Author

Also there are some mysterious GPS codes like;NearestNdbCurrentLongitude NearestNdbCurrentLatitudeETC.Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hi Arne,Well, there are quite some more variables not mentioned in the SDK as well, so that's not an argument :-)Note that the variable IS registered in sim1.dll (both in FS2002 AND FS2004).But I guess you are right: it's probably defined, but not used (yet).Thanks anyway.Regards, Rob

Hi Jan,The problem is: the distance isn't available for an NDB, so I need the NDB coordinates to CALCULATE that distance :-)If I knew the distance and bearing, I could calculate the position myself.Cheers, Rob

  • Author

Not sure Rob, But in the GPS you can look under NRST at the NDB page and it gives you bearing and distance to the closest 8 NDB's.This is my code currently in use:nn{lsp=5}{fnt1}ttttn{lsp=30}{fnt}%((@c:NearestNdbItemsNumber) s2 0 !=) %{if} %(0 sp1) %{loop} %(l1 (>@c:NearestNdbCurrentLine))%((@g:listCurrent) l1 == (@g:listItems) 1 == and)%{if}{blnk}%{end}%((@c:NearestNdbCurrentIdent))%!s!{nr}ntt%((@c:NearestNdbCurrentTrueBearing, degrees) (A:GPS MAGVAR, degrees) - d360)%!03d!

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hi, I had a play with your code and with the gps gauge in general, but all my readouts show zeros. Any idea what I am doing wrong?Thanks,nick

  • Author

Nick,No idea.For me it works perfect.It must show up in the original GPS too.May be the GPS/NAV switch must be on??Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Many thanks for the reply.What line of code are you using for thr line

  • Author

The whole element:(@g:currentPageNRST) 2 == (@g:currentGroup) @kNRSTPageGroup == (L:nrst,enum) 1 == and and n{lsp=5}{fnt1}tttNRST NDBtt1/2n{lsp=25}{fnt}tNAMEtBRGttDISTtFREQ @BlinkerCode(@g:listScroll)nn{lsp=5}{fnt1}ttttn{lsp=30}{fnt}%((@c:NearestNdbItemsNumber) s2 0 !=) %{if} %(0 sp1) %{loop} %(l1 (>@c:NearestNdbCurrentLine))%((@g:listCurrent) l1 == (@g:listItems) 1 == and)%{if}{blnk}%{end}%((@c:NearestNdbCurrentIdent))%!s!{nr}ntt%((@c:NearestNdbCurrentTrueBearing, degrees) (A:GPS MAGVAR, degrees) - d360)%!03d!

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hi again, I've tried your element to element code and now have no readouts at all. Obviously I am putting your code into a complete gauge coding. I also tried a simple gauge with only(@c:NearestNdbCurrentFrequency, KHz)in the string linebut just got zeroes. Are these variables, for example, @c:NearestNdbCurrentFrequency, KHzstand alone variables? I always thought they need other code and macros from the rest of the GPS gauge coding to work.Please educate me,Many thanks,nick

  • Author

Nick,I put all the GPS macro's etc. in my FMC.May be not all are necessary, but it is too much work at the moment to find out which macro's can be left out.Jan"Beatus Ille Procul Negotiis"

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.