Skip to content
Snippets Groups Projects
Commit cc7b1436 authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

decode and store SSJT_FREQ and SSPS_FREQ in tsg structure

parent 69feb754
No related branches found
No related tags found
No related merge requests found
...@@ -119,22 +119,31 @@ if fid ~= -1 ...@@ -119,22 +119,31 @@ if fid ~= -1
% see http://www.seabird.com/pdf_documents/manuals/21_022.pdf % see http://www.seabird.com/pdf_documents/manuals/21_022.pdf
% section 4: data output format % section 4: data output format
%tsg.SSJT_FREQ = []; % initialize and set <data>_FREQ to NaN
%tsg.CNDC_FREQ = []; % -------------------------------------
tsg.SSJT_FREQ = nan(length(TsgRaw),1);
tsg.CNDC_FREQ = nan(length(TsgRaw),1);
% for i=1:length(TsgRaw) % loop on all TsgRaw data
% if TsgRaw(i,:) == NaN % -----------------------
% ssjt_freq = NaN; for i=1:length(TsgRaw)
% ssjt_freq = NaN;
% else % remove leading and trailing white space when string contain NaN
% freq = sscanf(TsgRaw(i,:), '%4x%4x'); % ---------------------------------------------------------------
% ssjt_freq = freq(1)/19 + 2100; if ~strcmp(strtrim(TsgRaw(i,:)), 'NaN')
% cndc_freq = sqrt(freq(2)*2100 + 6250000);
% end % get frenquencies from string
% tsg.SSJT_FREQ = [tsg.SSJT_FREQ;ssjt_freq]; % ----------------------------
% tsg.CNDC_FREQ = [tsg.CNDC_FREQ;cndc_freq]; freq = sscanf(TsgRaw(i,:), '%4x%4x%*');
% end
% compute frenquencies
% --------------------
tsg.SSJT_FREQ(i) = freq(1)/19 + 2100;
tsg.CNDC_FREQ(i) = sqrt(freq(2)*2100 + 6250000);
end
end
% Save original date % Save original date
% ------------------ % ------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment