Jump to content
Sign in to follow this  
Guest rkruijer

AIRPORT ID

Recommended Posts

Guest rkruijer

These are looking good Jan, I'll try them.(@c:NearestAirportCurrentIdent, string)gives me the airport IDI tried to put that in an (>L:AirportID,string) but that does not work.I expect that there are 4 numbers on the stak, Ascii values. 69 72 65 77, or HEX values 45 48 41 4DThe program needs to be able to compare this with "EHAM"How do you go about that? Is there anything known on string manipulation and or comparrison in XML like left-, right-, substring(), chr() etc.?There's more to it than I thought. :-( Roelof

Share this post


Link to post
Share on other sites

Hi,I know this one from another thread (Rob Barendregt):(A:GPS WP NEXT ID,string) 'EGSS' scmp !if{ }Returns "0" when strings are equal, "1"when not equal.So, try:(@c:NearestAirportCurrentIdent,string) 'EHAM' scmp ! if{ }You cannot save the string in a L:Var.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Guest rkruijer

Thanks Jan. I had completely forgotten about the A:varsLast time GPS APPROACH AIRPORT ID did not work but when I get that working I don't have to go through the motion of this gps.dll There is quite a list of gps a:vars >Hi,>>I know this one from another thread (Rob Barendregt):>>(A:GPS WP NEXT ID,string) 'EGSS' scmp !>if{ }>>Returns "0" when strings are equal, "1">when not equal.>>So, try:>>(@c:NearestAirportCurrentIdent,string) >'EHAM' scmp ! if{ }>>You cannot save the string in a L:Var.>>>Jan

Share this post


Link to post
Share on other sites
Guest BFG

Apologies for digging up an old thread! I'm working on a similar gauge to the above one, and I also have the problem of the IDs only showing up when they feel like it. The long/lat always shows.Sometimes loading another aircraft and reloading the one with the gauge helps, sometimes the ID just won't display at all. But then occasionally it pops up just fine.Does anyone know why this is happening?

Share this post


Link to post
Share on other sites

Based on the name of the variable I'd hazard the guess that it only has a value when you have the ability to load an approach into the GPS.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
Guest BFG

Just to clarify, I'm using this code to test:---------------------------------------------C:fs9gpsC:fs9gps(A:GPS POSITION LAT, Radians) (>@c:NearestAirportCurrentLatitude, Radians)(A:GPS POSITION LON, Radians) (>@c:NearestAirportCurrentLongitude, Radians)1 (>@c:NearestAirportMaximumItems)2 (>@c:NearestAirportMaximumDistance, NMiles) %Ident %((@c:NearestAirportCurrentIdent,string))%!s! %ICAO %((@c:NearestAirportCurrentICAO,string))%!s! %LAT %((A:GPS POSITION LAT, Radians) rddgdnor)%!3.5f!%LON %((A:GPS POSITION LON, Radians) rddgdnor)%!3.5f!-----------------------------------------------The output I get is: Ident IcaoLAT 47.43149LON 237.69200Very occasionally I'll get: Ident KSEA Icao K SELAT 47.43149LON 237.69200or something similar. Is there something that needs to be started/initialized other than what is in the xml?EDIT: After loading about 10 other aircraft and then reloading the aircraft with the gauge, it suddenly shows: Ident KSEA Icao A KELAT 47.43149LON 237.69200

Share this post


Link to post
Share on other sites

Hi,The whole set of "Nearest" properties/variables (ie NearestAirports, NearestVor, etc) is processed asyncronically through gps.dll, just to avoid freezing the sim with long searchs. Therefore their results are shown only after the retrieve is completed. Until then no value is displayed.As an example, the property/variable "NearestAirportItemsNumber,number" can be tested for a value of greater than 0 to find the moment when this info is available.Tom

Share this post


Link to post
Share on other sites
Guest BFG

Tom, thanks so much. This all makes much more sense now! I appreciate the help.

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...