InputData <- realTimeloads::ExampleData
freq <- InputData$ADCP$Accoustic_Frequency_kHz*1000
cond <-InputData$Sonde$Conductivity_uS_per_cm
temp <- InputData$Sonde$Water_Temperature_degC
dbar <- InputData$Sonde$Pressure_dbar
sal <- ctd2sal(cond,temp,dbar)
aw <- attenuation_of_sound_by_water(freq,temp,sal) # dB/m
awNp <- attenuation_of_sound_by_water(freq,temp,sal)/(20*log10(exp(1))) # Np/m
Run the code above in your browser using DataLab