[Xastir] NMEA GPS data duplication

Tom Russo russo at bogodyn.org
Wed Jul 1 16:32:31 EDT 2009


On Wed, Jul 01, 2009 at 04:09:41PM -0400, we recorded a bogon-computron collision of the <lburton at mrow.org> flavor, containing:
> That could/would work (assuming the signalling is still happy).. but I'd prefer to do it in software, esp since I only have one serial port on the machine (yes yes, USB serial.. but I already have the data..).. 

Yeah, that's annoying that you'd have to feed the same data twice.  But there's
a few good reasons to do it that way instead.

> It probably wouldn't be too hard to hack something together with socat/remserial.. just need to be able to send the NMEA data out of Xastir over TCP or UDP or a pipe.. then socat/remserial can create a pty to access it ..
> Time to poke Xastir's source code :)

Really, streaming the GPS data from a D700 is a pretty sub-optimal thing.  
The D700 can only pass one type of NMEA sentence at a time --- it is set by
the "GPSTEXT" command.

If you watch the packet monitor on the D700 in APRS mode, you'll see that the
D700 APRS firmware is repeatedly issuing GPSTEXT commands to the TNC in
order to get it to alternate between GPRMC and GPGGA strings; this allows
the firmware get all the position, speed, and altitude data that is distributed
across multiple sentence types.  If you watch an Xastir station with a 
connected D700 and the default tnc-startup.d700 file, it's only getting GPRMC 
sentences, and will therefore be missing altitude information.  That's because 
Xastir isn't repeatedly switching the D700 between GPRMC and GPGGA sentences.

The ideal would be if the D700 passed *all* NMEA strings without being told
which one to select from the GPS stream.  But it doesn't.  And at this point,
Xastir has no way of doing periodic commands to the TNC to change the type.

So you'll get the best GPS data to your other programs if you either connect 
the GPS directly to the computer and use gpsd to share it, or use a Y cable as 
Curt suggests. Your best bet in this case is not even to use the "TNC with GPS 
on AUX port" option for the D700, just treat it like a regular TNC without a 
GPS and use the full gpsd feed instead (rather than giving Xastir two GPS 
inputs).

Trying to band-aid Xastir to stream the crippled NMEA data might get you 
part way, but you'll ultimately be dissatisfied with the incomplete data
available.  Your other programs might very well need more information than the
single sentence type can provide.

'Course, if you wanna hack for the joy of hacking, I'd understand that 
sentiment.

Speaking of the joy of hacking...
I can imagine that if you really don't want to have the GPS doubly-connected
and have a second serial port on your machine, you could possibly write a 
small hack that talks to the D700 on a serial port, sending periodic GPSTEXT 
commands to it so you get multiple NMEA sentence types out of it, periodically
send the right command to poll the GPS data, and filtering the data stream.  
You could have this hack open two PTYs, one on which it dumps all the normal 
TNC traffic and another to which it dumps GPS data.  Have Xastir connect to 
the TNC pty as a serial TNC (without GPS), and make your program take 
everything it gets from Xastir on that PTY and forward it unmodified to the 
serial port with the d700 on it.  Have gpsd connect to the other PTY, and let 
Xastir and your other GPS programs connect to the gpsd.  

Would be a PITA to do this but might be an interesting thing for a late-night 
hacking run.  And honestly, it would be a great deal easier than hacking 
Xastir to provide the GPS stream, incomplete as it is.  Xastir's interface 
code is scary to read and is pretty fragile in my experience.

> ----- Original Message -----
> From: "WE7U Curt" <archer at eskimo.com>
> To: "Xastir - APRS client software discussion" <xastir at lists.xastir.org>
> Sent: Wednesday, July 1, 2009 2:34:00 PM GMT -05:00 US/Canada Eastern
> Subject: Re: [Xastir] NMEA GPS data duplication
> 
> On Wed, 1 Jul 2009, Lee R. Burton wrote:
> 
> > Does Xastir provide GPS data to gpsd.. I know it can use data
> > _from_ gpsd.. but I am talking about GPS data coming off a GPS
> > attached directly to the TNC..?
> 
> Perhaps a "Y" cable at the point you feed data into the TNC which
> provides just two wires to another DE-9 connector, then plug that
> into a real serial port or a USB-Serial adapter and snag the data
> that way?
> 
> -- 
> Curt, WE7U.				archer at eskimo dot com
> http://www.eskimo.com/~archer
>    Lotto:  A tax on people who are bad at math. - unknown
> Windows:  Microsoft's tax on computer illiterates. - WE7U.
> The world DOES revolve around me:  I picked the coordinate system!"
> _______________________________________________
> Xastir mailing list
> Xastir at lists.xastir.org
> http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir
> _______________________________________________
> Xastir mailing list
> Xastir at lists.xastir.org
> http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
  In some cultures what I do would be considered normal. 
                                  -- Ineffective daily affirmation 




More information about the Xastir mailing list