Skip to content

peterlewis/pcc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

120 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Precision Clock Companion

A browser app that drives the Precision Clock Mk IV by mitxela over Web Serial — display modes, text & countdowns, brightness curves, a live polar sky, an orthographic globe and a flat world map, GPS / satellite / timing charts, and a raw serial monitor. With no clock attached it runs as a faithful emulator.

Note

Independent, community-built. Not affiliated with mitxela.

License: MIT Deploys from CI Web Serial

What happened to the Mac app?

There was a native macOS menu-bar app — it still exists, it's just on hold. A few reasons why:

  • Distribution. A native Mac app requires signing + notarizing each build, which is a pain. A web app is a URL.
  • Reach. Anyone on a Chromium browser can open it, no per-platform build, no updates to push.
  • Knowledge. I know more HTML / JS / Canvas than I do Swift / AppKit.

What it does

  • Clock control — display modes, text & scrolling marquee, countdowns, brightness / gamma / DAC curves, colon styles, and raw key = value commands.
  • Sky room — a polar az/el plot with sector heatmap and age-faded trails, C/N₀ vs elevation + over time, a static-position CEP scatter with DOP history, an orthographic globe with a soft day/night terminator, and a flat world map with satellites at their real sub-points.
  • Timing — PPS host-timestamping: phase jitter, drift staircase, and a temperature-compensation fit (with the draft firmware streaming $PMTXTS).
  • Emulator — everything above runs with no hardware, driven by a built-in simulator; connect a real Mk IV over Web Serial and the same views drive the physical clock.
  • Config & data — read/write the clock's config.txt, REST data-sources for the date row, weather-at-fix, and a raw NMEA / serial monitor.

Run it

  • Hosted: https://peterlewis.github.io/pcc/ — needs a Chromium browser (Chrome / Edge / Arc / Brave) over HTTPS.
  • Local dev: live source, no build step:
    git clone https://github.com/peterlewis/pcc.git
    cd pcc && bash web/serve.sh        # http://localhost:8765
  • Build the static site (what CI deploys):
    cd web && npm install && node build.mjs   # → ../docs/

Web Serial isn't in Safari or Firefox — use a Chromium browser. Nothing is required to look around (it emulates a clock); plug one in to drive the real thing.

Repository layout

Path What
web/ The app — source. Built to docs/ by CI and served on Pages. See web/README.md.
chrony-bridge/ Small host daemon feeding the clock's GPS time into chrony as a local NTP source.
.github/workflows/pages.yml Builds web/ with esbuild and deploys to GitHub Pages on every push to main.

main is web-only. The native macOS app is paused and preserved on the macos-app branch (kept as a Swift reference).

chrony-bridge (NTP)

A browser can't open a UDP port, so for a real local NTP source there's a small cross-platform daemon that reads the clock's serial stream and feeds chrony through its SOCK refclock — handy on a headless Linux / Raspberry Pi box. Setup, honest accuracy notes and service files are in chrony-bridge/README.md.

The macOS app (paused)

The original native menu-bar app — three satellite views, GPS-disciplined NTP, WeatherKit, on-device AI insights — is paused in favour of the web version, but preserved and still buildable on its branch:

git fetch && git switch macos-app
cd macos && swift build && swift run PCC

Related

License

MIT — see LICENSE. Bundled third-party assets (fonts, map data, libraries) keep their own licenses; see THIRD_PARTY.md.

About

macOS companion app for the Precision Clock Mk IV — satellite tracking, NTP time server, weather, brightness curves, and more over USB serial

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors