Archived

This topic is now archived and is closed to further replies.

n4gix

GPS_FLAGS #defines

Recommended Posts

I wonder why ACES never put any #define(s) for the GPS_FLAGS variable in the gauges.h file?

// defines for GPS_FLAGS#define GPS_FLAG_ACTIVE_FLIGHT_PLAN		BIT1	//bit1 = 0x0002 1 = there is an active flight plan#define GPS_FLAG_ACTIVE_WAY_POINT		  BIT2	//bit2 = 0x0004 1 = there is an active way point#define GPS_FLAG_ARRIVED				   BIT3	//bit3 = 0x0008 1 = last waypoint reached#define GPS_FLAG_DIRECTTO_FLIGHTPLAN	   BIT5	//bit5 = 0x0020 1 = manual direct to flight plan active

Share this post


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

Because no interface to the GPS was ever supposed to be available for a C/C++ gauge. All the code in the gauges.h file that provides said access was left in by accident.

Share this post


Link to post
Share on other sites

Hi BillIf you have built a set of defines and if you're amenable, I'd like a copy of them to add into the next version of sd2gau. OTOH I could stop being lazy and do it myself... :)-Dai

Share this post


Link to post
Share on other sites
Hi BillIf you have built a set of defines and if you're amenable, I'd like a copy of them to add into the next version of sd2gau. OTOH I could stop being lazy and do it myself... :)-Dai
Um, isn't that what I just posted in the opening post? I based that off of the #define(s) for the vor.code flag #define(s) already in the default gauges.h file.

Share this post


Link to post
Share on other sites

Now, why did I have a feeling you were going to say just that? :( I had wondered if you were aware of any others. In truth, I've had those four flags set as part of a function for years - I can't remember if it's in sd2gau but if not, it will be in the next version. It's almost identical to the VOR flags function that I included in fs_functions.h in the last (but one?) version of sd2gau.-Dai

Share this post


Link to post
Share on other sites

It is not in the current sd27gau, but when I posted those #define(s) at flightsim.com in my Panel & Gauges forum, I suggested that the OP consult your document to see how you constructed a "decoder" for VOR.CODE... ;)

Share this post


Link to post
Share on other sites

So, I got curious and threw up a quick'n'dirty piece of gauge code to check the rest of the bits on the gpsflags gauge token (I assumed a single byte - I could be completely wrong again). I found that two of the unknowns (bit 4 and bit 6) responded when I loaded a simple flightplan. Bit 4 cycled between zero and one at about 500ms intervals and bit 6 held a steady one. Now, I know the best part of next-to-nothing about the GPS stuff in FS - I can't even get the Garmin 500 to switch on! - so I wondered if anyone could throw any light on the activity of these two bits and also any possible activity on bits 7 and 8 as well?-Dai

Share this post


Link to post
Share on other sites