[math] factor out function to calc ltp_of_ecef rmat