Projection Ortogonal of $C$ on Segment $AB$:
@Code \coordinate (P) at ($(A)!(C)!(B)$);
Angles in degrees!