SatCat5
ptp_tracking.h File Reference

Detailed Description

Closed-loop time-tracking clocks and tracking control.

This file defines several classes:

  • ptp::TrackingClock is a generic interface for an adjustable clock reference, allowing stepwise changes and rate changes.
  • ptp::TrackingController accepts a series of timestamped error measurements (e.g., from an NTP or PTP client) and commands a TrackingClock to precisely match the correct time. The control logic is configurable using daisy-chained ptp::Filter objects.
  • ptp::TrackingSimple is a wrapper for TrackingController that integrates a typical filter chain; it yields good performance in many scenarios, so it can be used as-is or as an example.
  • ptp::TrackingCoarse is an alternative to TrackingController that does not attempt fine tracking or guarantee monotonicity. For simplicity, it only makes stepwise adjustments to the clock.

Definition in file ptp_tracking.h.

Include dependency graph for ptp_tracking.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  satcat5::ptp::TrackingClock
 Generic interface to a numerically-controlled reference clock. More...
 
class  satcat5::ptp::TrackingController
 Clock controller handling coarse and fine discipline. More...
 
class  satcat5::ptp::TrackingSimple
 Simple all-in-one implementation of TrackingController. More...
 
class  satcat5::ptp::TrackingCoarse
 Bang-bang alternative to TrackingController. More...
 

Variables

constexpr s64 satcat5::ptp::RATE_ONE_PPB = satcat5::ptp::SUBNS_PER_NSEC
 Define rate offsets for the TrackingClock::clock_rate() method. More...
 
constexpr s64 satcat5::ptp::RATE_ONE_PPM = 1000 * satcat5::ptp::RATE_ONE_PPB
 Define rate offsets for the TrackingClock::clock_rate() method. More...
 
constexpr s64 satcat5::ptp::RATE_ONE_PPK = 1000 * satcat5::ptp::RATE_ONE_PPM
 Define rate offsets for the TrackingClock::clock_rate() method. More...
 

Variable Documentation

◆ RATE_ONE_PPB

constexpr s64 satcat5::ptp::RATE_ONE_PPB = satcat5::ptp::SUBNS_PER_NSEC
constexpr

Define rate offsets for the TrackingClock::clock_rate() method.

Units are normalized, 2^16 LSB = 1 PPB = 1 nanosecond per second. Zero indicates the clock's free-wheeling rate.

Definition at line 41 of file ptp_tracking.h.

◆ RATE_ONE_PPK

constexpr s64 satcat5::ptp::RATE_ONE_PPK = 1000 * satcat5::ptp::RATE_ONE_PPM
constexpr

Define rate offsets for the TrackingClock::clock_rate() method.

Units are normalized, 2^16 LSB = 1 PPB = 1 nanosecond per second. Zero indicates the clock's free-wheeling rate.

Definition at line 43 of file ptp_tracking.h.

◆ RATE_ONE_PPM

constexpr s64 satcat5::ptp::RATE_ONE_PPM = 1000 * satcat5::ptp::RATE_ONE_PPB
constexpr

Define rate offsets for the TrackingClock::clock_rate() method.

Units are normalized, 2^16 LSB = 1 PPB = 1 nanosecond per second. Zero indicates the clock's free-wheeling rate.

Definition at line 42 of file ptp_tracking.h.