Skip to content
Snippets Groups Projects
Commit 3eb6ef31 authored by leprob001's avatar leprob001
Browse files

Updated rfc format.

parent b379e691
No related branches found
No related tags found
No related merge requests found
290
\ No newline at end of file
291
\ No newline at end of file
......@@ -32,6 +32,10 @@ filter = artoa.data.getMember(artoaConfig, {'filemask', 'rfc'}, '*.rfc');
%% Ask for filename
[filename, pathname] = uiputfile(fullfile(folder, filter));
if filename == 0
return;
end
filepath = fullfile(pathname, filename);
artoa.save.rfc(filepath, artoaWorkspace.float, data, trajectory);
......
......@@ -154,41 +154,58 @@ trajectoryHeader = { ...
['** Interpolation step size: ' num2str(pTrajectory.trackParameter.interpolationInterval) ' hours'], ...
['** Interpolation gap size: ' num2str(pTrajectory.trackParameter.gapSize)], ...
['** Doppler correction: ' dopplerCorrectionUsed], ...
['** -------'], ...
['** Sound source combinations: (rafos day, sound sources, reference position, sound speed)'] ...
['** -------'] ...
};
trajectoryHeader = strjoin(trajectoryHeader, newline);
soundSourcesHeader = '';
for i = 1:size(pTrajectory.trackParameter.soundsourceCombinations, 1)
currentCombination = pTrajectory.trackParameter.soundsourceCombinations(i, :);
soundSourcesHeader = [ ...
soundSourcesHeader ...
'** ' num2str(currentCombination.combinationBegin) ' to ' num2str(currentCombination.combinationEnd) ': ' ...
currentCombination.soundsources ' ' ...
currentCombination.referencePosition ' ' ...
num2str(currentCombination.soundspeed1) ...
newline ...
];
end
% soundSourcesHeader = '';
% for i = 1:size(pTrajectory.trackParameter.soundsourceCombinations, 1)
% currentCombination = pTrajectory.trackParameter.soundsourceCombinations(i, :);
% soundSourcesHeader = [ ...
% soundSourcesHeader ...
% '** ' num2str(currentCombination.combinationBegin) ' to ' num2str(currentCombination.combinationEnd) ': ' ...
% currentCombination.soundsources ' ' ...
% currentCombination.referencePosition ' ' ...
% num2str(pTrajectory.offsets{'Float', 'AppliedSound) ...
% newline ...
% ];
% end
%
% soundSourcesHeader = [ ...
% soundSourcesHeader ...
% '** -------' newline ...
% '** Additional Float clock offsets, seconds (beginning, end): ' ...
% num2str(pTrajectory.offsets{'Float', 'OffsetStart'}) ...
% ' ' ...
% num2str(pTrajectory.offsets{'Float', 'OffsetStart'}) newline ...
% '** -------' newline ...
% ' * l ----------' ...
% ];
%% write tables to temporary files
writetable(pTrajectory.trackParameter.soundsourceCombinations, 'c.tmp', 'Delimiter', '\t', 'FileType', 'text', 'WriteRowNames', true, 'WriteVariableNames', true);
writetable(pTrajectory.offsets, 'o.tmp', 'Delimiter', '\t', 'FileType', 'text', 'WriteRowNames', true, 'WriteVariableNames', true);
c = fileread('c.tmp');
o = fileread('o.tmp');
delete 'c.tmp' 'o.tmp';
soundSourcesHeader = [ ...
soundSourcesHeader ...
'** -------' newline ...
'** Additional Float clock offsets, seconds (beginning, end): ' ...
num2str(pTrajectory.offsets{'Float', 'OffsetStart'}) ...
' ' ...
num2str(pTrajectory.offsets{'Float', 'OffsetStart'}) newline ...
newline '** Track parameter table' newline ...
regexprep(strrep(['** ' c], newline, [newline '** ']), '\t', '\t\t') ...
newline '** -------' newline ...
'** Offsets table' newline ...
regexprep(strrep(['** ' o], newline, [newline '** ']), '\t', '\t\t') ...
'** -------' newline ...
' * l ----------' ...
];
];
headerString = strjoin([ ...
headerString = [ ...
headerString newline...
trajectoryHeader newline ...
trajectoryHeader ...
soundSourcesHeader newline ...
], '');
];
%% Save to file
saveToFile(pFilename, headerString, dataString);
......
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