Commit dec646f0 authored by michael.kohnen's avatar michael.kohnen

Updated loudspeaker positions and added options

parent 29b2d036
function pos = VR_loudspeaker_position
function pos = VR_loudspeaker_position(varargin)
% Give back the position, in meters, of the 8 loudspeakers in the VR lab.
%
% Used coordinate system
% Z
% |
% |
% |
% | - - - - Y
% /
% /
% /
% X
% See options for more details
% <ITA-Toolbox>
% This file is part of the application SpatialAudio for the ITA-Toolbox. All rights reserved.
% You can find the license for this m-file in the application folder.
% </ITA-Toolbox>
% Author: Michael Kohnen -- Email: mko@akustik.rwth-aachen.de
% Date: 03-May-2017
% Options
opts.virtualSpeaker = false; % true || Indicates whether to add virtual speaker achieve a more regular distribution (stabilizes the pseudoinverse in Ambisonics Decoding)
opts.coordSystem = 'itaCoordinates'; % 'openGL' || indicates in which coordinate system the output is
opts.isItaCoordinates = false; % true || indicates whether the output is a itaCoordinate or not (warning: if combined with coordSystem='opneGL', the angles for azimuth and elevation are not correct
opts.heightCorrection = -1.3275; % in meter || ensures that the loudspeakers are around the point (0 0 0), standard value is height of the bigger loudspeaker in the horizontal plane
pos = itaCoordinates(8);
opts=ita_parse_arguments(opts, varargin);
% X Y Z
pos.cart = [...
-1.75 -1.75 -0.80;...
-1.75 1.75 -0.80;...
1.75 1.75 -0.80;...
1.75 -1.75 -0.80;...
-1.75 -1.75 0.80;...
-1.75 1.75 0.80;...
1.75 1.75 0.80;...
1.75 -1.75 0.80];
\ No newline at end of file
hc=opts.heightCorrection;
% X Y Z (openGL)
pos = [...
-2 1.3275+hc -2;...
2 1.3275+hc -2;...
2 1.3275+hc 2;...
-2 1.3275+hc 2;...
0 2.6+hc -3;... % ls5
3 2.6+hc 0;...
0 2.6+hc 3;...
-3 2.6+hc 0;...
0 0.2+hc -3;...
3 0.2+hc 0;... % ls10
0 0.2+hc 3;...
-3 0.2+hc 0;];
if opts.virtualSpeaker
pos = [pos;...
0 0+hc 0;... % virtual speaker
0 3+hc 0]; % virtual speaker
end
if strcmp(opts.coordSystem,'itaCoordinates')
pos = ita_openGL2Matlab(pos);
end
if opts.isItaCoordinates
pos = itaCoordinates(pos);
end
\ No newline at end of file
Markdown is supported
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