gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] [gpsd newbie] Wrong time using Ublox


From: Gary E. Miller
Subject: Re: [gpsd-users] [gpsd newbie] Wrong time using Ublox
Date: Thu, 17 Mar 2022 12:21:30 -0700

Yo Michele!

On Thu, 17 Mar 2022 10:36:47 +0100
Michele <mbertoni@inogs.it> wrote:

> Why date to Jan 2000? Why using ntpdate instead ntpd? Why not taking
> a look to cell phone? Why usingwww.timeanddate....?

It works better when you answer one questions at a time.  You never
really answered any of them.

> Ok, let's say I'm using (several) Raspberry pi for data analysis on
> acceleration/deformation on buildings during earthquakes,

OK.

> I need to
> collect data at 200 samples per second,

I hope yuo have really good IMUs.  Very few work that fast.

> I need all devices to be
> synced.

So about 5 milli second of offset is too much.  Just on the edge of
what NTP can do on ethernet.


> I need at least all devides inside a same building eith the
> same time, ntp is not accurate as GPS but I'll solve this later....

Unless each ntpd has a GPS, which is easy with a Pi, if you can
get a GPS signal.

> Using Raspberry pi, even if no internet connection available, I get
> different date depending of OS version installed, it could be one
> says "22 Oct 2019" while other "12 Dec 2020".

Nothing to do with the OS, it hass to do with your Real Time Clock (RTC).
Or, in the case of the Raspberry Pi, the lack of an RTC.  Thus the need
for NTP.

> System can't know if
> date is real or fake, that's why as first step I set date to 1 Jan
> 2000,

Bad idea.  Why not 2022?  Why not the last shutdown time, like the
package swclock does for you on the RasPi.

> acquisition can't start if date is before 2020 (for
> compatibility on previous system).

Better to never waste data.  Once you set the clock properly, you
can go back and adjust the early data.  But, to keep it simple to start,
that works.  But still, why 2019 instead of 2020?

> I made tests using industrial ntp server on my devices but I can't
> install industrial ntp server on every house,

Sure you can.  Many of the "industrial ntp servers" are just Raspberry
Pis.  And you hahve Raspberry Pis, jsut add GPS.

> that's why I moved to
> ntp server using Raspberry: on our tests NTP misalignment (using
> Raspberry ntp server) compared to GPS was within 10ms.

That is terrible.  You should be able to easily get better than 10 micro
seconds.

> During these tests I manually update time in my scripts using ntpdate
> (that's also for compatibility for old systems I used before), I also
> need to manage hardware signals every time I sync.

Using ntpdate is part of your problem.  You need to use ntpd on all
the clients.

> As reference device I use MikroTik routers for debug: inside there is
> ntp client telling me time misalignment, ntp next time poll, logs and
> so on.

Same as any ntpd client will give you.  Mikrotic is just FOSS.

> Using industrial ntp server I always get time misalignment of
> fews milliseconds (obviously except first sync),

Not good, but common until you get your configuration right.

You need to stop using ntpdate, and just run ntpd everywhere.  Then
send us the configfile you are using, and the results of ntpmon
on the server and clients.  Plus details of your GPS, how it is
connected, how your PPS is conencted, etc.

> using Raspberry NTP
> server I often get about 4 seconds misalignment at third sync,

ntpd will take almost a day to settle to the accuracy you need.  You
need a lot more patience.

> that's
> why this makes me think about flags of Ublox:

Nope, gpsd configure the u-blox as required.  Very few need to tweak their
GPS, and only after their results are 1x6 better than you have now.
Forget about that foe nwo.

Details of you GPS model, firmware version, how the GPS is connected,
are all more important to start.

> I observed this on NEO
> 6M logs.

A u-blox 6?  Throw that away right now.  Go to at least an 8.  A 9
is overkill.

> For coarse comparison I use several websites (such
> timeanddate and others), I can understand misalignment within 1
> second among websites and my NTP but I get up to 4 seconds
> misalignment...

Very, very, few websites provide accurate time.  Your best bet is to
get an good ntpclient for you cell phone.  That will get you down to
10's of milli seconds.

> My ntp.conf is that I usually find on NTP server examples (my Pi is
> offline, I'll post it as soon as possible).

The cgps doc is littered with differnt ntp.conf examples.  Send us
the results of ntpmon, or "ntpq -p", and we can deducae a lot of
issues.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgp2z2DUWRgiE.pgp
Description: OpenPGP digital signature


reply via email to

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