How to determine relative position with only base angles known? I am trying to make automated lawn mower based on Arduino , but I got stuck in mathematics part.
Here comes the question:

I need to determine relative position of the lawn mower "circle" in the (% of X, % of Y),when only angles (ab,bc,cd,da) are known (measured by lawn mower).
Answer or direction to helpful resource would be highly appreciated!
 A: Have a look at the figure below:

It suffices to work with 2 angles: $\alpha$:=angle cd (in green) and $\beta$:=angle da (in red). The other angle information is redundant.
Let us recall the property of inscribed angle: the set of points from which one "sees" a fixed segment under a given angle is an arc of circle (and this segment is then a chord of this circle). The two arcs corresponding to the two angles $\alpha$ and $\beta$ and the two chords $DC$ and $DA$ are drawn on the figure above.
We assume the coordinates $(c,0)$ of $C$ and $(0,a)$ of $A$ as known.
How can we deduce the coordinates $(x_E,y_E)$ of $E$ from the knowledge of angles $\alpha$ and $beta$ ? This will result of rather simple formulas that we are going to establish in three steps:


*

*step 1: find the coordinates of intersection points $I(x_I=c,y_I)$ and $H(x_H,y_H=a)$ with line $BC$ and line $AB$ resp. (warning: these points may be situated outside line segments $BC$ or $AB$): 
$$y_I=\dfrac{c}{\tan(\alpha)} \ \ \text{and} \ \ x_H=\dfrac{a}{\tan(\beta)}.$$

*step 2: compute the equations of circles with resp. diameters $DI$ and $DH:$  
$$\begin{cases}x^2+y^2-x_Ix-y_Iy&=&0& \ \ (a)\\x^2+y^2-x_Hx-y_Hy&=&0& \ \ (b)\end{cases}$$


*

*step 3: solve this system. This is quite easy, because, by substraction we obtain a first degree relationship which is in fact the equation of straight line $DE$:


$$y=k x \ \ \text{with} \ \ k=- \dfrac{x_I-x_H}{y_I-y_H} \ \ \ (c)$$
Plugging this expression into (a), we obtain the abscissa of $E$: $x=\dfrac{x_I +k y_I}{1+k^2} $ (eliminating spurious solution $x=0$ that corresponds to point $D).$
Remark: $E$ is on line $IH$. Explanation: $HD$ and $DI$ are diameters of their resp. arcs, thus $\widehat{HED}=\widehat{IED}=\pi/2$.
Here is a short Matlab program using the different formulas above for the computation of the coordinates of $E:$ 

deg=pi/180; % conversion factor degrees -> radians
  a=2;c=3; % width and length
  alpha=76.15$*$deg;beta=43.47$*$deg; % angles input
  xH=a/tan(beta);yH=a;
  xI=c;yI=c/tan(alpha);
  k=-(xI-xH)/(yI-yH); % slope of DE
  x=(xI +k$*$yI)/(1+k^2);y=k$*$x; % coord. of E
  x,y

