Jump to content
Sign in to follow this  
spokes2112

Displaying GPS Airports in XML gauge

Recommended Posts

Guest grb

Hi all,Firstly, here is the reason I want to attempt the following:In military jet panels such as some, e.g. F16, there is little space to fit many gauges. So when I want to track a airport that I set in the GPS gauge, I must keep the GPS gauge "visible". So what I seek is a way to put a few XML gauges that simply display the airport name, bearing, and distance in small windows I can squeeze into the panel. So what I hope can be done is open the GPS map, enter name of an airport, then close the GPS map window and see the airport name, bearning, and distance in three the three small xml gauges I place in the panel.Problem. I am not sure what Parameter to use in the XML gauge that represents the GPS Airport (assigned via. the GPS map gauge).The only thing I have found thus far, I believe it was a Parameter list Arne Barltels had created a few years back buried in one of his C gauge zip files....... Shows:GPS_APPROACH_AIRPORT_IDI also see other parameters that start with GPS_ but they do not seem appropriate for use for the actual airport name assigned to the GPSmap gauge.In this file list I see GPS_WP_ETA, GPS_WP_ETE, GPS_WP_BEARING also. So I assume one can access these parameters for display in gauges.Here is an example of one thing I tried to do.Airport:%((A:GPS_APPROACH_AIRPORT_ID,string))%!s! ------------------------------------------OK, in my panel, I clearly see an area in the panel that displays the "Airport:" part of the string which is specified in the gauge, with plenty of room left in the greyish window to display lets say KVBG should it become avaiable.Next. I click on my icon to bring up my GPS Map gauge. Select KVBG.All data for this airport shows up in the GPS Map such as To,Dist,Brg,ETA,ETE etc...However I do not see anything show up in my test5.xml guage window area. I only see a "0" after the "Airport" part of the string.Assumption:I assume that once one selects an airport in the GPS Map gauge, then whatever the "To" parameter is should be set in the simulator and available for use by other gauges.Is this a correct assumption?I assume in this case, the GPS_APPROACH_AIRPORT_ID parameter is a character string as it is displayed in the GPS Map gauge for the "To"parameter. AND that once whatever the parameter is that actually represents a given airport, that it then is available to other qauges.I probably am wrong. And that is why I am asking if someone knows the correct A/P Parameters to use that would represent what one sees in the GPS Map gauges for:ToDISTBRGETAETEAny help would be appreciated. George

Share this post


Link to post
Share on other sites

I assume that the "destination" airport can only be assigned to the GPS is via the flight planner -> Load plan. I am also assuming you are using the "direct to" function in the GPS to enter your airport as you need fit. If thats the case, use the following as they should become the active waypoint once the direct-to becomes active.Not tested.. (A:GPS WP BEARING, )(A:GPS WP DISTANCE, )(A:GPS WP ETA, ) (A:GPS WP ETE, )(A:GPS WP NEXT ID, ) or (A:GPS WP PREV ID, ) ????? Regards,Roman(KGRB)


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest grb

Hello Roman,I tried a number of variations on how I make the xml code based on some of your above suggested parameters. None work, where I either do one of the following:1) create a flight plan, using the GPSDirecto option. OR2) call up the GPS.GAU and enter a given airport.Not to appear over verbose. Below is a typical piece of code:%((A:GPS WP BEARING))%!d!%OR%((A:GPS WP BEARING,))%!d!%OR%((A:GPS WP NEXT ID,string))%!s!%A few things that I think may be wrong.1. I am not assigning the correct type string arguments to a given para.For instance. What should BEARING be calculated as? OR is the parameterGPS WP NEXT ID really a string value? If not it is easy to see why nothing will show up in the xml text area. What I see most often in the many variations I have tried to create the code is the the end result is I will see a "0" in the text field in the panel. As one example If the gauge's code is:GPS: %((A:GPS WP NEXT ID,string))%!s!%The result in the panel would be:GPS: 0.Also, for the ETE,ETA, one would definetly have to format the numbers/strings to into a XX:XX:XX format. Which I have not attempted as of yet. I figured until I can display a valid ICO airport code then get a distance and bearing for it, no use wasting time with figuring out how then one would have to format the times readings.So as of this point I have not gotten an favorable results. I also tried GPS_IS_ACTIVE_WAY_POINT, just for the heck of it.One thing. I wonder if all the "GPS" parameters which include "WP" followed by further classification are meant to be used with gauges that actually calculate and display waypoint information such as the gauge used in the Boeing 707-E3 orbiting AWACS plane which has a rather exotic INS/ADF Panel. Where one can program waypoints, tracks, have ETA's, bearings, distances etc., displayed. In short a pretty nice Inertial Navigation System on that FS2002 plane.In summary. I do not have all the information required for how to format these particular GPS oriented parameters for display in XML gauges. I don't know for instance if lets say the one for DISTANCE is indeed a normal decimal number, a floating point, or something different. I have tried doubles, floating, integer etc.. to no avail.But one thing in mind mind that seems to be required is for one to include some form of parameter type inside the double brakets, like this: ((A:parameter,X)) Where X might be string, pounds,radians,feet, etc.. So I am not sure what has to go in that field for these GPS type parameters. Also I notice in a XML Gauges document I downloaded that perhaps the parameter type might be critical here. For instance, A for aircraft. E for environmental.P for Program Related. So I will try to replace the A with a P, and see what happens.So I am simply getting back to you out of respect for your initial effort to help. I am not asking you to do homework for me. However if you or some other reader have information on these type parameters, and how to use them (format them for display etc.) obviously I and other readers would benefit from the resultant effort as how to use this parameters for display in panels.Thanks for your help.George

Share this post


Link to post
Share on other sites

Whoa.... Is this FS2002 or FS2004 ? The above stuff will work for 04 not 02. For FS02 it will need to be done in the C language only and the variables I mentioned may not even be valid.Regards,Roman(KGRB)


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest grb

Roman,I appreciate your feedback. Yea. It is for FS2002. So much for that.Interestingly, the variables you suggested have been available for a few years. The documents I have on XML show them listed in table lists for A parameters, for use by c programmers, long before FS004 was around. But as I indicated above, I don't think the GPS gauges written in C, used those you suggested for the Airport destination, and it's associated bearing,distance,eta,ete, etc..I think the variables have different names, that do no include the "wp"part. Because Waypoints are a distinctly different thing then what is viewed in the GPS.GAU for a destination airport. At any rate, thanks again for your earlier suggestions.Cheers,George

Share this post


Link to post
Share on other sites

Yes, even in the SDKs there are "clues" that what may be coming around. I in FS 02 if my 3 brain cells remember:-) the particular variables are listed but "in my testing at that time" didn't work, XML wise. There are even clues now, BTW... Did you know that the stock FS9 GPS can do vertical nav IE VNAV. but the problem is there is no front end to make it "user" friendly? If someone wants to check this out I can private mail the code.. "No Instructions perse", Very bad at writing them. it does work though..... Regards,Roman(KGRB)


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest grb

Roman,I have been trying little things in XML for the past three years or so. I quickly get turned off, and only go back when I get despirit to try to create a gauge such as outlined here. This stuff is quite brutal. Imagine if AT&T Bell Labs never created any books on the early C programming language. We would have no telephone services (switching sytsem computers ran on UNIX using huge amounts of C code for applications etc..). This XML stuff is very sad. Of course Microsoft has been a sad state of affairs since 1980. Jerks!As for as your question regarding "FS9 GPS...vertical nav IE VNAV.."Have no idea as to what you are talking about! Ha ha. Your light years ahead of me on this stuff. Hope you can continue succesfully building some exotic gauges. Nothing like a little bit of success once in a while. Tis good for the spirit.cheers,George

Share this post


Link to post
Share on other sites

>There are even clues now, BTW... Did you know that the stock>FS9 GPS can do vertical nav IE VNAV. but the problem is there>is no front end to make it "user" friendly? If someone wants>to check this out I can private mail the code.. "No>Instructions perse", Very bad at writing them. it does work>though.....A very old message, Roman... but, if your offer of the code is still valid, I'm interested... ;)n4gix@comcast.net


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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