Thanks to Kerry's explanations.
OK, lets go back to the starting point.
I don't know if Alan has already looked Paul's drawing.
I know that is not easy when translating the words to the drawing.
Generally speaking, our discussions should be all based on the same coordinate system, which means that all angles measured anticlockwise from X axis.
By looking at your drawing, the angle "A" you described actually differs to what Alan given.
Alan's: 90°53'36"
and yours: 180° - 90°53'36" = 89°06'24"
This explains why you got the height of 3192.2655
In other words, the angle "A" in your code can be simplified to:
(setq a (dtr 90.8933333333))
I attache my version here. Hope I have not misunderstood Alan's issue.