From e950969497e52ab1d86853ddadfef0fc1fb4b8f7 Mon Sep 17 00:00:00 2001 From: Bec Cowley Date: Fri, 24 Sep 2021 12:37:00 +1000 Subject: [PATCH] Add pitch adjustment calculation --- Preprocessing/adcpBinMappingPP.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Preprocessing/adcpBinMappingPP.m b/Preprocessing/adcpBinMappingPP.m index feef80220..9a686e157 100644 --- a/Preprocessing/adcpBinMappingPP.m +++ b/Preprocessing/adcpBinMappingPP.m @@ -91,6 +91,11 @@ roll = sample_data{k}.variables{rollIdx}.data * pi / 180; beamAngle = sample_data{k}.meta.beam_angle * pi / 180; + %adjust pitch + info = sample_data{k}.meta.adcp_info; + pitch_bit = info.sensors_settings.Pitch; + pitch = TeledyneADCP.gimbal_pitch(pitch,roll, pitch_bit); + %TODO: the adjusted distances should be exported % as variables to enable further diagnostic plots and debugging. %TODO: the adjusted distances should be a Nx4 array or Nx3 array.