A method for the calculation of orthogonal transformation matrices and its application to photogrammetry and other disciplines