| peter | Posted: 13 Apr 2026, 02:22 PM |
|---|---|
|
Member Posts: 11 Joined: 10-September 22 |
Precision Clock Companion (PCC) A browser app for the Precision Clock Mk IV. It drives a real clock over Web Serial — and with no clock attached it is one: the on-screen clock is the actual clock4 firmware compiled to WebAssembly, not a JavaScript imitation of it. ▶ Open PCC (beta) · GitHub Chromium browsers only for the hardware connection (Chrome / Edge / Brave — Web Serial isn't in Safari/Firefox); anyone can open it and explore the emulator. The clock face is the real firmware The same C that flashes to the physical clock runs in the page — real NMEA parsing, real PPS discipline, real display latching. It's built as v0.0.5: mitxela's released 0.0.4 plus my five draft PRs — #5 $PMTXTS timing telemetry, #6 astro display modes, #7 hardening fixes, #8 sidereal & solar time, #9 self-learning temperature compensation. To be clear: that firmware is draft — it runs happily on my own clock, but it isn't upstream. The build is verified against 4,511 independently-computed display checks and replay-anchored against my physical unit, and the app shows the exact commit it was built from. What's in it - Face — every display mode (live sidereal & apparent-solar included), text & marquee, countdowns, brightness/gamma/DAC curve editing, colon animations, and config.txt editing through the firmware's real parser - Sky — polar plot with signal heatmap + age-faded trails, flat world map and 3D globe with true sub-satellite points, C/N₀ and position/DOP analysis; history persists and exports (CSV / JSON / GPX / NMEA / per-satellite CSV) - Timing — with $PMTXTS streaming: PPS phase jitter (robust stats), oscillator drift staircase, and a temp-compensation fit that emits the firmware's own tc_* warm-start block - Device — Web Serial connect, REST data sources onto the date row, recorded-data downloads, firmware provenance + update check, raw serial monitor Honesty rule throughout: no fake data. Standby shows your system time and nothing else; simulation is opt-in and labelled (virtual GPS with real satellite positions from live TLEs); a connected clock's data is never mixed with simulated. The macOS app The native menu-bar app is paused and preserved on the macos-app branch — a URL beats signing + notarising every build, and the web version now does more. --- Beta — here be bugs :) Feedback welcome on GitHub or in this thread. Built with Claude Code. Independent project, not affiliated with mitxela. Last edit by peter at 7 Jul 2026, 02:23 PM ------------- |
| [top] | |
| peter | Posted: 13 Apr 2026, 02:22 PM |
|
Member Posts: 11 Joined: 10-September 22 |
Changelog: PCC Web (current) - Ground-up browser rewrite: the clock4 firmware compiled to WASM as the clock face (v0.0.5 = 0.0.4 + draft PRs #5–#9), Web Serial hardware connection, sidereal/solar modes, significance-fade precision display, $PMTXTS timing analysis + temp-comp fit, persistent sky history + per-satellite export, timezone engine on the clock's own IANA database. Continuously deployed — no versioned releases; the app reports its own build. macOS app (paused, preserved on the macos-app branch): v0.8.0 - Polar SNR sector heatmap, on-device AI GPS Insights, offline 3D globe bundle, auto-eject on firmware install v0.7.0 - Per-pass satellite trails with age-fading tiers, live comet-heads, time scrub (Live → 30d) v0.6.1 - Weather ghost fix, trail rendering capped at 600pts, recording no longer auto-resumes, record button moved into Satellites panel v0.6.0 - 3D globe view with ground tracks and sun/moon projections, trail overlay on map, persistent trail recording, Polar · Map · Globe tabs, sidebar reorganised, macOS 26 / Swift 6.2 v0.5.4 - Marquee scroll fix (underscore separator), window reopen fix, dynamic map legend v0.5.3 - Weather display fix, WeatherKit auth, instant format refresh, display-in-use warnings v0.5.2 - Sky View resize crash fix, auto-resizing window, compact GPS info panel v0.5.1 - Satellite tracking reconnect fix, NTP status in menu bar, Time Server indicator v0.5.0 - Basic Stratum 1 NTP server, sun/moon on polar plot, horizon mask, GPS info panel, WeatherKit v0.4.1 - Custom HTTP headers, rate limiting for data sources v0.4.0 - Satellite sky view with polar plot and signal bars v0.3.0 - Config.txt management, serial monitor, brightness presets, menu bar controls v0.2.0 - Firmware and timezone update checker v0.1.0 - Initial release Last edit by peter at 7 Jul 2026, 02:26 PM ------------- |
| [top] | |
| mit | Posted: 13 Apr 2026, 03:58 PM |
|
yeah whatever Admin Posts: 685 Joined: 4-May 16 |
Interesting! I probably won't have a chance to test it personally for a while but I've idly thought about something like this before. One note, the hyperlink to the clock user manual in the repo is wrong (it should point to /projects/precision_clock_mk_iv/docs ) Here are some feature suggestions if you'd like to try them: - It would be nice to have a dropdown list for zone_override, so you can just click on a zone to switch to it. The list of zones is in the repo as timezone_names.json, but note that it usually has some changes when the timezone database is updated, so it can't be hard coded. - It could periodically check for firmware releases, and download and install them automatically - Probably a lot of work, but maybe not using Claude, you could recreate the functionality of ublox's u-centre sky view. This is a polar plot of the satellite signal strengths, and if you leave it running for 24 hours it gives you an interesting analysis of the antenna performance. ------------- |
| [top] | |
| peter | Posted: 13 Apr 2026, 04:48 PM |
|
Member Posts: 11 Joined: 10-September 22 |
Thanks for the feedback! :) Both of these are in the latest alpha, and have fixed the link! :) Last edit by peter at 17 Apr 2026, 04:23 PM ------------- |
| [top] | |
| peter | Posted: 13 Apr 2026, 10:40 PM |
|
Member Posts: 11 Joined: 10-September 22 |
Implemented the sky view in the latest alpha. Thank you for the suggestion. Last edit by peter at 17 Apr 2026, 04:24 PM ------------- |
| [top] | |
| peter | Posted: 17 Apr 2026, 04:22 PM |
|
Member Posts: 11 Joined: 10-September 22 |
Oops! Didn't mean to make this message. Last edit by peter at 17 Apr 2026, 04:23 PM ------------- |
| [top] | |
| mit | Posted: 18 Apr 2026, 10:48 AM |
|
yeah whatever Admin Posts: 685 Joined: 4-May 16 |
It's pretty cool how quickly that came together! I would be interested to know how the NTP server behaves without a hardware PPS connection. The USB jitter is often pretty bad. There's a stale branch of the clock firmware here where I did some experiments with it. I don't think it's impossible to get a good timestamp over USB. The source of the jitter is that it's host-driven, and there's a variable delay between putting the packet in memory and it being read out by the USB interrupt. If we fiddled with the USB stack we could inject an accurate timestamp into the packet at the last microsecond. Sky view - the globe looks nice, it's not clear from the screenshots whether the polar plot colours in the sectors as I was expecting. E.g. here's a stackoverflow post with a filled sky view. Hmm... another point, when applying a firmware update it is slightly safer to send the SCSI Eject command, rather than reboot over serial, as the OS will hopefully finish any writes before it ejects it. I can think of plenty of other features for PCC if you want them, though please only add them if you are having fun, again I can't actually test it myself as I don't normally use macOS. There's a thought: maybe with the power of AI, you could port PCC to the browser using WebSerial...... ------------- |
| [top] | |
| peter | Posted: 18 Apr 2026, 05:47 PM |
|
Member Posts: 11 Joined: 10-September 22 |
Great shout on the WebSerial! As a Flipper Zero-er, I should have thought of that! There's an initial release now, up on GitHub Pages :) PCC Web It's very much MVP / proof-of-concept though, it doesn't all yet function, and currently has reduced feature set. Re: USB jitter - thank you for enlightening me further and since reading your considerations re NTP, I've tried to temper my description of the NTP server as a convenience tool rather than anything production-grade, and tried to quell my use of the word "stratum"! :) Will have a look at that stale firmware branch though. Re: filled sky view - already in v0.8.0 :) 5°×5° cells coloured by peak SNR. Re: SCSI Eject vs serial reboot - thank you, have switched over. Last edit by peter at 20 Apr 2026, 06:35 PM ------------- |
| [top] | |
| peter | Posted: 7 Jul 2026, 02:25 PM |
|
Member Posts: 11 Joined: 10-September 22 |
Big update: PCC is now a web app — and the clock in it is real PCC has been rewritten from the ground up as a browser app: peterlewis.github.io/pcc Of note is the (not yet quite perfect) clock face. It's not drawn by JavaScript pretending to be a Mk IV — the actual clock4 firmware C is compiled to WebAssembly and runs in the page, parsing NMEA and disciplining to PPS exactly as the hardware does. Feed it a simulated GPS and watch it acquire, lock, and hold over; plug in a real Mk IV over Web Serial (Chromium only) and the same views drive the physical clock. FYI on the firmware it runs: it's a beta v0.0.5 — mitxela's released 0.0.4 plus my five draft PRs (#5 #6 #7 #8 #9: PPS timing telemetry, astro modes, hardening, sidereal/solar time, self-learning temp compensation). Draft firmware — it's been running happily on my own clock, but treat it as what it is. The app's DEVICE → UPDATES panel shows the exact commit it was built from, and each PR has a "try it in your browser" note now too. The old macOS app is paused (preserved on its branch) — the web version has overtaken it, and it's one URL instead of a notarised download. PCC itself is beta: here be bugs :) — bug reports very welcome, on GitHub or right here. ------------- |
| [top] | |
Sign in to post a reply.