March 16, 200620 yr I would like to know the airport ID from the airport I am on.Is that possible?Found this in the panel sdk. Would that suit me? GPS APPROACH AIRPORT ID I tried to make it visible in XML%ICAO %((A:GPS APPROACH AIRPORT ID,string))%!s!Does not work. Any sugestions would be welcome. Roelof
March 16, 200620 yr Moderator The parameter is listed in the SDK as:GPS APPROACH AIRPORT IDI've never used it, so have no clue why it won't work for you...I query the fs9gps.dll directly to obtain that information, using the methods shown in the default G500 GPS. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
March 16, 200620 yr Hi,Never used it, but you can try (@c:nearestairport) or something like that from the gps.Because the nearest airport is most probably the airport you are on.Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
March 17, 200620 yr >>I query the fs9gps.dll directly to obtain that information,>using the methods shown in the default G500 GPS.> This gps_500.xml is a bit difficult to disect. :( (C:fs9gps:WaypointAirportIdent) slen 0 == if{ 0 (>@c:NearestAirportCurrentLine) (@c:NearestAirportCurrentICAO) (>@c:WaypointAirportICAO) } does @ mean it is a gps var?I suppose slen = length of string(C:fs9gps:WaypointAirportIdent) and the first part is that dllBtw Bill, did you ever make something visable from this fs9gps.dllIf you did can you show me a peace of code? That would be very welcome and possibly save me a lot of time.Roelof
March 17, 200620 yr Moderator >>>>I query the fs9gps.dll directly to obtain that information,>>using the methods shown in the default G500 GPS.>> >>This gps_500.xml is a bit difficult to disect. :( >Btw Bill, did you ever make something visable from this>fs9gps.dll>>If you did can you show me a peace of code? That would be very>welcome and possibly save me a lot of time.Ya think? ;)The @ character means it is calling a macro; a section of code that is substituted for the @xxx macro call.Yes, but there's a perfect example already here, posted yesterday!http://forums.avsim.net/dcboard.php?az=sho..._id=27226&page=Just follow the example code there, and substitute your own inquiry... Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
March 17, 200620 yr >Ya think? ;)>>The @ character means it is calling a macro; a section of code>that is substituted for the @xxx macro call.Yes I thought that but there are so many that I had the idea it ment something else. I should have known.>Just follow the example code there, and substitute your own>inquiry...That give's me a good lead. I'm as happy as pig in #### now! The only thing is......Where does this fs9gps.dll hang out?I searched C: and my FS2004 folder which is on F:I do have a fs9gps.cab but that's all :-( Roelof
March 17, 200620 yr Hi,Try: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)ICAO %((@c:NearestAirportCurrentIdent))%!s!Tested, works for me.Hope it helps,Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
March 17, 200620 yr This is really great Jan, How can I ever show my gratitude,Still searching for this fs9gps.dll though. Do you have any idea where it resides?Roelof
March 17, 200620 yr Hi,It doesn't exist afaik.Ment is the gps.dll in the modules folder.Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
March 17, 200620 yr >>>%ICAO %((@c:NearestAirportCurrentIdent))%!s!>>>Tested, works for me.>I tested it and after while it shows ICAO PXV2. Then there are also instances that it shows nothing.I am on a runway at EHAM so you expect ICAO EHAM.I will try to go for this (@c:NearestAirportCurrentICAO) (>@c:WaypointAirportICAO) tomorrow.Roelof
March 17, 200620 yr Hi,You can change in the update section:2 (More miles!!!!!! ) (>@c:NearestAirportMaximumDistance, NMiles)Then you will see an airport from farther away.Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
March 17, 200620 yr >>You can change in the update section:>>2 (More miles!!!!!! ) (>@c:NearestAirportMaximumDistance,>NMiles)>>Then you will see an airport from farther away.Thanks Jan but I am actually interested in the airport I am on. Hopefully that is considered the nearest. :-) Roelof
March 18, 200620 yr >Then you will see an airport from farther away.>>Jan>>"Beatus ille qui procul negotiis..."I've got it working. It had to do with EHAM itself. When I looked in the GPS I saw EHAM and PXV2 printed one over the other. Pressing the NRST button shows two airports in the same place.I selected another airport and it worked nicely.Thanks for the code.
March 20, 200620 yr Hello Jan,Having used the gauge for a few days I sometimes have the problem that it does not give me the ID while the situation is the same.I am not airborne or something but always on the same runway take off position.The gauge is ok because it really works but there seems to be something that it is bothered by very frequently.Is this gps_500.xml running all the time in the background or only when you use it?The Lat en Lon coordinates are always displayed. Is different from ?I suppose this code would be okC: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))%!4s! %ICAO %((@c:NearestAirportCurrentICAO, string))%!5s! %LAT %((A:GPS POSITION LAT, Radians) rddg dnor)%!3.5f!%LON %((A:GPS POSITION LON, Radians) rddg dnor)%!3.5f!
March 20, 200620 yr Hi,Use just s for a string.With formattedtext you can do a lot more, but it remains text..For Lat/Lon i use:%((A:PLANE LATITUDE,degrees) d 0 >= )%{if}%N%{else}%S%{end} %( abs d flr )%!02d! Jan "Beatus ille qui procul negotiis..."
Create an account or sign in to comment