33 lines
900 B
Matlab
Executable File
33 lines
900 B
Matlab
Executable File
function [angPCLHR,tempPCLHR] = conv_grezziPCLHR(angPCLHR,tempPCLHR,DCalPCLHRTot,...
|
|
rPCLHR,FileName)
|
|
|
|
text = 'conv_grezziPCLHR function started';
|
|
fileID = fopen(FileName,'a');
|
|
fmt = '%s \r';
|
|
fprintf(fileID,fmt,text);
|
|
|
|
caPCLHR = [DCalPCLHRTot(:,1) DCalPCLHRTot(:,2)];
|
|
caT_HRH = DCalPCLHRTot(:,3);
|
|
intT_HRH = DCalPCLHRTot(:,4);
|
|
|
|
i = 1;
|
|
m = 1;
|
|
% Contatore dei nodi, converte i punti ADC con le calibrazioni in valori
|
|
% angolari
|
|
while i <= 2*rPCLHR % nodo
|
|
angPCLHR(:,i) = angPCLHR(:,i)*caPCLHR(m,1);
|
|
angPCLHR(:,i+1) = angPCLHR(:,i+1)*caPCLHR(m,2);
|
|
i = i+2;
|
|
m = m+1;
|
|
end
|
|
|
|
%% Conversione delle temperature
|
|
for t = 1:rPCLHR
|
|
tempPCLHR(:,t) = tempPCLHR(:,t)*caT_HRH(t,1) + intT_HRH(t,1);
|
|
end
|
|
|
|
text = 'Raw Data of PreConv Link HR converted into physical units correctly. conv_grezziPCLHR function closed';
|
|
fprintf(fileID,fmt,text);
|
|
fclose(fileID);
|
|
|
|
end |