how to convert spherical coordinate to cartesian in DoA algorithm?
Afficher commentaires plus anciens
Hello everyone, I am trying to localize an ultrasonic source with microphone Arrays using DoA algorithm. In fact, I want to have the final figure in Cartesian coordinate but DoA produces it in Azimuth and Elevation angles. I have already tried [x,y,z] = sph2cart(azimuth,elevation,r), but because there are too many different values for Azimuth and Elevation which are unknown to me, I cant have x,y,z. Do you know perhaps an easier way? I hope ist all clear! Thank you in advance.
h = phased.ConformalArray();
t= 1/2*(1+sqrt(5));
n=16;
c= ones(n,1)';
c(:)=1:16;
h.ElementPosition = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;(sqrt(c).*cos(2*pi*t*c))*0.0375;(sqrt(c).*sin(2*pi*t*c))*0.0375];
h.ElementNormal = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0];
h.Element = ...
phased.OmnidirectionalMicrophoneElement('BackBaffled',true,'FrequencyRange',[48e3 580e3]);
ang1 = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; % First signal
ang2 = [-3; 35]; % Second signal
angs = [ang1];
c = 343;
fc = 107e3; % Operating frequency
lambda = c/fc;
pos = getElementPosition(h)/lambda;
Nsamp = 1000;
nPower = 0.09;
rs = rng(2007);
scov=sig;
x = sensorsig(pos,Nsamp,angs,nPower,scov);
broadsideAngle = az2broadside(angs(1,:),angs(2,:));
hMVDR = phased.MVDREstimator2D('SensorArray',h,...
'PropagationSpeed',c,'OperatingFrequency',fc,...
'AzimuthScanAngles',-45:60,'ElevationScanAngles',-10:60,...
'DOAOutputPort',true,'NumSignals',1);
[~,ang] = step(hMVDR,x);
plotSpectrum(hMVDR);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Direction of Arrival Estimation dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!