pause(10);
[~, timeStampArray, locationArray, ~, VTRecsReturned, ~] = NlxGetNewVTData(vt_acq_ent);
sound(beep0,fs_sin);
x0 = double(locationArray(end - 1)).*scale_x-x_center;
    y0 = double((-1)*locationArray(end)).*scale_y-y_center;
    if x0>=0
        if x0==0
            x0=0.1;
        end
        ang0=mod(atan(y0/x0),2*pi);
    else
        ang0=mod(atan(y0/x0)+pi,2*pi);
    end
    if strcmp(rot,'Clockwise');
        ang0=2*pi-ang0;
    end
ang0_diff=ang0-Ang_center;
    ang0_diff(ang0_diff<(-1)*pi)=ang0_diff(ang0_diff<(-1)*pi)+2*pi;
    ang0_diff(ang0_diff>pi)=ang0_diff(ang0_diff>pi)-2*pi;