How to get HeadingPitchRoll from a point to point

Looks like this was answered here: How to get heading, pitch and roll from the two points