[Xastir] Okay, so it only transmits when the GPS interface is started?

Curt Mills, WE7U hacker at tc.fluke.com
Wed Mar 5 19:18:46 EST 2003


On Wed, 5 Mar 2003, Jeff Laughlin wrote:

> I see, if I remove the GPS interface entirely, then XASTER DOES transmit my
> position. So current XASTIR behavior is:
>
> if ( gps interface exists )
> 	if ( gps interface is recieving data )
> 		beacon;
> else
> 	beacon;
>
> The CORRECT behavior IMO would be:
>
> if ( gps interface exists )
> 	if ( gps interface is UP )
> 		if ( gps interface is receiving data )
> 			beacon;
> 	else
> 		beacon;
> else
> 	beacon;
>
> Because you may bring down the GPS interface but still wish to transmit
> your position. Like I did.

Here's the relevant portion from main.c:UpdateTime():


                // Decrement the my_position_valid variable if we're
                // using GPS.  This will make sure that positions
                // are valid, as we'll only get four positions out
                // maximum per valid GPS position.  If the GPS
                // position goes stale, we'll stop sending posits.
                if (using_gps_position && my_position_valid) {
                    my_position_valid--;
//fprintf(stderr,"my_position_valid:%d\n",my_position_valid);

                    if (!my_position_valid) { // We just went to zero!
                        // Waiting for GPS data..
                        statusline(langcode("BBARSTA041"),1);
//fprintf(stderr,"my_position_valid just went to zero!\n");
                    }
                }


It looks like we stop transmitting positions if we think we have a
GPS interface configured and enabled, and we stop getting positions
from that interface.

I'll do some more checking to make sure I understand the
"using_gps_position" variable and how/when it gets set/reset.

-- 
Curt Mills, WE7U                    hacker_NO_SPAM_ at tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto:    A tax on people who are bad at math!"
"Windows:  Microsoft's tax on computer illiterates!" -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir mailing list