Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OceanContour parser handling of instrument orientation #799

Open
sspagnol opened this issue Aug 15, 2023 · 0 comments
Open

OceanContour parser handling of instrument orientation #799

sspagnol opened this issue Aug 15, 2023 · 0 comments

Comments

@sspagnol
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant