Calculating angle between points on the a circle and on a line at the current angle of the circle Image example of the problem
EDIT (ANWSER IS FOUND):
Thanks to everybody providing anwsers.
After the initial anwser provided my chronos I realized that I only have to calculate the point where the 2 tangent lines on the circle cross (waypoint) and then the distance from that point to the aircraft.
The solution was eventually rather simple:
Distance = Radius * Tan(Angledifference / 2);

ORIGINAL QUESTION
Hello everybody,
Sorry for making this long post with what may be a very foolish question but I tried to work it out for several hours now and the solution is not coming to me :D)
Im currently making an Air Traffic Controller game and I need some help.
A part of this game will be that aircraft automatically proceed to a waypoint and follow a given track after this point. But I cannot manage to figure out the math.
I included a picture to make more clear what I mean.
My goal is to calculate the distance to the waypoint where the aircraft should start its turn to end exactly at the given track after the waypoint.
In situation 1 the aircraft is coming from north (on heading 180 / south), and it will turn left to a heading of 090 (east).
To end at this line it should start its turn when the distance is equal to the turnradius of the aircraft. The circle is representing the turnradius.
In situation 2 the aircraft is on heading 135 (south-east) and it will intercept the same track)
From trial and error I found out that Y = (1 - Cos(headingdifference or angle)) * radius.
But the problem is I can only use Y if the intercepting track is 090 or 270. So I need to calculate the distance to the waypoint (A) to make it work for every heading.
Thank you very much in advance to anyone who is nice enough to invest his time in this math-idiot.
 A: I think you are looking for the power of a point. I won't do all the math because it might get rather messy, but the basic idea is you need to draw the tangent circle with given radius to the track you're on and the one you want to end on. 
You already know radius, you only need to compute now $s$, i.e., the distance to $A$, which will be a function on $\theta$, the angle both tracks form. When the distance from the plane to $A$ is the power of A, prepare to turn!
A: I can only guess your question.

Let the plane coming from an angle equal to $\theta$ degrees wrt the EAST. In the figure, the three marked angles are all equal to $\phi$; where $\phi = 180^0 - \theta$
Then, $y = R – R\cos \phi = R(1 – \cos \phi) = R(1 - \cos (180^0 - \theta)) = R(1 + \cos \theta)$.
A: Let $P$ be the point where the plane starts to turn left and let $W$ be the waypoint. Draw a horizontal line to the right of $P$ and draw a vertical line above $W$ until they make a $90^\circ$ intersection at a point. Call this point $X$. Notice that in the right triangle $\Delta PXW$, we have that $\angle P = \theta$ and $Y = XW$ and $A = PW$. It follows that:
$$
\sin \theta = \frac{Y}{A} \iff A = \frac{Y}{\sin\theta} = \boxed{\left(\frac{1 - \cos\theta}{\sin\theta}\right) \cdot R}
$$
A: From what I can tell you want $R*\cos(A)*\frac{\sec(A) - 1}{\sin(A)}= R*\cot(A)(\sec(A) - 1)$
Dray big trig circles like this: http://i.stack.imgur.com/xQNfA.png
The line you want is the "cosine side" of a triangle that has $\sec(A) - 1$ as its "sine side" so you want $R*\cos(A)*\frac{\sec(A) - 1}{\sin(A)}$
