Sign in to follow this  
Guest rkruijer

AIRPORT ID

Recommended Posts

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

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

>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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi,It doesn't exist afaik.Ment is the gps.dll in the modules folder.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

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