Is there a way to use the equation of an ellipse to obtain the angle of rotation of the horizontal ellipse as shown in the figure? I need to obtain the angle of rotation($\theta$) of the ellipse that would cause it to touch the circle centered at $(x_2,y_2)$. The values $d, c, s.$ and $m$ are known and the coordinates shown in the figure are also known. Note that the ellipse is away from the origin too. My intuition is to use the equation of an ellipse, but I'm struggling with finding the equation for the ellipse given that I do not know the angle of rotation.
Any help would be greatly appreciated.
The image in the link shows a picture of the dimensions and what is required.
 A: 
To make things simpler, let's move the origin to the point of rotation and let's rotate circle, not ellipse. 
Known values: $x_A, y_A, r, a, b, x_C$, with $r$ being a circle radius, and $a,b$ semi-axes of the ellipse.
First condition:
$$OA=OB$$
$$x_A^2 + y_A^2 = x_B^2 + y_B^2\qquad(1)$$
Second condition: The point $H$ must be on the circle:
$$(x_H-x_B)^2 + (y_H-y_B)^2 = r^2\qquad(2)$$
Third condition: The point $H$ must be on the ellipse:
$$\frac{(x_H-x_C)^2}{a^2}+\frac{y_H^2}{b^2}=1\qquad(3)$$
Fourth condition: The slope of circle tangent and ellipse tangent at point H has to be the same.
The slope of tangent to the circle at point $H$ is the slope of line perpendicular to radius $BH$:
$$s_1=-\frac{x_H-x_B}{y_H-y_B}$$ 
The slope of tangent to the ellipse at point $H$ can be calculated by differentiating the equation of the ellipse:
$$\frac{(x-x_C)^2}{a^2}+\frac{y^2}{b^2}=1$$
$$\frac{x-x_C}{a^2} + \frac{y}{b^2} y'=0$$
$$y'=-\frac{b^2(x-x_C)}{a^2 y}$$
$$s_2=-\frac{b^2(x_H-x_C)}{a^2 y_H}$$
Slopes $s_1$ and $s_2$ must be equal:
$$\frac{x_H-x_B}{y_H-y_B} = \frac{b^2(x_H-x_C)}{a^2 y_H}\qquad (4)$$
Now you have 4 equations with 4 unknown values ($x_B, y_B, x_H, y_H$). To obtain the angle of rotation you need just $x_B, y_B$. 
Not the easiest system to solve. Haven't tried it though.
The angle of rotation is the angle between lines $OA$ and $OB$ and the calculation is trivial.
