• Davide Ciminaghi's avatar
    compliance, 11.3, d: take delay_resp cf into account · a44cadcb
    Davide Ciminaghi authored
    11.3 d says:
    
    Upon receipt of the Delay_Resp message by the slave:
    
    1) If the received Sync message indicated that a Follow_Up message will not
       be received, the <meanPathDelay> shall be computed as:
       <meanPathDelay> = [(t2 - t3) + (receiveTimestamp of Delay_Resp message -
       originTimestamp of Sync message) -
       correctionField of Sync message -
       correctionField of Delay_Resp message]/2.
    2) If the received Sync message indicated that a Follow_Up message will be
       received, the <meanPathDelay> shall be computed as:
       <meanPathDelay> = [(t2 - t3) + (receiveTimestamp of Delay_Resp message -
       preciseOriginTimestamp of Follow_Up message) -
       correctionField of Sync message -
       correctionField of Follow_Up message -
       correctionField of Delay_Resp message]/2.
    
    We assume that:
    
    t1 = originTimestamp of Sync message (one step) or
    t1 = preciseOriginTimestamp of Follow_Up message (two steps)
    
          and
    
    t4 = receiveTimestamp of Delay_Resp message
    
    wich is true for masters not supporting sub-nanosecond
    timestamps (we don't support sub-ns precision via standard protocol, so the
    assumption should be true for us).
    
    As sync (or followup) arrives, we calculate m_to_s_dly, which is:
    
    t2 - t1 - cf_sync - cf_followup
    
    When delay_resp arrives, we calculate s_to_m_dly, which is:
    
    t4 - t3 - cf_delay_resp
    
    So [(m_to_s_dly + s_to_m_dly) / 2] should be equal to:
    
    (t2 - t3 + t4 - t1 - cf_sync - cf_followup - cf_delay_resp) / 2
    
    which looks like the 11.3 d expression for mean path delay
    (note that cf_followup is zero for a one-step master).
    
    To get this result, we just save the delay_resp cf to ppi->cField.
    a44cadcb
Name
Last commit
Last update
arch-bare-i386 Loading commit data...
arch-bare-x86-64 Loading commit data...
arch-sim Loading commit data...
arch-unix Loading commit data...
arch-wrpc Loading commit data...
arch-wrs Loading commit data...
configs Loading commit data...
doc Loading commit data...
etc Loading commit data...
include/ppsi Loading commit data...
lib Loading commit data...
lib-bare Loading commit data...
pp_printf Loading commit data...
proto-ext-whiterabbit Loading commit data...
proto-standard Loading commit data...
scripts Loading commit data...
time-bare Loading commit data...
time-sim Loading commit data...
time-unix Loading commit data...
time-wrpc Loading commit data...
time-wrs Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
Kconfig Loading commit data...
MAKEALL Loading commit data...
Makefile Loading commit data...
Makefile.kconfig Loading commit data...
diag.c Loading commit data...
fsm.c Loading commit data...
timeout.c Loading commit data...