Skip to content
Snippets Groups Projects
Commit 6099b9a7 authored by leprob001's avatar leprob001
Browse files

Bugfix, the circular tracking method has not been copied correctly.

parent 3c4943be
No related branches found
No related tags found
No related merge requests found
209
\ No newline at end of file
210
\ No newline at end of file
......@@ -22,11 +22,11 @@ function [positions, clockError] = Circular(pData, pSoundsourcePositions, pCombi
referencePosition = cellfun(@str2double, strsplit(pCombinationDetails.referencePosition{1}));
soundsourceNames = strsplit(pCombinationDetails.soundsources{1});
%% Check if three soundsources are available
if length(soundsourceNames) ~= 3
errordlg(['Hyperbolic tracking algorithm requires three soundsources. ' num2str(length(soundsourceNames)) ' selected!']);
error(['Hyperbolic tracking algorithm requires three soundsources. ' num2str(length(soundsourceNames)) ' selected!']);
end
% %% Check if three soundsources are available
% if length(soundsourceNames) ~= 3
% errordlg(['Hyperbolic tracking algorithm requires three soundsources. ' num2str(length(soundsourceNames)) ' selected!']);
% error(['Hyperbolic tracking algorithm requires three soundsources. ' num2str(length(soundsourceNames)) ' selected!']);
% end
%% Prepare data for calculations
% get a date vector (does not matter which one)
......@@ -56,17 +56,9 @@ for oDates = 1:length(dates)
continue;
end
positions = [positions; ...
rad2deg(artoa.vendor.xnavai(deg2rad(soundsourcePositions), distances, deg2rad(referencePosition), 3)) ...
rad2deg(artoa.vendor.xnavai(deg2rad(soundsourcePositions), distances, deg2rad(referencePosition), 2)) ...
];
currentClockError = NaN(1, 3);
for oClockError = 1:3
currentClockError(oClockError) = ...
( ...
artoa.data.calculateEllipk4(positions(end, :), ...
deg2rad(soundsourcePositions(oClockError,:))) - distances(oClockError) ...
) / (soundVelocity(oClockError)/1000);
end
clockError = [clockError; currentClockError];
clockError = [clockError; NaN(1, 3)];
end
positions = positions(2: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