Analyzer for log files of time stations
This tool uses radio_datetime_utils and per-station libraries to analyze log files of these stations.
License
This work is licensed under "MIT OR Apache-2.0" Copyright 2023-2025 René Ladan rene0+codeberg@freedom.nl
Usage
The program takes a minimum of two parameters:
- the station name of the file to analyze (as argument to the -s option)
- the name of the file to analyze (as argument to the -f option)
The -h option provides a short help message.
The -u option shows the decoded date in time in UTC instead of local time. The "summer" and "winter" indicators are replaced by "UTC", information on DST transitions is still shown.
The -e indicates that the log file is a per-edge log file as sent over USB by rp-rs-radio-clock instead of a regular per-bit log file. When processing per-edge log files, the -E option can be used to adjust the spike limit in microseconds.
The -M option toggles the processing mode of the log file. The default mode is strict for per-edge files and loose for per-bit files.
Stations
Currently supported stations are dcf77
and msf
.
DCF77 is the German time station at 77.5 kHz, and MSF is the British time station at 60 kHz.
Some information these stations can be found at:
- https://en.wikipedia.org/wiki/DCF77
- https://www.ptb.de/cms/en/ptb/fachabteilungen/abt4/fb-44/ag-442/dissemination-of-legal-time/dcf77.html
- https://en.wikipedia.org/wiki/Time_from_NPL_(MSF)
- https://www.npl.co.uk/products-services/time-frequency/msf-radio-time-signal
Input files
All input files in plain text.
Per-bit files
These files generally contain one line per minute, unless reception errors occur in which case false minute markers might be received. The analyzer returns the date, time, day-of-week, and DST (daylight saving time) status of each analyzed minute. Parity and temporal errors are also reported. Some information is only available for certain transmitters:
-
DCF77:
- call bit for technicians (does not affect the received data)
- announcement of leap second
- information meant for third parties
-
MSF:
- DUT1 value (difference between UT1 and UTC in tenths of seconds)
File format for DCF77
There are five characters for DCF77 log files. All other characters are discarded.
- '0' denotes a 0 bit
- '1' denotes a 1 bit
- '_' denotes a bit which could not be properly decoded
- '*' resets the internal decoder state, it should generally not be followed by a newline
- newline denotes a new minute
File format for MSF
There are seven characters for MSF log files. All other characters are discarded.
- '0' denotes a 0,0 bit pair
- '1' denotes a 1,0 bit pair
- '2' denotes a 0,1 bit pair (only occurs in bit 1-16)
- '3' denotes a 1,1 bit pair (only occurs in bit 53-58)
- '4' denotes the 500 ms new-minute marker
- '_' denotes a bit which could not be properly decoded
- '*' resets the internal decoder state
- (the newline is just a comment here)
Per-edge files
For each received station, these files contain one edge transition (low-to-high or high-to-low) per line. A second normally contains an even number of edge transitions (2 for a regular second, 0 for the missing bit at the end-of-minute for DCF77, and 4 for a (0,1) bit pair for MSF).
The format of each line is " ":
- station: one character to denote the station, 'D' for DCF77 and 'M' for MSF
- edge: whether the new state of the edge is high
- time: uptime of the receiver in microseconds, clipped to 32 bits (wraps each 71m35s)
- tick: sub-division of the current second used to orchestrate events in rp-rs-radio-clock
Comments are also supported, these are always full-line, such lines start with a '#'