Sync from remote server: 2025-10-12 18:56:41

This commit is contained in:
2025-10-12 18:56:59 +02:00
commit 7e8ee264aa
553 changed files with 161447 additions and 0 deletions

51
Tilt/azzeramenti.m Executable file
View File

@@ -0,0 +1,51 @@
%% Funzione che mette a zero gli spostamenti di alcuni nodi specifici
function [dNS,dEO,dZ] = azzeramenti(IDcentralina,DTcatena,dNS,dEO,dZ,NodoTiltLink,FileName)
fileID = fopen(FileName,'a');
fmt = '%s \r';
text = 'azzeramenti function started';
fprintf(fileID,fmt,text);
NomeFile = strcat(IDcentralina,'-',DTcatena,'-','Azzeramenti.txt');
if isfile(NomeFile) == 1
Dati = importdata(NomeFile);
if Dati(1,1) == 99999
else
[r,~] = size(Dati);
for i = 1:r
if Dati(i,1) == 99999
break
else
nodo = Dati(i);
dNS(nodo,:) = 0;
dEO(nodo,:) = 0;
dZ(nodo,:) = 0;
num = cell2mat(NodoTiltLink(nodo,2));
text = ['---Node Tilt Link V number ' num2str(num) ' has not been elaborated due to forced reset.---'];
fprintf(fileID,fmt,text);
end
end
end
else
fclose(fileID);
Parametro1 = 99999;
Parametro2 = 9999999999;
outdat = fopen(NomeFile,'wt+');
fopen(NomeFile,'wt');
fmt = '%d \r';
fileA = fopen(NomeFile,'a');
fprintf(fileA,fmt,Parametro1);
fprintf(fileA,fmt,Parametro2);
fclose(fileA);
fileID = fopen(FileName,'a');
fmt = '%s \r';
text = 'azzeramenti function created the reference file correctly';
fprintf(fileID,fmt,text);
end
text = 'azzeramenti function closed';
fprintf(fileID,fmt,text);
fclose(fileID);
end