Innovate, disrupt, code the future. 💻🔐🚀

Raspberry Pi Stratum 1 NTP Server with GPS, PPS, and Chrony

This guide explains how to turn a fresh Raspberry Pi OS installation into a Raspberry Pi stratum 1 NTP server using GPS, PPS, and Chrony. It also covers PTP hardware timestamping and Telegraf monitoring; pair it with GPS fix monitoring in Grafana to make receiver lock status visible before it becomes a timing incident.


1. Overview

In this project you’ll build a stratum‑1 NTP server using:

  • Raspberry Pi 5 as the host.
  • A GPS module (via the serial UART port) for an absolute time reference.
  • A PPS (Pulse Per Second) signal from the same GPS for sub-microsecond timing accuracy.
  • The PTP hardware timestamping on the Ethernet interface for improved precision on PTP packets.
  • Chrony for NTP time synchronization.
  • gpsd to interface with your GPS receiver.
  • Telegraf for monitoring various metrics (including Chrony statistics) sent to an InfluxDB backend.

2. Prerequisites and Required Hardware

Before you begin, ensure you have the following:

2025-03-28

Orbital Mechanics: Earth Gravitational Parameter (μ) and Core Equations

Quick answer: Earth’s standard gravitational parameter is μ = 3.986004418 × 10^14 m³/s² (equivalently 398600.4418 km³/s²). In an Earth-centered two-body calculation, μ = GM is the constant used in the vis-viva equation, mean motion, escape velocity, and orbital-elements calculations. JPL publishes planetary physical parameters and the underlying constants in its Planetary Physical Parameters reference.

For a Sun-centered orbital-elements-to-position workflow and heliocentric ecliptic coordinates, see the companion heliospheric coordinate systems guide.

Welcome to this interactive curriculum on the mathematics and physics behind launching and recovering space vehicles. In this notebook, we will build a comprehensive understanding of the underlying math, coordinate systems, and physics that allow engineers to determine launch windows, orbital trajectories, reentry paths, and landing coordinates for real-world spacecraft.

2025-03-26

Crystal Ball Function: Mathematical Definition, Formula, and Particle-Physics Use

The Crystal Ball function is a probability-density function used in particle physics when a measured peak is approximately Gaussian on one side but has a power-law tail on the other. It is commonly used to model detector response and energy-loss effects such as bremsstrahlung. It is not an array-prediction or “crystal ball problem” algorithm.

At a practical level, the function has four shape and location parameters: the peak location μ, width σ, tail-transition location α, and tail exponent n. A fit uses the Gaussian core to represent the central detector resolution and the tail to represent asymmetric non-Gaussian loss or reconstruction effects. ROOT provides a maintained Crystal Ball PDF example and implementation reference.

2024-04-05

Track Dotfiles with Git

Version: 1.2

Store all DotFiles in a bare git repository

Setup

  1. git init –bare $HOME/.cfg
  2. alias config=’usr/bin/git –git-dir=$HOME.cfg/ –work-tree=$HOME'
  3. echo “alias config=’usr/local/bin/git –git-dir=$HOME.cfg/ –work-tree=$HOME’” >> $HOME/.zsh/aliases
  4. config config –local status.showUntrackedFiles no

Adding files

Manually add files to repository by using config add <filename>. Use this to add all your files manually, this way only updates to your tracked files will show

Add the github repository

  1. config remote add origin <remote-url>
  2. config push -u origin main

Restore files from github

  1. echo “.cfg” >> .gitignore
  2. git clone <remote-git-repo-url> $HOME/.cfg
  3. alias config=’/usr/local/bin/git –git-dir=<path to .cfg’s Git directory> –work-tree=$HOME'
  4. config config –local status.showUntrackedFiles no
  5. config checkout
2024-04-04

Transforming Enterprise Networking: The Impact of AI Technologies

Date: <2024-04-03 Wed>

Transforming Enterprise Networking:

In the ever-evolving realm of enterprise networking, the integration of Artificial Intelligence (AI) technologies has become a game-changer. One of the most notable advancements in this area is Juniper Mist, a platform that leverages AI to revolutionize how networks are managed and operated. This article delves into how AI, particularly through solutions like Juniper Mist, is reshaping the enterprise networking landscape.

Understanding Juniper Mist and Its AI-Driven Approach

Juniper Mist is an AI-driven network solution that offers a unique combination of cloud management, advanced AI capabilities, and programmable APIs to deliver a full-stack solution for wireless, wired, and WAN networks. The platform is designed to simplify operations, improve user experiences, and provide unprecedented insight into network performance.

2024-04-03

Top Networking Trends of 2024: A Network Engineer's Perspective

Date: <2024-01-28 Sun>

Version: 1.0

Welcome to 2024, a year that continues to witness revolutionary changes in the world of networking. As a network engineer, I’ve seen firsthand the rapid evolution of technology in our field. This year is no exception, with several trends emerging that are reshaping how we think about and implement network infrastructure. Let’s dive into some of the top trends in networking for 2024.

1. The Rise of 6G Technology

Although 5G has just recently become mainstream, the buzz around 6G technology is already gaining momentum. Expected to be commercially available by 2030, research and development in 6G are heating up in 2024. This next-generation technology promises even faster speeds, lower latency, and higher reliability, paving the way for more advanced applications like holographic communications and augmented reality.

2024-03-05

GnuPG Cheat Sheet

GnuPG Cheatsheet

Quick list of the most common GnuPG commands that I need most often. Encrypt, decrypt, signing, key management, key servers, and special features.

Encrypt and decrypt

Encrypt a file with your key

gpg -er me@example.org diary.txt
  • Options

    -r encrypts the file for the user specified as argument. The output is written to diary.txt.gpg.

Encrypt a file for another person

gpg -er alice@example.org diary.txt

Encrypt a file with passphrase

gpg -c diary.txt

Decrypt a file

gpg -do diary.txt diary.txt.gpg

Encrypt and sign

Encrypt a file and sign with your key

gpg -esr alice@example.orge diary.txt

Sign and encrypt the file, output is written to diary.txt.gpg.

2022-08-21

A Beginner's Guide to Network Configuration Templating

Develop and Deploy Network Templates Before Automating

Date: 2022-05-26
Subject: Network Templating
Version 1.0

Automation is the number one topic in networking today. Automation allows a team to lean left, moving simple troubleshooting to the NOC, it allows the team to do more with less, and it allows for repeatable deployments. A good place to start is to think about many of the day to day work that gets done, how much of this work is simply applying the same changes over and over. These tasks are a great place to start with templating.

2022-05-26

Rename User Accounts in FreeBSD

Rename accounts in FreeBSD

pw usermod -n oldname -l newname -d /usr/home/newname

pw groupmod -n oldname -l newname

mv /usr/home/oldname /usr/home/newname

chown -R newname:newname /usr/home/newname

2018-03-14

Running bhyve on FreeBSD 10.1 (archived)

Historical FreeBSD 10.1 walkthrough

Version note (updated July 2026): This is an archived walkthrough for FreeBSD 10.1 and Ubuntu 15.04. Those releases are long out of support, so do not copy its package names, ISO URL, interface names, or boot commands into a production host. The underlying design remains useful: bhyve presents a guest NIC through a tap device, and the FreeBSD host can bridge that tap device to a physical interface. For a supported system, start with the current FreeBSD Handbook bhyve chapter and adapt the example to your supported FreeBSD release, guest OS, network policy, and storage layout.

2015-05-15