March 21, 200620 yr 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
March 21, 200620 yr 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..." Jan "Beatus ille qui procul negotiis..."
March 21, 200620 yr 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
December 16, 200718 yr 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?
December 16, 200718 yr Commercial Member 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 AviationMy Playland - I69
December 16, 200718 yr 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
December 16, 200718 yr 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
December 16, 200718 yr Tom, thanks so much. This all makes much more sense now! I appreciate the help.
Create an account or sign in to comment