An investigation on the differences in numerical stability between the use of Euler angles and Hamilton quaternions for rotation