def baseline_calc_hmean ( SSP1, SSP2, BSL_range, TAT):
    """ Calculates measured baseline lengths (harmonic mean sound speed).

    It needs:
    SSP1 ... sound speed at beacon 1 in metres per second
    SSP2 ... sound speed at beacon 2 in metres per second
    BSL_range ... measured traveltime in milliseconds
    TAT ... turn around time in milliseconds

    It returns:
    baseline length in metres
    """

    return(((2*SSP1*SSP2)/(SSP2+SSP1))*(((BSL_range - TAT)/2)/1000))