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: Andy Walls
Subject: Re: [gpsd-dev] Possible error report
Date: Fri, 08 Nov 2013 12:21:04 -0500


On Fri, 2013-11-08 at 11:41 -0500, Eric S. Raymond wrote:
> Andy Walls <address@hidden>:
> > 
> > 
> > On Fri, 2013-11-08 at 10:21 -0500, Eric S. Raymond wrote:
> > > Andy Walls <address@hidden>:

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

http://lists.gnu.org/archive/html/gpsd-users/2013-10/msg00034.html

"FWIW, the manual for my Trimble Condor device (which I suspect is a
custom MT-3329 device) is here:

http://www.trimble.com/embeddedsystems/condor-gps-module.aspx?dtID=documentation

See pages 123-140 of the Users guide for the proprietary NMEA sentences."


The documentation on the actual pulse width setting itself sucks.

"Packet Type: 324 PMTK_API_SET_OUTPUT_CTL
Packet meaning 
Write the TSIP / antenna / PPS configuration data to the Flash memory.
DataField [Data0]:TSIP Packet[on/off]
          0 - Disable TSIP output (Default).
          1 - Enable TSIP output.
          [Data1]:Antenna Detect[on/off]
          0 - Disable antenna detect function (Default).
          1 - Enable antenna detect function.
          [Data2]:PPS on/off
          0 - Disable PPS function.
          1 - Enable PPS function (Default).
          [Data3]:PPS output timing
          0 - Always output PPS (Default).
          1 - Only output PPS when GPS position is fixed.
          [Data4]:PPS pulse width
          1~16367999: 61 ns~(61x 16367999) ns (Default = 69)"

Really, the documentation for the "Data4" field is hardly clear.


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

See above.  The documentation is terrible.  69 is the default pulse
width setting.  The best I can figure using an oscilloscope, is that it
is in units of 16.368000 MHz clock cycles.  It may be different for any
other unit other than the Trimble Condor.

69 cycles / 16368000 cycles/sec = 4.216 microseconds


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

I chose it because to divides 16368000 nicely and the pulse width is
close to 1/100th of a second.  Any number the user wants to use would be
fine.

127875 cycles / 16368000 cycles/second = 1/128 seconds = 7.8125 milliseconds

Regards,
Andy

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







reply via email to

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