Calculating the angle of a Pyramid For a practical problem I need to calculate the angle $c$ given the angles $a,b,d$ in following drawing. I recently had a similar (but simpler) problem that could be solved with basic trigonometry, but here I cannot find a solution. What I was able to find so far was just application of the basic trigonometric formulas:
$AE = CD = DM \cdot \tan c$
$DM = AM \cdot \cos b$ 
but could not get any further, but I know that I have to use $d$ and $a$ somewhere. You can easily see that if we can figure out the angle between $AM$ and $EM$ we can easily find $c$.

Just for clarification:


*

*$A,B,C,D,E$ are all in the same plane, and $DM$ is normal to that plane.

*$a$ is the Angle between $MA$ and $MB$

*$b$ is the angle between $MA$ and $MD$

*$c$ is the angle between $MD$ and $MC$

*$d$ is the angle between $AB$ and $AE$

*The angles with the $\bullet$ dot are $90^\circ$ angles.
 A: A purely trigonometrical approach is as follows.
Let $$AD=EC=y, DM=h, AE=DC=x, BE=z$$
Then $$y=h\tan b, x=h\tan c,z=x\tan d=h\tan c \tan d$$
Also, $$AB=x\sec d=h\tan c \sec d, CM=h\sec c,$$
and $$BC=y+z=h\tan b+h \tan c\tan d$$
Therefore $$BM^2=h^2(\tan b+\tan c\tan d)^2+h^2\sec^2c$$
Now the Cosine Rule in triangle ABM gives, after cancelling the $h^2$:
$$\tan^2 c\sec^2 d=\tan^2 b+2\tan b\tan c\tan d+\tan^2 c\tan^2 d+\sec^2 c+\sec^2 b-2\sqrt{(\tan b+\tan c\tan d)^2+\sec^2c}.\sec b\cos a$$
After rearranging and simplifying, this can be expressed as a quadratic in $\tan c$, namely,
$$\tan^2 c[\tan^2b\tan^2d-\sec^2b\cos^2a\sec^2d]+2\tan c[\sec^2b\sin^2a\tan b\tan d]+\sec^4b\sin^2a=0$$
The discriminant simplifies to become$$4\sec^4b\sin^2a\cos^2a(\tan^2b+\sec^2d)$$
Upon further simplification, the solution can be written as $$
\tan c=\frac{-\sin^2a\tan b\tan d\pm\sin a\cos a\sqrt{\tan^2b+\sec^2d}}{\sin^2b\tan^2d-\cos^2a\sec^2d}$$
The choice of $\pm$ depends on the given values of $a,b,d$ since the denominator is negative if $b<a$
A: At first you have to calculate the relations of the sides of your ground. What is $CD =: b$ compared to $AD=:a$?
I will use greek angles now $d\to\delta$, $c\to\gamma$, $b\to\beta$ and $a\to\alpha$
Furhtermore I define the vector $\vec b$ pointing from $A$ to $E$, $\vec a$ pointing from $D$ to $A$ and $\vec m$ pointing from $D$ to $M$. So these are all orthogonal to each other: $$\vec a\cdot \vec b=\vec a\cdot \vec m=\vec b \cdot \vec m=0$$
Then you can state the equation for angle $\alpha$
$$\cos\alpha = \frac{(-\vec m+\vec a)\cdot \left(-\vec m+\vec a+\vec b+\vec a \frac{|\vec b|}{|\vec a|}\tan\delta\right)}{\left|-\vec m+\vec a\right|\cdot \left|-\vec m+\vec a+\vec b+\vec a \frac{|\vec b|}{|\vec a|}\tan\delta\right|}=\frac{\vec m^2+\vec a^2\left(1+\frac{|\vec b|}{|\vec a|}\tan\delta\right)}{\sqrt{\vec m^2+\vec a^2}\cdot \sqrt{ \vec m^2+\vec b^2+\vec a^2 \left(1+\frac{|\vec b|}{|\vec a|}\tan\delta\right)^2}} \tag1$$
and the second equation
$$\tan\beta=\frac{|\vec a|}{|\vec m|} \tag2$$
With equation (2) you can eliminate $|\vec a|$ in equation (1) and then try to find a form as
$$\lambda |\vec m|=|\vec b|\tag3$$
This is not easy. But I don't see any simpler way...
Then you have the angle $\gamma$ given by
$$\gamma=\arctan\frac{|\vec b|}{|\vec m|}=\arctan\lambda\tag 4$$
as in the questions written.
