36 lines
995 B
Matlab
Executable File
36 lines
995 B
Matlab
Executable File
% Funzione che converte i dati grezzi del Tilt Link HR H in dati di
|
|
% angoli (acc_TLHR)
|
|
|
|
function [angTLHRH,tempTLHRH] = conv_grezziTLHRH(angTLHRH,tempTLHRH,DCalTLHRHTot,...
|
|
rTLHRH,FileName)
|
|
|
|
fileID = fopen(FileName,'a');
|
|
fmt = '%s \r';
|
|
text = 'conv_grezziTLHRH function started';
|
|
fprintf(fileID,fmt,text);
|
|
|
|
caTLHRH = [DCalTLHRHTot(:,1) DCalTLHRHTot(:,2)];
|
|
caT_HRH = DCalTLHRHTot(:,3);
|
|
intT_HRH = DCalTLHRHTot(:,4);
|
|
|
|
i = 1;
|
|
m = 1;
|
|
% Contatore dei nodi, converte i punti ADC con le calibrazioni in valori
|
|
% angolari
|
|
while i <= 2*rTLHRH % nodo
|
|
angTLHRH(:,i) = angTLHRH(:,i)*caTLHRH(m,1);
|
|
angTLHRH(:,i+1) = angTLHRH(:,i+1)*caTLHRH(m,2);
|
|
i = i+2;
|
|
m = m+1;
|
|
end
|
|
|
|
%% Conversione delle temperature
|
|
for t = 1:rTLHRH
|
|
tempTLHRH(:,t) = tempTLHRH(:,t)*caT_HRH(t,1) + intT_HRH(t,1);
|
|
end
|
|
|
|
text = 'Raw Data of Tilt Link HR H converted into physical units correctly. conv_grezziTLHRH function closed';
|
|
fprintf(fileID,fmt,text);
|
|
fclose(fileID);
|
|
|
|
end |