% Creo la matrice che scriverò su DB
function DATAinsert = cellMakerTLHRH(IDcentralina,DTcatena,NodeNum,cTLHRH,ListaDate,...
    Y_TLHRH,Z_TLHRH,Ylocal_TLHRH,Zlocal_TLHRH,AlfaX_TLHRH,AlfaY_TLHRH,TempDef_TLHRH,...
    speed_TLHRH,speed_local_TLHRH,acceleration_TLHRH,acceleration_local_TLHRH,...
    ErrTiltLinkHRH,ARRAYdate_TLHRH)
            
TempDef_TLHRH = TempDef_TLHRH';
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_TLHRH(ii),'yyyy-mm-dd');
    DATAinsert{ii,5} = datestr(ARRAYdate_TLHRH(ii),'HH:MM:SS');
    DATAinsert{ii,6} = Y_TLHRH(cTLHRH,ii);
    DATAinsert{ii,7} = Z_TLHRH(cTLHRH,ii);
    DATAinsert{ii,8} = Ylocal_TLHRH(cTLHRH,ii);
    DATAinsert{ii,9} = Zlocal_TLHRH(cTLHRH,ii);
    DATAinsert{ii,10} = AlfaX_TLHRH(cTLHRH,ii);
    DATAinsert{ii,11} = AlfaY_TLHRH(cTLHRH,ii);
    DATAinsert{ii,12} = TempDef_TLHRH(cTLHRH,ii);
    DATAinsert{ii,13} = speed_TLHRH(cTLHRH,ii);
    DATAinsert{ii,14} = speed_local_TLHRH(cTLHRH,ii);
    DATAinsert{ii,15} = acceleration_TLHRH(cTLHRH,ii);
    DATAinsert{ii,16} = acceleration_local_TLHRH(cTLHRH,ii);
    DATAinsert{ii,17} = ErrTiltLinkHRH(cTLHRH,ii);
end

end
