1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-24 11:04:53 +00:00

Fix defects detected by Coverity Scan

This commit is contained in:
Carles Fernandez
2018-11-08 15:34:58 +01:00
parent 79fa7ce6ca
commit a544112a84
3 changed files with 17 additions and 15 deletions

View File

@@ -301,7 +301,7 @@ double mstokph(double MetersPerSeconds)
arma::vec CTM_to_Euler(const arma::mat &C)
{
// Calculate Euler angles using (2.23)
arma::mat CTM = C;
arma::mat CTM(C);
arma::vec eul = arma::zeros(3, 1);
eul(0) = atan2(CTM(1, 2), CTM(2, 2)); // roll
if (CTM(0, 2) < -1.0) CTM(0, 2) = -1.0;