Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

Commit 55849e31 authored by hark's avatar hark
Browse files

SOFA exports now uses spherical coordinates for the SourcePosition field, as...

SOFA exports now uses spherical coordinates for the SourcePosition field, as defined in SOFA 1.0 specs
parent 4ab90eec
...@@ -42,28 +42,20 @@ if isa(data,'itaHRTF') ...@@ -42,28 +42,20 @@ if isa(data,'itaHRTF')
else else
coordinates = data.channelCoordinates; coordinates = data.channelCoordinates;
end end
cartData = coordinates.cart;
sofaObj.(coordinateType) = cartData;
sofaObj.(sprintf('%s_Type',coordinateType)) = 'cartesian';
sofaObj.(sprintf('%s_Units',coordinateType)) = 'meter';
switch coordinateType
case 'ReceiverPosition'
cartData = coordinates.cart;
sofaObj.(coordinateType) = cartData;
sofaObj.(sprintf('%s_Type',coordinateType)) = 'cartesian';
sofaObj.(sprintf('%s_Units',coordinateType)) = 'meter';
case 'SourcePosition'
sphericalData = [coordinates.azimuth,coordinates.elevation,coordinates.r];
sofaObj.(coordinateType) = sphericalData;
sofaObj.(sprintf('%s_Type',coordinateType)) = 'spherical';
sofaObj.(sprintf('%s_Units',coordinateType)) = 'degree, degree, meter';
end
warning('ITA_WRITE_SOFA: Only the main coordinates are saved. Orientation etc is discarded'); warning('ITA_WRITE_SOFA: Only the main coordinates are saved. Orientation etc is discarded');
% % object coordinates
%
% % switch the coordinate destination
% if strcmp(coordinateType,'SourcePosition')
% coordinateType = 'ReceiverPosition';
% else
% coordinateType = 'SourcePosition';
% end
%
% coordinates = data.chanelCoordinaes;
% cartData = coordinates.cart;
%
% sofaObj.(coordinateType) = cartData;
% sofaObj.(sprintf('%s_Type',coordinateType)) = 'cartesian';
% sofaObj.(sprintf('%s_Units',coordinateType)) = 'meter';
end end
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