Jump to content
Sign in to follow this  
phjvh

Reading an NDB position in XML ??

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest bartels

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...