def calcAcWcCorrelationAndDispersion( wcT1, acT2, acT3, wcT4, wcPrecision, acPrecision ):
    """\
    Returns correlation and dispersion at the time of the correlation given
    t1, t2, t3, t4 from a clock sync request-response exchange and knowledge of
    the precision of both clocks.
    
    :param wcT1: t1 measurement (of Wall clock) in nanoseconds
    :param acT2: t2 measurement (of Arduino clock) in nanoseconds
    :param acT3: t3 measurement (of Arduino clock) in nanoseconds
    :param wcT4: t4 measurement (of Wall clock) in nanoseconds
    :param wcPrecision: measurement precision of Wall Clock in nanoseconds
    :param acPrecision: measurement precision of Arduino Clock in nanoseconds
    
    :returns: ( (acTimeNanos, wcTimeNanos), dispersionNanos )
    """
    correlation = ( (acT2 + acT3) / 2.0, (wcT1 + wcT4) / 2)
    rtt = (wcT4 - wcT1) - ( acT3 - acT2 )
    dispersion = rtt / 2.0 + wcPrecision + acPrecision
    return correlation, dispersion