backport vecfromyawpitch and vectoyawpitch from physics.cpp