Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ctd_processing/hex_parse_v2.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@
%data.spar = hexword2spar(h(:, 58:60));

[data.lon, data.lat] = hexword2lonlat(h(:, 55:68)); % lonneg, latneg ***
data.pst = hexword2pststat(h(:, [75:78]-6));

end_offset=88-size(h,2);
data.pst = hexword2pststat(h(:, [75:78]-end_offset));
%[data.pst, data.ctdstatus] = hexword2pststat(h(:, 75:78));
data.modcount = hex2dec(h(:, [73:74]-6));
data.modcount = hex2dec(h(:, [73:74]-end_offset));

% seconds since 1970/1/1 0000
data.time = hex2dec(h(:, [87:88 85:86 83:84 81:82]-6)); % original
data.time = hex2dec(h(:, [87:88 85:86 83:84 81:82]-end_offset)); % original

% following is corresponding line in older version of hex-parse from
% IWISE/LADCP_processing/ctd_proc2/ , which doesn't have the -6 at end..
%data.time = hex2dec(h(:, [87:88 85:86 83:84 81:82]));
% data.time = hex2dec(h(:, [87:88 85:86 83:84 81:82]));

%%