function [ fit_struct ] = vectorFit( ts, zs, max_iters, dist_thr, inlier_percent)

%Do RANSAC fit
[theta,rho] = ransac([ts,zs]',max_iters,dist_thr,inlier_percent);
slope = -tan(theta);
intercept = rho/cos(theta);
fit_struct = cfit(fittype('poly1'),slope,intercept);

end
