9 #include <uavcan/driver/system_clock.hpp> 34 void setUtc(uavcan::UtcTime time);
47 void adjustUtc(uavcan::UtcDuration adjustment);
64 rate_error_corner_freq(0.01F),
65 max_rate_correction_ppm(300.0F),
66 lock_thres_rate_ppm(2.0F),
67 lock_thres_offset(uavcan::UtcDuration::fromMSec(4)),
68 min_jump(uavcan::UtcDuration::fromMSec(10))
106 , uavcan::Noncopyable
virtual void adjustUtc(uavcan::UtcDuration adjustment)
void setUtcSyncParams(const UtcSyncParams ¶ms)
virtual uavcan::UtcTime getUtc() const
UtcSyncParams getUtcSyncParams()
UTC sync params get/set.
float rate_i
PPM per one PPM error for second.
void init()
Starts the clock.
float getUtcRateCorrectionPPM()
Clock rate error.
bool isUtcLocked()
Whether UTC is synchronized and locked.
uavcan::UtcTime getUtc()
Returns UTC time if it has been set, otherwise returns zero time.
UTC clock synchronization parameters.
uavcan::MonotonicTime getMonotonic()
Returns current monotonic time since the moment when clock::init() was called.
uavcan::UtcDuration lock_thres_offset
float lock_thres_rate_ppm
float rate_error_corner_freq
virtual uavcan::MonotonicTime getMonotonic() const
float max_rate_correction_ppm
uavcan::UtcDuration min_jump
Min error to jump rather than change rate.
uavcan::uint32_t getUtcJumpCount()
Number of non-gradual adjustments performed so far.
float offset_p
PPM per one usec error.
Adapter for uavcan::ISystemClock.
void setUtc(uavcan::UtcTime time)
Sets the driver's notion of the system UTC.
void adjustUtc(uavcan::UtcDuration adjustment)
Performs UTC phase and frequency adjustment.