aodn/imos-toolbox

OceanContour parser handling of instrument orientation

Opened this issue · 0 comments

From what I can tell the OceanContour parser doesn't handle the orientation of the instrument (as in setting distance variable correctly). A quick hack to see if it could be done was by

In function get_varmap

varmap.('status') = 'Status';

And in function readOceanContourFile

status_data = get_var('status');
adcpOrientations = arrayfun(@(x) bin2dec(num2str(bitget(x, 28:-1:26, 'uint32'))), status_data);
adcpOrientation = mode(adcpOrientations); % hopefully the most frequent value reflects the orientation when deployed
% we assume adcpOrientation == 4 by default "ZUP"
meta.adcp_orientation = 'ZUP';
adcp_orientation_conversion = 1;
if adcpOrientation == 5
    meta.adcp_orientation = 'ZDOWN';
    adcp_orientation_conversion = -1;
end

dimensions{1}.data = time;
dimensions{1}.comment = 'time imported from matlabTimeStamp variable';
dimensions{2}.data = z * adcp_orientation_conversion ;
dimensions{2}.comment = 'height imported from VelocityENU_Range';

To note

  • only tested on Matlab 'PCWIN64'
  • only tested on OceanContour netcdf exported files
  • need some confirmation that status_data should be interpreted as 'uint32'

Just wondering are we the only people deploying downward facing Nortek Signatures and no one else has this issue?