Determining the best total least squares normalized line  αx + βy + γ = 0,  (α^2) +(β^2) = 1, in the plane

Input: data set 𝒜 = {(Subscript[a, i])=((Subscript[x, i]),(Subscript[y, i]))∈ (ℝ^2) : i=1,⃛,m} with weights w=((Subscript[w, 1]),⃛,(Subscript[w, m])); 
Output: parameters (α,β,γ);
Submodules: none needed

TLSline[w_,A_]:=Module[{m=Length[A],BTB,eigv,x0,y0},
{x0,y0}=Mean[WeightedData[A,w]];
BTB=Sum[w[[s]]*KroneckerProduct[(A[[s]]-{x0,y0}),(A[[s]]-{x0,y0})],{s,m}]//N;
eigv=Eigenvectors[BTB][[2]]; eigv=eigv/Norm[eigv];
{eigv[[1]],eigv[[2]],-x0 eigv[[1]]-y0 eigv[[2]]}
]