Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martin Karlsson
turtlerob1
Commits
e919bd16
Commit
e919bd16
authored
Sep 24, 2015
by
Fredrik Bagge Carlsson
Browse files
keep the updates flowing
parent
6621bd64
Changes
1
Hide whitespace changes
Inline
Side-by-side
track_audio.m
View file @
e919bd16
...
...
@@ -5,15 +5,29 @@ clc;
% To be modified
%% Simulation parameters
%% Request interaural time differences (ITDs)
requests
=
{
'itd'
};
% Parameters of the auditory filterbank processor
fb_type
=
'gammatone'
;
fb_lowFreqHz
=
80
;
fb_highFreqHz
=
8000
;
fb_nChannels
=
32
;
% Parameters of innerhaircell processor
ihc_method
=
'dau'
;
% Parameters of crosscorrelation processor
cc_wSizeSec
=
0.02
;
cc_hSizeSec
=
0.01
;
cc_wname
=
'hann'
;
% Summary of parameters
par
=
genParStruct
(
'fb_type'
,
fb_type
,
'fb_lowFreqHz'
,
fb_lowFreqHz
,
...
'fb_highFreqHz'
,
fb_highFreqHz
,
'fb_nChannels'
,
fb_nChannels
,
...
'ihc_method'
,
ihc_method
,
'cc_wSizeSec'
,
cc_wSizeSec
,
...
'cc_hSizeSec'
,
cc_hSizeSec
,
'cc_wname'
,
cc_wname
);
% Parameters used by the auditory front-end
simParams
.
fLowHz
=
80
;
% Lower center frequency of the gammatone
% filterbank in Hz
simParams
.
fHighHz
=
8000
;
% Upper center frequency of the gammatone
% filterbank in Hz
simParams
.
nChannels
=
32
;
% Number of filterbank channels
simParams
.
frameSize
=
50E-3
;
% Frame size in seconds
%% Model parameters
...
...
@@ -39,6 +53,7 @@ addpath('./tools');
addpath
(
'./ekfukf-toolbox'
);
figure
(
1
)
signal
=
...
% get signal here
...
...
@@ -65,11 +80,17 @@ posteriorCovariance = zeros(size(A, 1), size(A, 1), N);
% Perform localization and tracking
for
l
=
1
:
N
audio
=
get_audio
();
dObj
=
dataObject
(
audio
,
fsHz
);
% Create a manager
mObj
=
manager
(
dObj
,
requests
,
par
);
% Request processing
mObj
.
processSignal
();
% ===================================================
% TODO: Perform steps to get measurements inside this loop!
% ===================================================
% y = get_measurement();
% y = get_measurement();
y
=
measuredLocations
(
l
);
% TODO: Modify this to get a measurement!
% Perform Kalman filter prediction and update
[
x
,
P
]
=
kf_predict
(
x
,
P
,
A
,
Q
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment