gpsd-dev
[Top][All Lists]
Advanced

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

[gpsd-dev] ✘ADEV of GPS Serial and PPS timing


From: Gary E. Miller
Subject: [gpsd-dev] ✘ADEV of GPS Serial and PPS timing
Date: Tue, 19 Jul 2016 11:54:35 -0700

Yo All!

With a lot of help from the time-nuts, I have an Allan Deviation plot
of GPS Serial and PPS time:

    https://rellim.com/graphs/adev.png

That is for 6 weeks of ntpd peerstats data.

Now I just gotta figure out what it means.  :-)

Eventually this should get into whatever visualizations we come up with.

For some reason this is what hard core time-nuts always want to see.

The hard part, computing the ADEV, is from Tom Van Baak's adev5 program.
Source is here: http://www.leapsecond.com/tools/adev5.c

The script to run it is trivial:

    fgrep 127.127.28.0  /var/log/ntpstats/peerstats* > tmp1.log
    sort -n < tmp1.log > tmp2.log
    awk '{print $5}' < tmp2.log > tmp3.log
    adev5 /a  0 6 .30103 < tmp3.log > adev-gps.log

    fgrep 127.127.28.1  /var/log/ntpstats/peerstats* > tmp1.log
    sort -n < tmp1.log > tmp2.log
    awk '{print $5}' < tmp2.log > tmp3.log
    adev5 /a  0 6 .30103 < tmp3.log > adev-pps.log
    gnuplot < adev.plot > adev.png

As is the plot program:

    set terminal png size 900,600

    set title "Frequency Stability"
    set title font "Arial,28"

    set xlabel "Sampling interval, τ (seconds)"
    set xlabel font "Arial,24"
    set ylabel "Allan Deviation, σ(τ)"
    set ylabel font "Arial,24"

    set logscale
    set format x "10^{%L}"
    set format y "10^{%L}"
    set zero 1e-20

    set tics nomirror scale 2
    set mxtics 10
    set mytics 10

    set style line 1 lw 2 pt 7 ps 1.2 lt rgb "blue"
    set style line 2 lw 2 pt 7 ps 1.0 lt rgb "red"
    set grid xtics ls 1 lt rgb "gray80" lw 1
    set grid ytics ls 1 lt rgb "gray80" lw 1

    set datafile separator whitespace
    set key top right box width 3

    plot "adev-gps.log" using 2:5 title 'GPS' with linespoints linestyle 1, \
         "adev-pps.log" using 2:5 title 'PPS' with linespoints linestyle 2

I'm guessing a Pythong person could recode in Python pretty quickly?
Any takers?

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

Attachment: pgpjMT1E0GgJp.pgp
Description: OpenPGP digital signature


reply via email to

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