gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Very basic PPS question:


From: Gary E. Miller
Subject: Re: [gpsd-dev] Very basic PPS question:
Date: Tue, 22 Oct 2013 19:46:21 -0700

Yo Hal!

On Tue, 22 Oct 2013 19:27:31 -0700
Hal Murray <address@hidden> wrote:

> address@hidden said:
> > KPPS reports both edges and leaves it to the client to decide what
> > edge is important. 
> 
> How does gpsd decide which edge to use?

That turns out to be quite complicated.  Check out git head ntpshm.c
lines 900+

First the cycle time (period) is checked.  There are a lot of cases: too
short, 5hz, 1 Hz, 2 HZ and too long.

To keep it simple, I'll take the common 1Hz case.  Then the duration
since the previous edge was seen is used.

If the duration is 0 (invisible pulse, then there is no edge.  That is
used.

If the duration is less than 499 mSec, this is the 'trailing' edge
and ignored.

If the duration is between 499 mSec and 501 mSec it is a square wave
so we take the 0 to 1 edge.  Arbitrary yes, but it worked for the guy
that had it.

If the duration is greater than 501 mSec that is considered the 'leading'
edge and used.

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

Attachment: signature.asc
Description: PGP signature


reply via email to

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