gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Print offset in ntpshmmon?


From: Miroslav Lichvar
Subject: Re: [gpsd-dev] Print offset in ntpshmmon?
Date: Thu, 30 Apr 2015 17:27:40 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Apr 28, 2015 at 11:59:06AM -0700, Gary E. Miller wrote:
> > > > > -                    offset = (float(record[3]) -
> > > > > float(record[4]))
> > > > > +                    offset = float(record[4])
> > > > 
> > > > Both are pretty bad....
> > > 
> > > You're the expert.  Please fix it.

> I have expected for some time that we would need to move to some sort
> of arbitrary precision math, like decimal.Decimal or gmp. 

You can also keep the timestamps in nanoseconds, using long integers.

But would be pystripchart able to display the data without losing
precision?

Offset is normally close to zero. I think printing the offset in
ntpshmmon as a double and parsing it as a float in ntpshmviz would be
fine.

-- 
Miroslav Lichvar



reply via email to

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