bluerobotics / ping-viewer

Ping Viewer is an open-source application to view and record data from the Blue Robotics Ping Echosounder and Ping360 Scanning Sonar.
https://docs.bluerobotics.com/ping-viewer/
GNU General Public License v3.0
40 stars 38 forks source link

Estimate sound speed #1003

Open ES-Alexander opened 2 years ago

ES-Alexander commented 2 years ago

Summary

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

Additional information

*(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