Skip to content
Snippets Groups Projects
Commit 4506ae63 authored by leprob001's avatar leprob001
Browse files

Added test function for two conversion functions.

  + artoa.convert.rawToa2PhaseRefTime
  + artoa.data.addFloatOffsetAndSignalLength
parent b9cb4743
No related branches found
No related tags found
No related merge requests found
function [success] = toaConversion()
%TOACONVERSION Tests if the TOA conversion is correct.
% Uses the variable TOA of float_0272.mat file to check if the calculations
% are correct.
[currentDirectory, ~, ~] = fileparts(mfilename('fullpath'));
dataFileName = fullfile(currentDirectory, '..', 'data', '0272.rfb');
float = artoa.load.rfb(dataFileName);
% load test mat file exported from old version of artoa3
load(fullfile(currentDirectory, '..', 'data', 'float_0272_globals.mat'));
global TOA;
convertedToPhaseRefTime = artoa.convert.rawToa2PhaseRefTime(float);
convertedToa = artoa.data.addFloatOffsetAndSignalLength(float, convertedToPhaseRefTime);
success = ~any((TOA - convertedToa) > 0);
end
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