Commit 2fe2987d authored by Fredrik Bagge Carlsson's avatar Fredrik Bagge Carlsson
Browse files

clean up

parent f255763a
......@@ -15,13 +15,6 @@ simParams.fHighHz = 8000; % Upper center frequency of the gammatone
simParams.nChannels = 32; % Number of filterbank channels
simParams.frameSize = 50E-3; % Frame size in seconds
% Optional noise types
% Choose between 'none', 'busystreet', 'restaurant', 'supermarket' and
% 'tubestation'
noiseType = 'tubestation';
% Signal to noise ratio in dB
snr = 0;
%% Model parameters
......@@ -46,11 +39,9 @@ addpath('./tools');
addpath('./ekfukf-toolbox');
%% Simulation
figure(1)
signal = ...
signal = ... % get signal here
% Get signal length and number of frames
nSamples = size(signal, 1);
nFrames = floor(nSamples / (simParams.frameSize * fsHz));
......@@ -66,14 +57,20 @@ azimuthDistribution = ...
squeeze(dataObj.azimuthDistribution{1}.Data(:));
% Use -90 to align coordinate system
measuredLocations = argmax(azimuthDistribution, 2) - 90;
N = length(measuredLocations);
% Initialize posterior mean and covariance
posteriorMean = zeros(size(A, 1), length(measuredLocations));
posteriorCovariance = zeros(size(A, 1), size(A, 1), ...
length(measuredLocations));
posteriorMean = zeros(size(A, 1), N);
posteriorCovariance = zeros(size(A, 1), size(A, 1), N);
% Perform localization and tracking
for l = 1 : length(measuredLocations)
for l = 1:N
% ===================================================
% Perform steps to get measurements inside this loop!
% ===================================================
% Perform Kalman filter prediction and update
[x, P] = kf_predict(x, P, A, Q);
[x, P] = kf_update(x, P, measuredLocations(l), c', R);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment