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: Gary E. Miller
Subject: Re: [gpsd-dev] [PATCH 1/2] Remove call to leastsquares in graph code. This is not used at all
Date: Fri, 8 May 2015 19:53:37 -0700

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




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



reply via email to

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