gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Possible error report


From: Eric S. Raymond
Subject: Re: [gpsd-dev] Possible error report
Date: Fri, 8 Nov 2013 11:41:21 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Andy Walls <address@hidden>:
> 
> 
> On Fri, 2013-11-08 at 10:21 -0500, Eric S. Raymond wrote:
> > Andy Walls <address@hidden>:
> > > My experience with the Trimble Condor is that the default PPS pulse
> > > width is about 4 microseconds.  You can send probably send a $PMTK
> > > sentence to program a wider pulse in the NVRAM settings.
> > 
> > We can, of course, send that sentence from the driver once we know
> > how it should be composed.
> 
> You don't want to send it every time.  You'll end up needlessly
> shortening the life of its NVRAM.

At worst, it would be sent once whenever the device is identified, typically
shortly after power-up.  With a little more work the setting could be
changed only as needed.  The way to do this is:

1. Send $PMTK424 at device identification time.

2. Write a handler for the $PMTK424 response that decodes the pulse
width and sends the NVRAM-altering $PMTK324 only if required. 

In fact these steps are so easy that I have already coded most of them
and pushed the change. Look near line 1108 in driver_nmea0183.c for
where the pulse-width configuration should be sent.
  
> FWIW, an end user only need do the following once for a Trimble Condor.

You are knowledgeable and obviously extremely competent.  But this 
recipe displays a fault of narrowness which I have seen in your
explanations before.

You tell the user what to do, but you omit the information required to
understand and modify the recipe.  This would leave the person trying
to follow it uncertain and helpless if things go any differently than
you tell them to expect.  

This sort of shallow explanation is nearly worse than no explanation at
all; sometimes it is *much* worse, because it can get people in trouble
that thry have no resources to get out of.

If you're not able or willing to spend the effort required to write a deeper
explanation, you should at least include a pointer to enlightening
documentation so the user has some hope of educating himself.
 
> With gpsd running, assuming the device has a 16.368000 MHz oscillator,
> and a desired PPS pulse width of 1/128 seconds (127875/16368000
> seconds):
> 
> 1. In window 1 watch for $PMTK response from the device:
> 
>       # gpspipe -r | grep '$PMTK'
> 
> 
> 2. In window 2 type this to query the current setting:
> 
>       # export FOO=`gpsctl  -t MTK-3301 -e -x '$PMTK424'`
>       # echo $FOO
>       $PMTK424*30
>       # echo $FOO > /dev/ttyS0   (or whatever serial device)
> 
> 
> 3. In window 1 observe the current setting:
> 
>       $PMTK424,0,0,1,0,69*12

This is where the trouble with this recipe starts.  What do the
fields of this response mean?  Is "69" the pulse width?  If so, what
units is it in?  Where is this sentence documented?

If I see a different number, how do I tell if it does not need to
be changed?
 
> 4. In window 2 type this to change the setting:
> 
>       # export FOO=`gpsctl  -t MTK-3301 -e -x '$PMTK324,0,0,1,0,127875'`
>       # echo $FOO
>       $PMTK324,0,0,1,0,127875*14
>       # echo $FOO > /dev/ttyS0   (or whatever serial device)

Why is 127875 the right magic number?

> 5. In window 1 observe the acknowledgment:
> 
>       $PMTK001,324,3*35
> 
> 
> 6. In window 2 type this to query the new, current setting:
> 
>       # export FOO=`gpsctl  -t MTK-3301 -e -x '$PMTK424'`
>       # echo $FOO
>       $PMTK424*30
>       # echo $FOO > /dev/ttyS0   (or whatever serial device)
> 
> 
> 7. In window 1 observe the new, current setting:
> 
>       $PMTK424,0,0,1,0,127875*13

This is exactly the sort of tedious, error-prone ritual that gpsd 
should perform for the user rather than requiring it be done by hand.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

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