Skip to content
Snippets Groups Projects
Commit eec86061 authored by oboebel's avatar oboebel
Browse files

Added single source + topography (SiSoTopo) plugin to tracking options.

parent 63a5ddb2
No related branches found
No related tags found
No related merge requests found
function [positions, clockError] = SiSoTopo(pData, pSoundsourcePositions, pCombinationDetails, pStartEndPosition)
%MYTRACKINGMETHOD A sample function to write your own tracking algorithms
%
% Parameters:
% pData (struct):
% Data structured by soundsource. The toa is already corrected
% (e.g. doppler correction etc.)
% pSoundsourcePositions (struct):
% The soundsource positions [deg].
% pCombinationDetails (table):
% Contains all information of the current soundsource
% combination.
% pStartEndPosition (double, logical):
% Set to false if it has not been passed by artoa. Contains the
% desired start and end position as a matrix of row vectors.
%
%
% Returns:
% positions (double):
% The calculated list of segment positions as a X x 2 column vector.
% clockError (double):
% The estimated clock error.
%% Get reference position and all soundsource names that are involved
referencePosition = cellfun(@str2double, strsplit(pCombinationDetails.referencePosition{1}));
soundsourceNames = strsplit(pCombinationDetails.soundsources{1});
%% Show all data that has been passed to the plugin method
pData
pCombinationDetails
pSoundsourcePositions
%% Return NaN because this is a sample
positions = NaN(size(pData.(soundsourceNames{1}).date, 1), 2);
clockError = [];
% control plots %%
figure
lati = [-78 -60]
loni = [-70 0]
h = axesm('MapProjection','stereo','MapLatLimit',lati,'MapLonLimit',loni,'Frame','on','Grid','on')
MapHandle = worldmap(lati,loni);
% plot the map
load('C:\Users\oboebel\Documents\MATLAB\CPTCMAP\WeddellContours.mat')
helper = fliplr(cArray{3}');
latMap = helper(:,1);
lonMap = helper(:,2);
plotm(latMap,lonMap) % index 3 = 2000m , then upwards in 50m increments
hold on
% program uses only first selected sound source
centerSoSo = pSoundsourcePositions.W18a
distance = [pData.W18a.distance{:}]';
distance = distance/60/1.852 %--> distence in arch length
for i = 1:length(distance)
[lat,lon] = scircle1(centerSoSo(1),centerSoSo(2),distance(i))
%plotm(lat,lon,'r');
[xi,yi] = polyxpoly(latMap,lonMap,lat,lon); % hier muss die zum Druck passende latMap lonMap verwendung finden.
plotm(xi,yi,'xk')
drawnow
end
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