ptpd和ptp4l 软件核心算法

news/2024/12/4 20:17:54/

原文章:

A. Masters and Slaves
In PTP, master clocks provide the reference time for one 
or more slave clocks through the exchange of messages over a 
network. The protocol determines a unique master among a 
group of clocks using the Best Master Clock algorithm 
(BMC). The BMC selects the most stable and accurate clock.
B. Sync Messages PTP masters send Sync messages. The master records the 
send time of Sync messages (t1), and slaves record the receipt 
time (t2). The difference between the send and receipt times of 
Sync messages is the master-to-slave delay (dm2s):dm2s = t1 – t2. (2.1) 
Sync messages are sent once per Sync interval (Tsync) 
(typically 2 s). This makes the master-to-slave delay sampling 
period (Tm2s): Tm2s = Tsync = 2 s. (2.2) 
C. Delay Request Messages PTP slaves send Delay Request messages. Slaves record 
the send time of Delay Request messages (t3), and the master 
records the receipt time (t4). The difference between the send 
and receipt times of Delay Request messages is the slave-tomaster delay (ds2m): ds2m = t3 – t4. (2.3) 
Delay Request messages are sent on intervals uniformly 
distributed between 2 and 30 Sync intervals. This makes the 
slave-to-master delay sampling period (Ts2m): Ts2m = Tsync * U[2,30]. (2.4) 
D. One-Way Delay PTP calculates an estimate of the message propagation 
delay. This calculation assumes symmetric propagation 
delays, so that an average of the master-to-slave and slave-tomaster delays cancels the time offset between master and 
slave. This yields the message propagation delay, which the 
specification refers to as the one-way delay (dprop): dprop = (dm2s + ds2m)/2. (2.5) Assuming symmetric propagation delays is often, but not 
always, valid. Asymmetric propagation delays cannot be 
observed by the protocol. They will cause a constant bias in 
the one-way delay and, in turn, the overall time coordination. 
The bias will equal half of the magnitude of the delay 
asymmetry. Assuming a constant delay asymmetry, an asymmetric 
delay bias can be eliminated by adding a latency correction to 
the master-to-slave or slave-to-master delay that cancels the 
asymmetry; however, assuming constant delay asymmetry 
also may be invalid. 
E. Offset From Master PTP estimates the time difference between master and 
slave clocks. This is the master-to-slave delay corrected for 
message propagation delay, and it is referred to as the offset 
from master (∆t): 
∆t = dm2s – dprop. (2.6) 
III. PTPd IN BRIEF

http://www.ppmy.cn/news/638309.html

相关文章

jetson tx2 解决软件qv4l2软件segmentation fault

插入摄像头,安装完成qv4l2后,终端执行qv4l2,报: nvidianvidia:/mmc/prj/$ qv4l2Opening in O_NONBLOCKING MODEsegmentation fault1.安装qv4l2: sudo apt install qv4l2sudo apt install v4l-utilssudo apt-get install libv4l-dev2.报错是由…

树莓派 安装uv4l 无法定位软件包

问题描述: 我的是 树莓派4 Raspbian版本是Buster 安装uv4l 根据网上现有的一些教程和视频,安装CSI摄像头插件uv4l时老是装不上,网上的教程都是旧版本的树莓派Raspbian系统 debug过程中然后就出现过下面这几种问题 错误:6 https://www.linux-…

nvidia nx平台nvv4l2camerasrc适配GRAY8格式调试记录

1. 前言 nvidia相机插件“nvv4l2camerasrc”目前只支持UYVY格式 然而使用的相机是GRAY8格式, 需要扩展nvv4l2camerasrc格式 2. 参考12_camera_v4l2_cuda 尝试运行样例来捕获帧,并将其移植到nvv4l2camerasrc插件 sample如下: /usr/src/jetson_multimedia_api/samples/12_c…

通过gpsd-3.20、chronyd-3.5、phc2sys-3.1.1、ptp4l-3.1.1配置ptp主时钟(Master)

本文使用的开发板为野火鲁班猫1S 文章目录 零、总体流程一、gpsd配置二、chronyd配置三、phc2sys配置四、ptp4l配置 零、总体流程 通过gpsd接收(NEMApps)获得精准的绝对时间通过chronyd将上步的时间源同步系统时钟 在没有gps、gps解算失效、有网的时候,就是正常地…

补充:以 ptp4l、E2E 为例的 Linuxptp 代码分析

最近仍然在看linuxptp的问题,对其代码做了更深的了解,下面补充一些知识点。详细文章需要参考上一篇:以 ptp4l、E2E 为例的 Linuxptp 代码分析 1 Event message and General message 我是由于研究第二点才发现的第一点,有个先后顺…

问题解决ros:Checking for module libv4l2

问题: ros:Checking for module libv4l2 问题描述 ubuntu18.04 melodic 编译usb_cam caktkin_make时出错 -- processing catkin package: usb_cam -- > add_subdirectory(usb_cam) -- Searching required modules -- Checking for module libv4l…

以 ptp4l、E2E 为例的 Linuxptp 代码分析

最近在学习这部分内容,发现网上没有多少相关的代码分析的文章,结合自己的学习,和大家分享一下,希望大家批评指正! linuxptp code git clone git://git.code.sf.net/p/linuxptp/code linuxptpptp4l.c::main() 首先是处…

PTP4L命令手册(谷歌翻译)

ptp4l-PTP边界/普通时钟概要ptp4l [-AEP246HSLmqsv] [-f config] [-p phc-device] [-l打印级别] [-i接口] ...描述ptp4l是根据Linux的IEEE标准1588的精确时间协议(PTP)的实现。它实现了边界时钟(BC)和普通时钟(OC&…