So the satellites don't get leapsecond updates? I don't understand why it
can't just be an epoch…

On Sat, Jun 9, 2018, 8:39 AM Stephan Buchert <stephanb...@gmail.com> wrote:

> To take care of the leap seconds every ~1.5 years or so, you need a day
> segmented time stamp and a three column primary key:
>
> CREATE TABLE satlog (
>     sat INTEGER,
>     day2000 INTEGER,  -- days since 2000-01-01
>     msec INTEGER,   -- milliseconds of day, just in case we ever have to
> deal with subseconds
>     snr REAL,
>     elevation REAL,
>     abc REAL,
>     def REAL,
>     PRIMARY KEY(sat, day2000, msec)
> );
>
> To find satellites and timestamps with SNR>30:
>
> SELECT sat, datetime('2000-01-01', day2000||' days', (msec/1000)||'
> seconds') FROM satlog WHERE snr>30;
>
> I'm using similar as this,with now more than  4 years of 1 s satellite
> data. Sqlite performs very well with a schema like this.
>
> (Your stream must of course be able to encode the leap seconds, otherwise
> you cannot do anything on the Sqlite level. The GNSS satellites will send
> data strictly at every s).
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to