% Creo la matrice che scriverò su DB
function DATAinsert = cellMakerTLH(IDcentralina,DTcatena,NodeNum,cTLH,ListaDate,...
    Y_TLH,Z_TLH,Ylocal_TLH,Zlocal_TLH,AlfaX_TLH,AlfaY_TLH,TempDef_TLH,speed_TLH,...
    speed_local_TLH,acceleration_TLH,acceleration_local_TLH,ErrTiltLinkH,ARRAYdate_TLH)
            
TempDef_TLH = TempDef_TLH';
l = ListaDate;
DATAinsert = cell(l,17);

for ii=1:l
    DATAinsert{ii,1} = IDcentralina;
    DATAinsert{ii,2} = DTcatena;
    DATAinsert{ii,3} = NodeNum;
    DATAinsert{ii,4} = datestr(ARRAYdate_TLH(ii),'yyyy-mm-dd');
    DATAinsert{ii,5} = datestr(ARRAYdate_TLH(ii),'HH:MM:SS');
    DATAinsert{ii,6} = Y_TLH(cTLH,ii);
    DATAinsert{ii,7} = Z_TLH(cTLH,ii);
    DATAinsert{ii,8} = Ylocal_TLH(cTLH,ii);
    DATAinsert{ii,9} = Zlocal_TLH(cTLH,ii);
    DATAinsert{ii,10} = AlfaX_TLH(cTLH,ii);
    DATAinsert{ii,11} = AlfaY_TLH(cTLH,ii);
    DATAinsert{ii,12} = TempDef_TLH(cTLH,ii);
    DATAinsert{ii,13} = speed_TLH(cTLH,ii);
    DATAinsert{ii,14} = speed_local_TLH(cTLH,ii);
    DATAinsert{ii,15} = acceleration_TLH(cTLH,ii);
    DATAinsert{ii,16} = acceleration_local_TLH(cTLH,ii);
    DATAinsert{ii,17} = ErrTiltLinkH(cTLH,ii);
end

end
