[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Proposed 9600 baud option for gpspipe

From: IT1 Stuart Blake Tener, USNR
Subject: Re: [gpsd-users] Proposed 9600 baud option for gpspipe
Date: Fri, 28 Jun 2013 07:14:07 -0400
User-agent: Internet Messaging Program (IMP) H3 (4.3.9)


Let me start off by saying, I respect you thus far for both your knowledge and contribution to gpsd. I also agree with you with regard to the fact that for gpspipe to have the serial port code vice using stty and the "-o" option (or a pipe) when the latter is a far more broadly configurable as well as leveraging a fully debugged mechanism, removing the serial code is a better way ahead. Indeed it leaves a thinner product, less complication, and reduces the need for regression testing when new variants of gpspipe are produced in the future.

Presuming the GPS is attached to USB0 and the D700 to USB1

I did some testing and realized that I could simply do as follows:

stty -F /dev/ttyUSB0 9600 -parenb cs8 -cstopb
stty -F /dev/ttyUSB1 4800 -parenb cs8 -cstopb

sudo gpspipe -r -o /dev/ttyUSB1


sudo gpspipe -r | tee /dev/ttyUSB1

(if I want to see what is going to the D700)

my end testing will probably yield something closer to:

gpspipe -r | grep -v "{" | grep "GPGGA" | tee /dev/ttyUSB1

So as to strip out the initial burst of JSON and to only grab the positional data. I'd have more testing to do for that to work.

Now, I am also using a software called Xastir and I realized from someone else's wisdom that if I use that then it actually will put the D700 in a different mode and do all the work by sending the D700 APRS packets and listening to same. So my efforts are kind of moot if I do that, but I learned from this as I'd never thought of using stty in that way before.

Taking your suggestion into consideration, indeed it seems rather superfluous to have code inclusive that does the serial communications in gpspipe.

Thank you for the idea.

V/R and 73,

Stuart, N3GWG


IT1 Stuart Blake Tener, USNR, N3GWG (Extra), MROP

Las Vegas, NV / Boulder, CO / Philadelphia, PA / Beverly Hills, CA

(310) 358-0202 Mobile Phone
(215) 338-6005 Google Voice

e-mail: address@hidden

Quoting "Gary E. Miller" <address@hidden>:

Yo Stuart!

On Thu, 27 Jun 2013 08:07:10 -0400
"IT1 Stuart Blake Tener, USNR" <address@hidden> wrote:

After a quick non invasive look at gpspipe code, I could not see why
it spits the first batch of JSON code in "-r" mode (I only figure it
must be buried in the libgps code somewhere I guess), however, I was
able to generate some code that would offer up the 9600 baud option.

As the original author of gpspipe I'm surprised to see any serial code
sneak in there at all.  If I had been awake I would have protested
at the time.  That code does nothing that an stty and a pipe could not
do WAY better.

Given that someone snuck it in, if you are going to fix it, then
fix it right.  That means letting the user set any speed from the
comment line, not jjust 4800 or 9600.  Both are way to slow for any
modern GPS to send all the data they want to send.

Plus, any code submissions need matching doc updates.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

reply via email to

[Prev in Thread] Current Thread [Next in Thread]