{{tag>[hardware apu archlinux leap second ntp time gps gpsdo]}}
=====Leap second (schrikkelseconde) 2016 UTC=====
====It's over!====
The 2016 leap second is over. The GPS did report the correct time, but the Heather program unfortunately not. It reported 01:00:60 instead of 00:59:60. At least we did saw the '60' second.
* ntp1.polaire.nl:
Dec 31 01:20:17 ntp1.polaire.nl ntpd[8407]: kernel reports leap second insertion scheduled
Jan 01 00:59:59 ntp1.polaire.nl kernel: Clock: inserting leap second 23:59:60 UTC
Jan 01 01:02:39 ntp1.polaire.nl ntpd[8407]: kernel reports leap second has occurred
Jan 01 01:02:39 ntp1.polaire.nl ntpd[8407]: kernel reports leap second has occurred
* Trimble Thunderbolt log:
# tow pps(sec) osc( ppb) dac(V) temp(C) sats
23:59:35 604792 8.26515e-09 0.022472 0.611401 36.727600 5
23:59:36 604793 8.43311e-09 -0.008945 0.611401 36.727600 5
23:59:37 604794 8.54155e-09 -0.001928 0.611401 36.727600 5
23:59:38 604795 8.63533e-09 0.000671 0.611401 36.727600 5
23:59:39 604796 8.7147e-09 -0.006617 0.611401 36.720154 5
23:59:40 604797 8.75872e-09 -0.008327 0.611401 36.720123 5
23:59:41 604798 8.83556e-09 0.011710 0.611401 36.720154 5
23:59:42 604799 8.85405e-09 0.000682 0.611401 36.720154 5
23:59:44 1 8.69994e-09 0.007716 0.611401 36.720154 5
23:59:45 2 8.65063e-09 0.002435 0.611401 36.720154 5
23:59:46 3 8.59314e-09 0.000077 0.611401 36.720154 5
23:59:47 4 8.53703e-09 -0.005127 0.611401 36.720154 5
23:59:48 5 8.45476e-09 -0.014400 0.611401 36.720154 5
23:59:49 6 8.37115e-09 -0.013538 0.611401 36.720154 5
23:59:50 7 8.22537e-09 -0.005261 0.611401 36.720154 5
23:59:51 8 8.02418e-09 -0.024381 0.611401 36.720123 5
23:59:52 9 7.87465e-09 -0.025426 0.611401 36.720154 5
23:59:53 10 7.71318e-09 -0.027040 0.611401 36.720154 5
23:59:54 11 7.53361e-09 -0.007596 0.611401 36.720154 5
23:59:55 12 7.387e-09 -0.022948 0.611410 36.720154 5
23:59:56 13 7.31412e-09 0.010798 0.611410 36.720154 5
23:59:57 14 7.23471e-09 0.003512 0.611410 36.720154 5
23:59:58 15 7.13773e-09 -0.011153 0.611410 36.720154 5
23:59:59 16 7.06974e-09 0.018081 0.611410 36.720154 5
23:59:60 17 6.99192e-09 -0.008905 0.611410 36.720184 5
00:00:00 18 6.85744e-09 -0.000555 0.611410 36.727600 5
00:00:01 19 6.72356e-09 0.008841 0.611410 36.720154 5
00:00:02 20 6.609e-09 -0.001964 0.611410 36.720154 5
00:00:03 21 6.5399e-09 -0.004864 0.611410 36.720184 5
00:00:04 22 6.4497e-09 -0.003391 0.611410 36.720154 5
* Heather screenshots:
* {{::20170101-utcplus1-leapsecond.png?nolink|}}
This year i'm streaming the 2016 (UTC) leap second using a view only, single application, VNC service. You can find the Lady Heather's GPS Disciplined Oscillator Control Program documentation {{ ::heather.pdf |here}}.
In The Netherlands, the leap second will take place on 00:59:60 local time, as a result of the UTC+1 timezone. So for us it will already be 2017. Happy new year!
{{:20161228-tbolt.gif|}}
//LH screenshot, leap second pending. About the north pole hole; GPS satellites orbit from 60° North to 60° South. Although the GPS signal covers the entire earth, satellite density is greater when facing the Equator than the Poles.//
The Earth Orientation Center of [[https://www.iers.org|IERS]] leap second announcement:
INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
SERVICE DE LA ROTATION TERRESTRE DE L'IERS
OBSERVATOIRE DE PARIS
61, Av. de l'Observatoire 75014 PARIS (France)
Tel. : +33 1 40 51 23 35
e-mail : services.iers@obspm.fr
http://hpiers.obspm.fr/eop-pc
Paris, 6 July 2016
Bulletin C 52
To authorities responsible for the measurement and distribution of time
UTC TIME STEP
on the 1st of January 2017
A positive leap second will be introduced at the end of December 2016.
The sequence of dates of the UTC second markers will be:
2016 December 31, 23h 59m 59s
2016 December 31, 23h 59m 60s
2017 January 1, 0h 0m 0s
The difference between UTC and the International Atomic Time TAI is:
from 2015 July 1, 0h UTC, to 2017 January 1 0h UTC : UTC-TAI = - 36s
from 2017 January 1, 0h UTC, until further notice : UTC-TAI = - 37s
Leap seconds can be introduced in UTC at the end of the months of December
or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
six months, either to announce a time step in UTC or to confirm that there
will be no time step at the next possible date.
Christian Bizouard
Head
Earth Orientation Center of IERS
Observatoire de Paris, France
====VNC====
* The VNC server address and port will be provided on request only.
=====How to install=====
====Prerequisite hardware====
* PC Engines APU, {{ :apu1.pdf |PDF Manual}}.
* Trimble Thunderbolt GPS receiver, {{ ::thunderbolt_03.pdf |PDF Manual}}.
* Active patch antenna on the roof.
====Installation====
* Make sure you have an internet connection.
* Start Arch Linux install [[pcengines_apu_archlinux_pxe|over PXE]].
* [[https://wiki.archlinux.org/index.php/installation_guide|Install Arch]].
* A rundown:
# Need to switch networks and renew lease
dhclient -r -v enp1s0 && rm /var/lib/dhcp/dhclient.* ; dhclient -v enp1s0
ping ping.xs4all.nl
timedatectl set-ntp true
timedatectl status
#Partition SSD and make the filesystem:
fdisk /dev/sda
mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt
# Create a swap file (instead of swap partition)
fallocate -l 512M /mnt/swapfile
chmod 600 /mnt/swapfile
mkswap /mnt/swapfile
swapon /mnt/swapfile
# Install Arch Linux packages
pacstrap /mnt base
genfstab -U /mnt >> /mnt/etc/fstab
# Correct the swap location in /etc/mnt/fstab
/swapfile none swap defaults 0 0
# Chroot into the new installation
arch-chroot /mnt
# Configure the time zone
ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
hwclock --systohc
# Uncomment en_US.UTF-8 UTF-8 and other needed localizations in /etc/locale.gen
locale-gen
#/etc/locale.conf
LANG=en_US.UTF-8
#Set hostname in /etc/hostname
apuarch
#/etc/hosts
127.0.1.1 apuarch.localdomain apuarch
#Configure network
#Create: /etc/systemd/network/MyDhcp.network
[Match]
Name=en*
[Network]
DHCP=ipv4
UseHostname=false
systemctl enable systemd-networkd.service
systemctl enable systemd-resolved.service
# Install OpenSSH
pacman -S openssh
systemctl enable sshd.service
# Install chrony
pacman -S chrony
#edit /etc/chrony.conf
systemctl enable chrony.service
#Generate initial ramdisk
mkinitcpio -p linux
# Set the root password
passwd root
# create aditional user accounts
#Install GRUB
pacman -S grub
#/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
#No getty on serial, because we are using the serial port for the GPS receiver.
systemctl mask serial-getty@ttyS0.service
exit
reboot
====Post install====
* Configure firewall (iptables)
* Install packages:pacman -S unzip tigervnc xterm pacman -S xorg-fonts-misc xorg-xsetroot xorg-xrandr xorg-xrdb screen tmux base-devel libx11 dos2unix rxvt-unicode unclutter
* Create the application user:useradd -d /home/heather -m heather
* Link resolv.conf:ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
* Disable IPv6 (if not needed):#/etc/sysctl.d/10-disable-ipv6.conf
# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
# Load settings / or reboot:
sysctl --system
* Remove the serial terminal settings in Grub and kernel cmdline. The GPS receiver is connected to the only (from the outside) available serial port.
====Install graphical environment====
* Log in as the application user and configure the VNC password, create normal and view-only accountvncserver
* Kill the VNC server:vncserver -kill :1
* Edit the xstartup script:''~/.vnc/xstartup'':
#!/bin/sh
# Set background to solid grey
xsetroot -solid grey
# Hide mouse when idle for 5 seconds
unclutter -idle 5 -root &
# Start terminal
urxvt
* Edit the VNC config ''~/.vnc/config'':
securitytypes=vncauth,tlsvnc
geometry=1280x1024
alwaysshared
* Warning, don't use persistent session in untrusted networks. Create (as root) ''/etc/systemd/system/vncserver@:1.service'':
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network-online.target
[Service]
Type=simple
User=heather
PAMName=heather
PIDFile=/home/heather/.vnc/%H:%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -fg %i
ExecStop=/usr/bin/vncserver -kill %i
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target:
* Enable the new VNC service:systemctl enable vncserver@:1.service
====Install Lady Heather's Disciplined Oscillator Control Program====
* Add heather user to uucp group.
* Install the application:
#as user heather:
curl -O http://www.ke5fx.com/heather/heatherx11.zip
unzip heatherx11.zip
cd heatherx11
make clean
make
* Configure application ''heather.cfg'':
#
# Lady Heather command line configuraion file
#
# Place the command line options that you want to use in this file
# with one command line option per line. Each option MUST start in column
# one with a '/', '-', '@', or '$' otherwise the line will be treated as a comment.
#
# Lines that begin with '/' or '-' set command line option values.
# Lines that begin with '$' send hex values to the receiver.
# Lines that begin witj '@' send keyboard commands (all '@' lines are copied
# to temporary keyboard script file heathtmp.scr which is then processed
# once heather has finished initializing the heardware, etc)
#
# set com port to use (note the 'u' USB option is ignored for Windows since
# Windows treats USB com devices the same as hardware serial ports). For Linux
# and macOS, use a number 1 greater than the operating system device id (e.g.
# -1u says to to use /dev/ttyUSB0) or use the -id= option to set the linux
# device name. The -ip= command line option can set the TCP/IP address of
# a remote decice on the network (local or internet)
-id=/dev/ttyS0
# force the baud rate to use here (if not set, a default value depending uoon
# the receiver type is used)
# -br=9600:8:N:1
# set the receiver type to use (-rx says to auto-detect)
# If you did not first set the baud rate, auto-detect tries 9600:8:N:1,
# 115200:8:N:1, 57600:8:N:1 and, 19200:7:E:1 in that order.
-rx
# set your local time zone to use. You can use Linux standard format: CDT6CST
#-tz=-6cst/cdt
-tz=1CET/CEST
# enable the digital clock display
-gz1
# enable the analog watch display
#-gw1
# enable the satellite position map display
#-gm1
# enable the satellite signal level display in the plot area
-gq1
-gb1
# allow ESC ESC to exit the program
-ke
# enable the singing clock (-th=4h for cuckoo clock, -th=1b for ships bells clock)
#-th=4s
#Resolution 1280x1024
-vl
# Antenna cable length
-c=-15m,.8v
# DST UK/Europe
-b=2
# Use UTC time instead of GPS time
-tu
# Official sunrise/sunset times
-sr=O
# Plot Queue
-q=2d
# View
-y=2D
# Log file
-w=tbolt.log
# Hide location
-glp
====Workaround for slow systems====
* The creation of the screen dump takes a lot of resources and will hang Heather for a couple of seconds. The next steps let you take screenshots outside of Heather.
* Install maim: pacman -S maim
* Recompile heather with setting ''leap-dump = 0;'' in the file ''heather.cpp''.
* Create a script to take screenshots, /usr/bin/maim --xdisplay=:1 /var/tmp/heather-$(date +%Y%m%d-%H%M%S-%N).png
* Run this script from cron or [[systemd_timers|systemd.timer]] as user heather.