[ntp:questions] Using Trimble TSIP under Linux

Martin Burnicki martin.burnicki at meinberg.de
Fri Nov 2 12:29:25 UTC 2012

Rob wrote:
> Martin Burnicki <martin.burnicki at meinberg.de> wrote:
>> What you say sounds also reasonable. However, the requirement for the
>> minimum pulse length should only depend on on the pulse length the UART
>> requires to detect the slope at the DCD input, which should be *much*
>> less than 100 ms. So my comment was just a little bit provocative. ;-)
> The problem is that there is no efficient way to "wait" for a pulse
> edge that waits only on a rising or falling edge.  There is an ioctl
> that waits for any edge, and when it returns gpsd has to read the current
> state of the pulse input to see if that was a rising or a falling edge.
> (the ioctl returns 2 times per second and we want to look only at one
> of those 2)
> So, it should be guaranteed that between the edge of the pulse and
> the reading of its status (from a user process that competes for CPU
> in a multitasking system!) the line does not change again.
> This simply cannot be guaranteed for a 10 microsecond pulse, which is
> what the Trimble receiver sends.

OK, this makes sense.

> While 100ms is much longer than what is required, it is what other
> makes of GPS receiver often send by default.  It is a convenient value
> to work with, as there is little chance that the user process handling
> the pulse will not be scheduled within 100ms.
> The pulse should be stretched, and whether it is stretched to 10 or
> 100 or 300ms does not really matter.  As long as it is not more than
> 400ms or so, because it would confuse the autodetection of the active
> edge that is present in gpsd (which assumes that the mark of the
> second occurs at the leading edge of the pulse).
>> Of course, if you are using an USB-to-serial converter and simply apply
>> the PPS signal via the USB connection it depends on which time the chip
>> inside the converter needs to detect the slope and send an appropriate
>> USB message "DCD changed" to the operating system's driver.
> USB-to-serial makes it more complicated, but I'm not sure if it works
> at all, because gpsd relies on the availability of the TIOCMIWAIT
> ioctl for the serial device.  I think it is not implemented for all
> USB serial drivers.
> But anyway, the abovementioned restriction also applies in this case.



Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont

More information about the questions mailing list