diff --git a/src/tests/system-tests/libs/geofunctions.cc b/src/tests/system-tests/libs/geofunctions.cc index 8098609c1..8c1b985a0 100644 --- a/src/tests/system-tests/libs/geofunctions.cc +++ b/src/tests/system-tests/libs/geofunctions.cc @@ -328,17 +328,10 @@ arma::mat Euler_to_CTM(const arma::vec &eul) double sin_psi = sin(eul(2)); double cos_psi = cos(eul(2)); - arma::mat C = arma::zeros(3, 3); // Calculate coordinate transformation matrix using (2.22) - C(0, 0) = cos_theta * cos_psi; - C(0, 1) = cos_theta * sin_psi; - C(0, 2) = -sin_theta; - C(1, 0) = -cos_phi * sin_psi + sin_phi * sin_theta * cos_psi; - C(1, 1) = cos_phi * cos_psi + sin_phi * sin_theta * sin_psi; - C(1, 2) = sin_phi * cos_theta; - C(2, 0) = sin_phi * sin_psi + cos_phi * sin_theta * cos_psi; - C(2, 1) = -sin_phi * cos_psi + cos_phi * sin_theta * sin_psi; - C(2, 2) = cos_phi * cos_theta; + arma::mat C = {{cos_theta * cos_psi, cos_theta * sin_psi, -sin_theta}, + {-cos_phi * sin_psi + sin_phi * sin_theta * cos_psi, cos_phi * cos_psi + sin_phi * sin_theta * sin_psi, sin_phi * cos_theta}, + {sin_phi * sin_psi + cos_phi * sin_theta * cos_psi, -sin_phi * cos_psi + cos_phi * sin_theta * sin_psi, cos_phi * cos_theta}}; return C; }