Appendices: diagrams, glossary, resources#

Full architecture diagram#

────────────────────────────── PHYSICAL SPACE ──────────────────────────────

                ┌───────────────────────────────────────────────────────┐
                │  GNSS constellations (GPS, Galileo, GLONASS, Beidou)  │
                └───────────────────────────────────────────────────────┘
                                            │
                                            ▼ electromagnetic waves
                                  ┌──────────────────┐
                                  │  Active antenna  │
                                  └──────────────────┘
                                            │
                                            ▼ coax 50 Ω (~5 ns/m)
                              ┌───────────────────────────┐
                              │       GNSS receiver       │
                              │  NMEA/UBX + PPS hardware  │
                              └───────────────────────────┘

─────────────────────────────── RASPBERRY PI ───────────────────────────────

                                            │
                  ┌─────────────────────────┴─────────────────────────┐
                  │ UART                                          PPS │
                  ▼                                                   ▼
           ┌─────────────┐                                  ┌───────────────────┐
           │  /dev/gps0  │                                  │     pps-gpio      │
           │   (NMEA)    │                                  │  (kernel module)  │
           └─────────────┘                                  └───────────────────┘
                  │                                                   │
                    ASCII                                 rising edge
                  ▼                                                   ▼
      ┌──────────────────────┐                                 ┌─────────────┐
      │         gpsd         │                                 │  IRQ pps0   │
      │  (Core 0, Nice -10)  │                                 │  (FIFO 99)  │
      └──────────────────────┘                                 └─────────────┘
                  │                                                   │
                  └─────────────────────────┬─────────────────────────┘
                                            ▼
                      ┌──────────────────────────────────────────┐
                      │        chronyd  (Core 1, FIFO 98)        │
                      │    median filter, PLL, ratelimit, NTS    │
                      └──────────────────────────────────────────┘
                                            │
                            ┌───────────────┴───────────────┐
                            ▼                               ▼
                  ┌──────────────────┐           ┌─────────────────────┐
                  │  CLOCK_REALTIME  │──────────►│       phc2sys       │
                  │  (system clock)  │           │  (Core 1, FIFO 90)  │
                  └──────────────────┘           └─────────────────────┘
                            │                               │
                            │                               ▼
                            │                        ┌─────────────┐
                            │                        │  /dev/ptp0  │
                            │                        │    (PHC)    │
                            │                        └─────────────┘
                            │                               │
                            └───────────────┬───────────────┘
                                            ▼
                             ┌────────────────────────────┐
                             │      NTP/NTS clients       │  network interface (Core 2, hardware timestamping)
                             └────────────────────────────┘

gpsd (CPUAffinity=0, Nice=-10) and chronyd (CPUAffinity=1, FIFO scheduling at priority 98) are each explicitly pinned, in the GNSS/PPS acquisition and Chrony chapters respectively. See the core and interrupt allocation diagram in the Firmware chapter for the full 4-core picture.

Glossary#

TermDefinition
StratumNTP hierarchy level: distance (in hops) from a physical reference. Stratum 1 = directly attached to a reference clock.
PPSPulse Per Second: a precise electrical pulse emitted every second by a time reference (GNSS receiver, atomic clock).
PHCPTP Hardware Clock: a hardware clock embedded in a network card, used for hardware packet timestamping.
NTSNetwork Time Security (RFC 8915): an encrypted, authenticated extension of the NTP protocol.
PREEMPT_RTA Linux kernel patch making kernel critical sections preemptible, for “near” real-time behavior.
RMS offsetStandard deviation of the synchronization error measured by chrony, a precision metric.
SkewFrequency drift of the local oscillator, in parts per million (ppm).
GNSSGlobal Navigation Satellite System: generic term covering GPS, Galileo, GLONASS, BeiDou.
DOPDilution Of Precision: a measure of the geometric quality of the visible satellite constellation.
conntrackLinux’s connection-tracking subsystem, can be bypassed for a stateless protocol like NTP.
tmpfsA filesystem living entirely in RAM, volatile across reboots.

Resources and references#

RFCs and normative specifications#

  • RFC 5905, Network Time Protocol Version 4: Protocol and Algorithms Specification, D. Mills et al., 2010.
  • RFC 8915, Network Time Security for the Network Time Protocol, D. Franke, D. Sibold et al., 2020.
  • RFC 8446, The Transport Layer Security (TLS) Protocol Version 1.3, 2018.
  • IS-GPS-200, GPS Interface Specification (L1 C/A navigation frame format).
  • IEEE 1588, Precision Time Protocol (standardizes the PHC and hardware timestamping).

Books and publications#

  • D. Mills, Computer Network Time Synchronization: The Network Time Protocol on Earth and in Space, 2006.
  • P. Misra, P. Enge, Global Positioning System: Signals, Measurements, and Performance, 2011.
  • K. Marzullo, PhD thesis on distributed fault tolerance (the source selection algorithm), Stanford, 1984.
  • M. Lichvar (chrony maintainer), Linux.conf.au talks.

Software used#

What this guide does not cover#

To stay focused on the “working Stratum 1” goal, this guide deliberately excludes:

  • The user-facing I2C bus and additional HATs (displays, sensors)
  • Any external physical display device
  • Multi-server deployment or geographic redundancy
  • Integration with external centralized monitoring systems (Prometheus, Grafana…): Munin, simpler to self-host, was chosen here instead
  • Security and hardening deep dives beyond what is covered here: mandatory access control (SELinux/AppArmor), file integrity monitoring (AIDE), centralized log shipping to a remote collector, multi-factor SSH authentication, avenues already flagged along the way (Lynis, Filesystem chapter) without being implemented here
  • Precision deep dives beyond the software pseudo-TCXO: moving to a compensated or thermostated hardware oscillator (TCXO, OCXO), or even an atomic reference (rubidium, CSAC), to gain frequency stability and above all holdover during an extended GNSS outage (From bare crystal to pseudo-TCXO chapter)
  • The full PTP protocol (Precision Time Protocol, IEEE 1588): this guide uses the PHC internally for hardware timestamping of NTP packets (PHC/phc2sys chapter), but does not deploy a PTP daemon (ptp4l) to distribute time over a local network, a different use case (finance, broadcast, telecom), with its own clients and its own constraints

These topics remain natural extensions once the base setup is operational and validated.