Jump to content
Sign in to follow this  
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


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

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.


Ed Wilson

Mindstar Aviation
My Playland - I69

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.

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

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


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

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

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