ping-viewer icon indicating copy to clipboard operation
ping-viewer copied to clipboard

Estimate sound speed

Open ES-Alexander opened this issue 4 years ago • 0 comments

Summary

Use depth/pressure, water temp, and salinity to estimate sound speed.

Additional information

  • Could accept relevant variable values from user input, or telemetry, or a combination (most ROVs don't have salinity/conductivity sensors)
  • Would make sonar data more accurate
  • May need to add v_sound to logging somehow:
    • Ping360 Ping Viewer integration uses a quantised scan range (highest precision is integer meters), so when analysing it would be possible to programatically determine the v_sound that was used for a given ping by the sample period and number of samples if necessary - I could make a python example of how to do this as part of a more general analysis example, or as a separate 'advanced' one.
    • Ping1D has no sample period property in the profile messages (or in the protocol at all), but actively uses v_sound for calculations, so perhaps Ping Viewer could send a get v_sound request after every set v_sound command so that it's appropriately logged.
  • Likely best to use the UNESCO equation, but it may be sufficient/acceptable to use the Coppens* equation (a bit older and not quite as accurate, but has fewer terms and is similar in generality) - both equations (and a few others) detailed here.

*(My) Python example code for Coppens here:

def coppens(D,S,T):
    ''' The Coppens speed-of-sound in sea-water equation [m/s].

    See: resource.npl.co.uk/acoustics/techguides/soundseawater/underlying-phys.html

    'D' is depth in meters [0-4000].
    'S' is salinity in parts-per-thousand (ppt) [0-45].
    'T' is temperature in degrees Celsius [0-35].

    All input parameters can be a single number or numpy array of numbers.

    '''
    D = D / 1000 # ensure copy to not modify possible input array
    t = T / 10
    t2 = t * t
    t3 = t2 * t
    dS = S - 35
    c_0St = 1449.05 + 45.7*t - 5.21*t2 + 0.23*t3 + (1.333 - 0.126*t + 0.009*t2)*dS
    c_DSt = c_0St + (16.23 + 0.253*t)*D + (0.213 - 0.1*t)*D*D + (0.016 + 0.0002*dS)*dS*t*D
    return c_DSt

ES-Alexander avatar Aug 19 '21 01:08 ES-Alexander