1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

Give priority to RINEX_printer flag over configuration file.

Fix building.
This commit is contained in:
Carles Fernandez 2018-02-25 01:10:27 +01:00
parent eb0b01d0aa
commit 243b4ecc39
4 changed files with 26 additions and 46 deletions

View File

@ -28,6 +28,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}

View File

@ -36,7 +36,7 @@
#include <boost/math/common_factor_rt.hpp>
#include <boost/serialization/map.hpp>
#include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage;
@ -70,11 +70,30 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
// RINEX version
int rinex_version = configuration->property(role + ".rinex_version", 3);
if( (rinex_version < 2) || (rinex_version > 3) )
if ( FLAGS_RINEX_version.compare("3.01") == 0 )
{
//warn user and set the default
rinex_version = 3;
}
else if ( FLAGS_RINEX_version.compare("3.02") == 0 )
{
rinex_version = 3;
}
else if ( FLAGS_RINEX_version.compare("3") == 0 )
{
rinex_version = 3;
}
else if ( FLAGS_RINEX_version.compare("2.11") == 0 )
{
rinex_version = 2;
}
else if ( FLAGS_RINEX_version.compare("2.10") == 0 )
{
rinex_version = 2;
}
else if ( FLAGS_RINEX_version.compare("2") == 0 )
{
rinex_version = 2;
}
// RTCM Printer settings
bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);

View File

@ -43,7 +43,6 @@
#include <boost/date_time/local_time/local_time.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <glog/logging.h>
#include "gnss_sdr_flags.h"
using google::LogMessage;
@ -143,57 +142,17 @@ Rinex_Printer::Rinex_Printer(int conf_version)
observationCode["GPS_L1_CA_v2"] = "1";
observationCode["GLONASS_G1_CA_v2"] = "1";
if ( FLAGS_RINEX_version.compare("3.01") == 0 )
{
version = 3;
stringVersion = "3.01";
}
else if ( FLAGS_RINEX_version.compare("3.02") == 0 )
{
version = 3;
stringVersion = "3.02";
}
else if ( FLAGS_RINEX_version.compare("3") == 0 )
{
version = 3;
stringVersion = "3.02";
}
else if ( FLAGS_RINEX_version.compare("2.11") == 0 )
{
version = 2;
stringVersion = "2.11";
}
else if ( FLAGS_RINEX_version.compare("2.10") == 0 )
{
version = 2;
stringVersion = "2.10";
}
else if ( FLAGS_RINEX_version.compare("2") == 0 )
if(conf_version == 2)
{
version = 2;
stringVersion = "2.11";
}
else
{
LOG(WARNING) << "Unknown RINEX version " << FLAGS_RINEX_version << " (must be 2.11 or 3.02). Using 3.02";
version = 3;
stringVersion = "3.02";
}
if(conf_version != 0)
{
if(conf_version == 2)
{
version = 2;
stringVersion = "2.11";
}
if(conf_version == 3)
{
version = 3;
stringVersion = "3.02";
}
}
numberTypesObservations = 4; // Number of available types of observable in the system
fake_cnav_iode = 1;
}

View File

@ -24,6 +24,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
@ -34,4 +35,4 @@ file(GLOB CHANNEL_ADAPTER_HEADERS "*.h")
list(SORT CHANNEL_ADAPTER_HEADERS)
add_library(channel_adapters ${CHANNEL_ADAPTER_SOURCES} ${CHANNEL_ADAPTER_HEADERS})
source_group(Headers FILES ${CHANNEL_ADAPTER_HEADERS})
target_link_libraries(channel_adapters channel_fsm ${GNURADIO_RUNTIME_LIBRARIES} ${Boost_LIBRARIES})
target_link_libraries(channel_adapters channel_fsm ${GNURADIO_RUNTIME_LIBRARIES} ${Boost_LIBRARIES} gnss_sdr_flags)