1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00
This commit is contained in:
Carles Fernandez 2019-07-13 01:49:31 +02:00
commit 13cf21919f
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 14 additions and 4 deletions

View File

@ -403,7 +403,7 @@ set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6") set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6")
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.16") set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.16")
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.9") set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.9")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.8.0") set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.9.0")
if(CMAKE_VERSION VERSION_LESS "3.0.2") # Fix for CentOS 7 if(CMAKE_VERSION VERSION_LESS "3.0.2") # Fix for CentOS 7
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.1") set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.1")

View File

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

View File

@ -326,11 +326,19 @@ static int server_connect(char *server)
} }
if (connect(fd, aip->ai_addr, aip->ai_addrlen) != 0) if (connect(fd, aip->ai_addr, aip->ai_addrlen) != 0)
{ {
freeaddrinfo(aip);
if (close(fd) != 0)
{
// avoid warning
}
return -1; return -1;
} }
else
{
break; break;
} }
}
freeaddrinfo(aip);
return fd; return fd;
} }