function B_estimated = RefCoordBallCM( qi,rTc,Cx,Cy,dfocal,L )

%-- Vector comprimentos: L = [l0 l1 l2 l3 l4 lt_L lt_W lt_H] -------------------------
 l0 = L(1); l1 = L(2); l2 = L(3); l3 = L(4); lt_h = L(8);
%-- Transformaçao 
 Cz = ( l2*sin(qi(2))-cos(qi(2))*(l3+Cy)-l0-lt_h-l1 ) /...  %-- Bola no solo Rp(Z)=0!!!
      ( (l3*cos(qi(2))-l2*sin(qi(2))+l0+lt_h+l1)/dfocal-sin(qi(2)) );
 inv_P = [eye(3) zeros(3,1) ; 0 0  1/dfocal 1];
 Rh = rTc*inv_P*[Cx ; Cy ; Cz ; 1];  %-- Rh = rTc*inv_P*[Cx ; Cy ; Ch(3)/k ; 1]
 B_estimated = [Rh(1)/Rh(4) ; Rh(2)/Rh(4)]; %-- Estimativa da posiçao da bola ...
 