gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH 1/2] Remove call to leastsquares in graph code. Th


From: Eric
Subject: Re: [gpsd-dev] [PATCH 1/2] Remove call to leastsquares in graph code. This is not used at all
Date: Tue, 5 Jan 2016 04:16:39 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

Gary E. Miller <address@hidden>:
> Yo Sanjeev!
> 
> I seem to think I remember esr was trying to prove something with the
> least squares.  I'll leave this for him to comment on.
> 
> On Sat,  9 May 2015 10:41:24 +0800
> Sanjeev Gupta <address@hidden> wrote:
> 
> > Since URC corrections are in infrequent discrete jumps of 1s,
> > it makes no sense to try and graph trends and error bars.  Residual
> > errors, if any, should be plotted with respect to DUT1.
> > 
> > This patch removes the call, next patch will remove dead code.
> > ---
> >  leapsecond.py | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > diff --git a/leapsecond.py b/leapsecond.py
> > index b7de5a0..2de3a2e 100755
> > --- a/leapsecond.py
> > +++ b/leapsecond.py
> > @@ -292,14 +292,9 @@ def unix_to_iso(tv):
> >  def graph_history(filename):
> >      "Generate a GNUPLOT plot of the leap-second history."
> >      raw = fetch_leapsecs(filename)
> > -    (b, c, e) = leastsquares(zip(range(len(raw)), raw))
> > -    e /= (60 * 60 * 24 * 7)
> >      dates = map(lambda t: time.strftime("%Y-%m-%d",
> > time.localtime(t)), raw) enddate = time.strftime("%Y-%m-%d",
> > time.localtime(raw[-1]+16416000)) # Adding 190 days to scale fmt = ''
> > -    fmt += '# Least-squares approximation of Unix time from
> > leapsecond is:\n'
> > -    fmt += 'lsq(x) = %s * x + %s\n' % (b, c)
> > -    fmt += '# Maximum residual error is %.2f weeks\n' % e
> >      fmt += 'set autoscale\n'
> >      fmt += 'set ylabel "GPS-UTC (s)"\n'
> >      fmt += 'set yrange [-1:%d]\n' % (len(dates))

I was.  I was trying to find out if the GPS epoch number could be
backed out of the magnitude of the current drift.  Alas, it was not to be.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

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