mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
19c6c67306
1100
CMakeLists.txt
1100
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@ -21,5 +21,5 @@ add_subdirectory(core)
|
|||||||
add_subdirectory(main)
|
add_subdirectory(main)
|
||||||
if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
|
if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
|
endif()
|
||||||
add_subdirectory(utils)
|
add_subdirectory(utils)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
if(Boost_VERSION LESS 105800)
|
if(Boost_VERSION LESS 105800)
|
||||||
add_definitions(-DOLD_BOOST=1)
|
add_definitions(-DOLD_BOOST=1)
|
||||||
endif(Boost_VERSION LESS 105800)
|
endif()
|
||||||
|
|
||||||
set(PVT_ADAPTER_SOURCES
|
set(PVT_ADAPTER_SOURCES
|
||||||
rtklib_pvt.cc
|
rtklib_pvt.cc
|
||||||
|
@ -95,8 +95,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
rtklib_pvt_cc_sptr pvt_;
|
rtklib_pvt_cc_sptr pvt_;
|
||||||
rtk_t rtk;
|
rtk_t rtk;
|
||||||
bool dump_;
|
|
||||||
std::string dump_filename_;
|
|
||||||
std::string role_;
|
std::string role_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
if(Boost_VERSION LESS 105800)
|
if(Boost_VERSION LESS 105800)
|
||||||
add_definitions(-DOLD_BOOST=1)
|
add_definitions(-DOLD_BOOST=1)
|
||||||
endif(Boost_VERSION LESS 105800)
|
endif()
|
||||||
|
|
||||||
set(PVT_GR_BLOCKS_SOURCES
|
set(PVT_GR_BLOCKS_SOURCES
|
||||||
rtklib_pvt_cc.cc
|
rtklib_pvt_cc.cc
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
add_definitions( -DGNSS_SDR_VERSION="${VERSION}" )
|
add_definitions(-DGNSS_SDR_VERSION="${VERSION}")
|
||||||
|
|
||||||
set(PVT_LIB_SOURCES
|
set(PVT_LIB_SOURCES
|
||||||
pvt_solution.cc
|
pvt_solution.cc
|
||||||
@ -72,13 +72,13 @@ if(MATIO_FOUND)
|
|||||||
glog-${glog_RELEASE}
|
glog-${glog_RELEASE}
|
||||||
armadillo-${armadillo_RELEASE}
|
armadillo-${armadillo_RELEASE}
|
||||||
)
|
)
|
||||||
else(MATIO_FOUND)
|
else()
|
||||||
add_dependencies(pvt_lib
|
add_dependencies(pvt_lib
|
||||||
glog-${glog_RELEASE}
|
glog-${glog_RELEASE}
|
||||||
armadillo-${armadillo_RELEASE}
|
armadillo-${armadillo_RELEASE}
|
||||||
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
||||||
)
|
)
|
||||||
endif(MATIO_FOUND)
|
endif()
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
pvt_lib
|
pvt_lib
|
||||||
|
@ -70,7 +70,7 @@ if(ENABLE_FPGA)
|
|||||||
galileo_e5a_pcps_acquisition_fpga.h
|
galileo_e5a_pcps_acquisition_fpga.h
|
||||||
gps_l5i_pcps_acquisition_fpga.h
|
gps_l5i_pcps_acquisition_fpga.h
|
||||||
)
|
)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
set(ACQ_ADAPTER_SOURCES
|
set(ACQ_ADAPTER_SOURCES
|
||||||
@ -80,7 +80,7 @@ if(OPENCL_FOUND)
|
|||||||
set(ACQ_ADAPTER_HEADERS ${ACQ_ADAPTER_HEADERS}
|
set(ACQ_ADAPTER_HEADERS ${ACQ_ADAPTER_HEADERS}
|
||||||
gps_l1_ca_pcps_opencl_acquisition.h
|
gps_l1_ca_pcps_opencl_acquisition.h
|
||||||
)
|
)
|
||||||
endif(OPENCL_FOUND)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
@ -42,12 +42,12 @@ set(ACQ_GR_BLOCKS_HEADERS
|
|||||||
if(ENABLE_FPGA)
|
if(ENABLE_FPGA)
|
||||||
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_acquisition_fpga.cc)
|
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_acquisition_fpga.cc)
|
||||||
set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_acquisition_fpga.h)
|
set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_acquisition_fpga.h)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_opencl_acquisition_cc.cc)
|
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_opencl_acquisition_cc.cc)
|
||||||
set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_opencl_acquisition_cc.h)
|
set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_opencl_acquisition_cc.h)
|
||||||
endif(OPENCL_FOUND)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@ -69,10 +69,10 @@ if(OPENCL_FOUND)
|
|||||||
include_directories(${OPENCL_INCLUDE_DIRS})
|
include_directories(${OPENCL_INCLUDE_DIRS})
|
||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL")
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL")
|
||||||
else(OS_IS_MACOSX)
|
else()
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES})
|
||||||
endif(OS_IS_MACOSX)
|
endif()
|
||||||
endif(OPENCL_FOUND)
|
endif()
|
||||||
|
|
||||||
list(SORT ACQ_GR_BLOCKS_HEADERS)
|
list(SORT ACQ_GR_BLOCKS_HEADERS)
|
||||||
list(SORT ACQ_GR_BLOCKS_SOURCES)
|
list(SORT ACQ_GR_BLOCKS_SOURCES)
|
||||||
@ -91,7 +91,7 @@ if(ENABLE_FPGA)
|
|||||||
${OPT_LIBRARIES}
|
${OPT_LIBRARIES}
|
||||||
${OPT_ACQUISITION_LIBRARIES}
|
${OPT_ACQUISITION_LIBRARIES}
|
||||||
)
|
)
|
||||||
else(ENABLE_FPGA)
|
else()
|
||||||
target_link_libraries(acq_gr_blocks
|
target_link_libraries(acq_gr_blocks
|
||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
gnss_system_parameters
|
gnss_system_parameters
|
||||||
@ -103,8 +103,8 @@ else(ENABLE_FPGA)
|
|||||||
${MATIO_LIBRARIES}
|
${MATIO_LIBRARIES}
|
||||||
${OPT_ACQUISITION_LIBRARIES}
|
${OPT_ACQUISITION_LIBRARIES}
|
||||||
)
|
)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
if(NOT VOLK_GNSSSDR_FOUND)
|
if(NOT VOLKGNSSSDR_FOUND)
|
||||||
add_dependencies(acq_gr_blocks volk_gnsssdr_module)
|
add_dependencies(acq_gr_blocks volk_gnsssdr_module)
|
||||||
endif(NOT VOLK_GNSSSDR_FOUND)
|
endif()
|
||||||
|
@ -30,7 +30,7 @@ if(ENABLE_FPGA)
|
|||||||
${GFlags_INCLUDE_DIRS}
|
${GFlags_INCLUDE_DIRS}
|
||||||
${VOLK_GNSSSDR_INCLUDE_DIRS}
|
${VOLK_GNSSSDR_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
set(ACQUISITION_LIB_HEADERS ${ACQUISITION_LIB_HEADERS} acq_conf.h)
|
set(ACQUISITION_LIB_HEADERS ${ACQUISITION_LIB_HEADERS} acq_conf.h)
|
||||||
set(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} acq_conf.cc)
|
set(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} acq_conf.cc)
|
||||||
@ -51,8 +51,8 @@ target_link_libraries(acquisition_lib
|
|||||||
${GNURADIO_RUNTIME_LIBRARIES}
|
${GNURADIO_RUNTIME_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(VOLK_GNSSSDR_FOUND)
|
if(VOLKGNSSSDR_FOUND)
|
||||||
add_dependencies(acquisition_lib glog-${glog_RELEASE})
|
add_dependencies(acquisition_lib glog-${glog_RELEASE})
|
||||||
else(VOLK_GNSSSDR_FOUND)
|
else()
|
||||||
add_dependencies(acquisition_lib glog-${glog_RELEASE} volk_gnsssdr_module)
|
add_dependencies(acquisition_lib glog-${glog_RELEASE} volk_gnsssdr_module)
|
||||||
endif()
|
endif()
|
||||||
|
@ -48,7 +48,7 @@ include_directories(
|
|||||||
|
|
||||||
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
||||||
add_definitions(-DGR_GREATER_38=1)
|
add_definitions(-DGR_GREATER_38=1)
|
||||||
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
endif()
|
||||||
|
|
||||||
list(SORT INPUT_FILTER_ADAPTER_HEADERS)
|
list(SORT INPUT_FILTER_ADAPTER_HEADERS)
|
||||||
list(SORT INPUT_FILTER_ADAPTER_SOURCES)
|
list(SORT INPUT_FILTER_ADAPTER_SOURCES)
|
||||||
|
@ -54,8 +54,8 @@ target_link_libraries(input_filter_gr_blocks
|
|||||||
${VOLK_GNSSSDR_LIBRARIES}
|
${VOLK_GNSSSDR_LIBRARIES}
|
||||||
${LOG4CPP_LIBRARIES})
|
${LOG4CPP_LIBRARIES})
|
||||||
|
|
||||||
if(NOT VOLK_GNSSSDR_FOUND)
|
if(NOT VOLKGNSSSDR_FOUND)
|
||||||
add_dependencies(input_filter_gr_blocks volk_gnsssdr_module glog-${glog_RELEASE})
|
add_dependencies(input_filter_gr_blocks volk_gnsssdr_module glog-${glog_RELEASE})
|
||||||
else(NOT VOLK_GNSSSDR_FOUND)
|
else()
|
||||||
add_dependencies(input_filter_gr_blocks glog-${glog_RELEASE})
|
add_dependencies(input_filter_gr_blocks glog-${glog_RELEASE})
|
||||||
endif(NOT VOLK_GNSSSDR_FOUND)
|
endif()
|
||||||
|
@ -78,7 +78,7 @@ if(ENABLE_FPGA)
|
|||||||
gnss_sdr_time_counter.h
|
gnss_sdr_time_counter.h
|
||||||
gnss_sdr_fpga_sample_counter.h
|
gnss_sdr_fpga_sample_counter.h
|
||||||
)
|
)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
|
set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
|
||||||
@ -91,7 +91,7 @@ if(OPENCL_FOUND)
|
|||||||
opencl/fft_setup.h # Needs OpenCL
|
opencl/fft_setup.h # Needs OpenCL
|
||||||
opencl/fft_kernelstring.h # Needs OpenCL
|
opencl/fft_kernelstring.h # Needs OpenCL
|
||||||
)
|
)
|
||||||
endif(OPENCL_FOUND)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@ -112,10 +112,10 @@ if(OPENCL_FOUND)
|
|||||||
include_directories(${OPENCL_INCLUDE_DIRS})
|
include_directories(${OPENCL_INCLUDE_DIRS})
|
||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL")
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL")
|
||||||
else(OS_IS_MACOSX)
|
else()
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES})
|
||||||
endif(OS_IS_MACOSX)
|
endif()
|
||||||
endif(OPENCL_FOUND)
|
endif()
|
||||||
|
|
||||||
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
|
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
@ -138,16 +138,16 @@ target_link_libraries(gnss_sp_libs
|
|||||||
gnss_rx
|
gnss_rx
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT VOLK_GNSSSDR_FOUND)
|
if(NOT VOLKGNSSSDR_FOUND)
|
||||||
add_dependencies(gnss_sp_libs volk_gnsssdr_module
|
add_dependencies(gnss_sp_libs volk_gnsssdr_module
|
||||||
armadillo-${armadillo_RELEASE})
|
armadillo-${armadillo_RELEASE})
|
||||||
else(NOT VOLK_GNSSSDR_FOUND)
|
else()
|
||||||
add_dependencies(gnss_sp_libs armadillo-${armadillo_RELEASE})
|
add_dependencies(gnss_sp_libs armadillo-${armadillo_RELEASE})
|
||||||
endif(NOT VOLK_GNSSSDR_FOUND)
|
endif()
|
||||||
|
|
||||||
if(${GFLAGS_GREATER_20})
|
if(${GFLAGS_GREATER_20})
|
||||||
add_definitions(-DGFLAGS_GREATER_2_0=1)
|
add_definitions(-DGFLAGS_GREATER_2_0=1)
|
||||||
endif(${GFLAGS_GREATER_20})
|
endif()
|
||||||
|
|
||||||
add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h)
|
add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h)
|
||||||
source_group(Headers FILES gnss_sdr_flags.h)
|
source_group(Headers FILES gnss_sdr_flags.h)
|
||||||
|
@ -126,8 +126,8 @@ void galileo_e1_gen_float(float* _dest, int* _prn, char _Signal[3])
|
|||||||
const float alpha = sqrt(10.0 / 11.0);
|
const float alpha = sqrt(10.0 / 11.0);
|
||||||
const float beta = sqrt(1.0 / 11.0);
|
const float beta = sqrt(1.0 / 11.0);
|
||||||
|
|
||||||
int32_t sinboc_11[12 * 4092]; // _codeLength not accepted by Clang
|
int32_t sinboc_11[12 * 4092] = {0}; // _codeLength not accepted by Clang
|
||||||
int32_t sinboc_61[12 * 4092];
|
int32_t sinboc_61[12 * 4092] = {0};
|
||||||
|
|
||||||
galileo_e1_sinboc_11_gen_int(sinboc_11, _prn, _codeLength); //generate sinboc(1,1) 12 samples per chip
|
galileo_e1_sinboc_11_gen_int(sinboc_11, _prn, _codeLength); //generate sinboc(1,1) 12 samples per chip
|
||||||
galileo_e1_sinboc_61_gen_int(sinboc_61, _prn, _codeLength); //generate sinboc(6,1) 12 samples per chip
|
galileo_e1_sinboc_61_gen_int(sinboc_61, _prn, _codeLength); //generate sinboc(6,1) 12 samples per chip
|
||||||
|
@ -131,12 +131,6 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
|
|||||||
{
|
{
|
||||||
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
||||||
}
|
}
|
||||||
if (_fs != _codeFreqBasis)
|
|
||||||
{
|
delete[] _code;
|
||||||
free(_code);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
delete[] _code;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ void gps_l1_ca_code_gen_float(float* _dest, int32_t _prn, uint32_t _chip_shift)
|
|||||||
void gps_l1_ca_code_gen_complex(std::complex<float>* _dest, int32_t _prn, uint32_t _chip_shift)
|
void gps_l1_ca_code_gen_complex(std::complex<float>* _dest, int32_t _prn, uint32_t _chip_shift)
|
||||||
{
|
{
|
||||||
const uint32_t _code_length = 1023;
|
const uint32_t _code_length = 1023;
|
||||||
int32_t ca_code_int[_code_length];
|
int32_t ca_code_int[_code_length] = {0};
|
||||||
|
|
||||||
gps_l1_ca_code_gen_int(ca_code_int, _prn, _chip_shift);
|
gps_l1_ca_code_gen_int(ca_code_int, _prn, _chip_shift);
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ add_dependencies(rtklib_lib glog-${glog_RELEASE})
|
|||||||
|
|
||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
set(MAC_LIBRARIES "-framework Accelerate")
|
set(MAC_LIBRARIES "-framework Accelerate")
|
||||||
endif(OS_IS_MACOSX)
|
endif()
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
rtklib_lib
|
rtklib_lib
|
||||||
|
@ -302,44 +302,48 @@ alm_t alm_to_rtklib(const Gps_Almanac& gps_alm)
|
|||||||
rtklib_alm.svh = gps_alm.i_SV_health;
|
rtklib_alm.svh = gps_alm.i_SV_health;
|
||||||
rtklib_alm.svconf = gps_alm.i_AS_status;
|
rtklib_alm.svconf = gps_alm.i_AS_status;
|
||||||
rtklib_alm.week = gps_alm.i_WNa;
|
rtklib_alm.week = gps_alm.i_WNa;
|
||||||
rtklib_alm.toa = gpst2time(gps_alm.i_WNa, gps_alm.i_Toa);
|
gtime_t toa;
|
||||||
|
toa.time = gps_alm.i_Toa;
|
||||||
|
rtklib_alm.toa = toa;
|
||||||
rtklib_alm.A = gps_alm.d_sqrt_A * gps_alm.d_sqrt_A;
|
rtklib_alm.A = gps_alm.d_sqrt_A * gps_alm.d_sqrt_A;
|
||||||
rtklib_alm.e = gps_alm.d_e_eccentricity;
|
rtklib_alm.e = gps_alm.d_e_eccentricity;
|
||||||
rtklib_alm.i0 = gps_alm.d_Delta_i + 0.3;
|
rtklib_alm.i0 = (gps_alm.d_Delta_i + 0.3) * PI;
|
||||||
rtklib_alm.OMG0 = gps_alm.d_OMEGA0;
|
rtklib_alm.OMG0 = gps_alm.d_OMEGA0 * PI;
|
||||||
rtklib_alm.OMGd = gps_alm.d_OMEGA_DOT;
|
rtklib_alm.OMGd = gps_alm.d_OMEGA_DOT * PI;
|
||||||
rtklib_alm.omg = gps_alm.d_OMEGA;
|
rtklib_alm.omg = gps_alm.d_OMEGA * PI;
|
||||||
rtklib_alm.M0 = gps_alm.d_M_0;
|
rtklib_alm.M0 = gps_alm.d_M_0 * PI;
|
||||||
rtklib_alm.f0 = gps_alm.d_A_f0;
|
rtklib_alm.f0 = gps_alm.d_A_f0;
|
||||||
rtklib_alm.f1 = gps_alm.d_A_f1;
|
rtklib_alm.f1 = gps_alm.d_A_f1;
|
||||||
rtklib_alm.toas = gps_alm.i_Toa;
|
rtklib_alm.toas = gps_alm.i_Toa;
|
||||||
|
|
||||||
|
|
||||||
return rtklib_alm;
|
return rtklib_alm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
alm_t alm_to_rtklib(const Galileo_Almanac& gal_alm)
|
alm_t alm_to_rtklib(const Galileo_Almanac& gal_alm)
|
||||||
{
|
{
|
||||||
alm_t rtklib_alm;
|
alm_t rtklib_alm;
|
||||||
|
|
||||||
rtklib_alm = {0, 0, 0, 0, {0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
rtklib_alm = {0, 0, 0, 0, {0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
rtklib_alm.sat = gal_alm.i_satellite_PRN;
|
rtklib_alm.sat = gal_alm.i_satellite_PRN + NSATGPS + NSATGLO;
|
||||||
rtklib_alm.svh = gal_alm.E1B_HS;
|
rtklib_alm.svh = gal_alm.E1B_HS;
|
||||||
rtklib_alm.svconf = gal_alm.E1B_HS;
|
rtklib_alm.svconf = gal_alm.E1B_HS;
|
||||||
rtklib_alm.week = gal_alm.i_WNa;
|
rtklib_alm.week = gal_alm.i_WNa;
|
||||||
rtklib_alm.toa = gpst2time(gal_alm.i_WNa, gal_alm.i_Toa);
|
gtime_t toa;
|
||||||
|
toa.time = gal_alm.i_Toa;
|
||||||
|
rtklib_alm.toa = toa;
|
||||||
rtklib_alm.A = 5440.588203494 + gal_alm.d_Delta_sqrt_A;
|
rtklib_alm.A = 5440.588203494 + gal_alm.d_Delta_sqrt_A;
|
||||||
rtklib_alm.A = rtklib_alm.A * rtklib_alm.A;
|
rtklib_alm.A = rtklib_alm.A * rtklib_alm.A;
|
||||||
rtklib_alm.e = gal_alm.d_e_eccentricity;
|
rtklib_alm.e = gal_alm.d_e_eccentricity;
|
||||||
rtklib_alm.i0 = gal_alm.d_Delta_i + 0.31111;
|
rtklib_alm.i0 = (gal_alm.d_Delta_i + 56.0 / 180.0) * PI;
|
||||||
rtklib_alm.OMG0 = gal_alm.d_OMEGA0;
|
rtklib_alm.OMG0 = gal_alm.d_OMEGA0 * PI;
|
||||||
rtklib_alm.OMGd = gal_alm.d_OMEGA_DOT;
|
rtklib_alm.OMGd = gal_alm.d_OMEGA_DOT * PI;
|
||||||
rtklib_alm.omg = gal_alm.d_OMEGA;
|
rtklib_alm.omg = gal_alm.d_OMEGA * PI;
|
||||||
rtklib_alm.M0 = gal_alm.d_M_0;
|
rtklib_alm.M0 = gal_alm.d_M_0 * PI;
|
||||||
rtklib_alm.f0 = gal_alm.d_A_f0;
|
rtklib_alm.f0 = gal_alm.d_A_f0;
|
||||||
rtklib_alm.f1 = gal_alm.d_A_f1;
|
rtklib_alm.f1 = gal_alm.d_A_f1;
|
||||||
rtklib_alm.toas = gal_alm.i_Toa;
|
rtklib_alm.toas = gal_alm.i_Toa;
|
||||||
|
|
||||||
|
|
||||||
return rtklib_alm;
|
return rtklib_alm;
|
||||||
}
|
}
|
||||||
|
@ -44,20 +44,20 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||||||
# retrieve the compiler's version from it
|
# retrieve the compiler's version from it
|
||||||
string(REGEX MATCH "clang version [0-9.]+" CLANG_OTHER_VERSION ${_err})
|
string(REGEX MATCH "clang version [0-9.]+" CLANG_OTHER_VERSION ${_err})
|
||||||
string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_OTHER_VERSION})
|
string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_OTHER_VERSION})
|
||||||
else("${IS_APPLE}" STREQUAL "")
|
else()
|
||||||
set(MIN_VERSION ${GNSSSDR_APPLECLANG_MIN_VERSION})
|
set(MIN_VERSION ${GNSSSDR_APPLECLANG_MIN_VERSION})
|
||||||
set(APPLE_STR "Apple ")
|
set(APPLE_STR "Apple ")
|
||||||
# retrieve the compiler's version from it
|
# retrieve the compiler's version from it
|
||||||
string(REGEX MATCH "(clang-[0-9.]+)" CLANG_APPLE_VERSION ${_err})
|
string(REGEX MATCH "(clang-[0-9.]+)" CLANG_APPLE_VERSION ${_err})
|
||||||
string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_APPLE_VERSION})
|
string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_APPLE_VERSION})
|
||||||
endif("${IS_APPLE}" STREQUAL "")
|
endif()
|
||||||
if(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}")
|
if(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}")
|
||||||
message(WARNING "\nThe compiler selected to build VOLK-GNSSSDR (${APPLE_STR}Clang version ${CLANG_VERSION} : ${CMAKE_CXX_COMPILER}) is older than that officially supported (${MIN_VERSION} minimum). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
|
message(WARNING "\nThe compiler selected to build VOLK-GNSSSDR (${APPLE_STR}Clang version ${CLANG_VERSION} : ${CMAKE_CXX_COMPILER}) is older than that officially supported (${MIN_VERSION} minimum). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
|
||||||
endif(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}")
|
endif()
|
||||||
else(${_res} STREQUAL "0")
|
else()
|
||||||
message(WARNING "\nCannot determine the version of the compiler selected to build VOLK-GNSSSDR (${APPLE_STR}Clang : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
|
message(WARNING "\nCannot determine the version of the compiler selected to build VOLK-GNSSSDR (${APPLE_STR}Clang : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
|
||||||
endif(${_res} STREQUAL "0")
|
endif()
|
||||||
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
endif()
|
||||||
|
|
||||||
# Enable C++17 support in GCC >= 8.0.0
|
# Enable C++17 support in GCC >= 8.0.0
|
||||||
# Enable C++14 support in 8.0.0 > GCC >= 6.1.1
|
# Enable C++14 support in 8.0.0 > GCC >= 6.1.1
|
||||||
@ -66,15 +66,15 @@ endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
||||||
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
else()
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
||||||
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
else()
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
|
||||||
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
endif()
|
||||||
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
endif()
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||||
endif((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
endif()
|
||||||
|
|
||||||
# Enable C++17 support in Clang >= 6.0.0
|
# Enable C++17 support in Clang >= 6.0.0
|
||||||
# Enable C++14 support in 6.0.0 > Clang >= 3.5.0 or AppleClang >= 600
|
# Enable C++14 support in 6.0.0 > Clang >= 3.5.0 or AppleClang >= 600
|
||||||
@ -84,28 +84,28 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||||||
# See https://trac.macports.org/wiki/XcodeVersionInfo for Apple Clang version equivalences
|
# See https://trac.macports.org/wiki/XcodeVersionInfo for Apple Clang version equivalences
|
||||||
if(CLANG_VERSION VERSION_LESS "600")
|
if(CLANG_VERSION VERSION_LESS "600")
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
||||||
else(CLANG_VERSION VERSION_LESS "600")
|
else()
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
||||||
endif(CLANG_VERSION VERSION_LESS "600")
|
endif()
|
||||||
else(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
else()
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
||||||
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
else()
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
||||||
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
|
else()
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
|
||||||
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
|
endif()
|
||||||
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
endif()
|
||||||
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
endif()
|
||||||
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
endif()
|
||||||
|
|
||||||
if(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
if(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||||
if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
|
if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
|
||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
endif(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
|
endif()
|
||||||
endif(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS} -Wall")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS} -Wall")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||||
@ -113,9 +113,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
|||||||
if(CMAKE_VERSION VERSION_GREATER "3.0")
|
if(CMAKE_VERSION VERSION_GREATER "3.0")
|
||||||
cmake_policy(SET CMP0042 NEW)
|
cmake_policy(SET CMP0042 NEW)
|
||||||
if(CMAKE_VERSION VERSION_GREATER "3.9")
|
if(CMAKE_VERSION VERSION_GREATER "3.9")
|
||||||
cmake_policy(SET CMP0068 NEW)
|
cmake_policy(SET CMP0068 NEW)
|
||||||
endif(CMAKE_VERSION VERSION_GREATER "3.9")
|
endif()
|
||||||
endif(CMAKE_VERSION VERSION_GREATER "3.0")
|
endif()
|
||||||
|
|
||||||
option(ENABLE_STRIP "Create a stripped volk_gnsssdr_profile binary (without shared libraries)" OFF)
|
option(ENABLE_STRIP "Create a stripped volk_gnsssdr_profile binary (without shared libraries)" OFF)
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||||||
set(CMAKE_BUILD_TYPE "Release")
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
message(STATUS "Build type not specified: defaulting to release.")
|
message(STATUS "Build type not specified: defaulting to release.")
|
||||||
endif()
|
endif()
|
||||||
VOLK_CHECK_BUILD_TYPE(${CMAKE_BUILD_TYPE})
|
volk_check_build_type(${CMAKE_BUILD_TYPE})
|
||||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
|
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
|
||||||
message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.")
|
message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.")
|
||||||
|
|
||||||
@ -144,14 +144,14 @@ include(VolkVersion) #setup version info
|
|||||||
########################################################################
|
########################################################################
|
||||||
# Environment setup
|
# Environment setup
|
||||||
########################################################################
|
########################################################################
|
||||||
IF(NOT DEFINED BOOST_ROOT AND NOT DEFINED ENV{BOOST_ROOT})
|
if(NOT DEFINED BOOST_ROOT AND NOT DEFINED ENV{BOOST_ROOT})
|
||||||
SET(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
|
set(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
IF(NOT DEFINED CROSSCOMPILE_MULTILIB)
|
if(NOT DEFINED CROSSCOMPILE_MULTILIB)
|
||||||
SET(CROSSCOMPILE_MULTILIB "")
|
set(CROSSCOMPILE_MULTILIB "")
|
||||||
ENDIF()
|
endif()
|
||||||
SET(CROSSCOMPILE_MULTILIB ${CROSSCOMPILE_MULTILIB} CACHE STRING "Define \"true\" if you have and want to use multiple C development libs installed for cross compile")
|
set(CROSSCOMPILE_MULTILIB ${CROSSCOMPILE_MULTILIB} CACHE STRING "Define \"true\" if you have and want to use multiple C development libs installed for cross compile")
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_definitions(-D_USE_MATH_DEFINES) #enables math constants on all supported versions of MSVC
|
add_definitions(-D_USE_MATH_DEFINES) #enables math constants on all supported versions of MSVC
|
||||||
@ -160,16 +160,16 @@ if(MSVC)
|
|||||||
add_compile_options(/wd4752)
|
add_compile_options(/wd4752)
|
||||||
add_compile_options(/wo4273)
|
add_compile_options(/wo4273)
|
||||||
add_compile_options(/wo4838)
|
add_compile_options(/wo4838)
|
||||||
endif(MSVC)
|
endif()
|
||||||
|
|
||||||
# allow 'large' files in 32 bit builds
|
# allow 'large' files in 32 bit builds
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
add_definitions( -D_LARGEFILE_SOURCE
|
add_definitions(-D_LARGEFILE_SOURCE
|
||||||
-D_FILE_OFFSET_BITS=64
|
-D_FILE_OFFSET_BITS=64
|
||||||
-D_LARGE_FILES
|
-D_LARGE_FILES
|
||||||
-D_FORTIFY_SOURCE=2
|
-D_FORTIFY_SOURCE=2
|
||||||
)
|
)
|
||||||
endif(UNIX)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -178,9 +178,9 @@ endif(UNIX)
|
|||||||
|
|
||||||
# Python
|
# Python
|
||||||
include(VolkPython) #sets PYTHON_EXECUTABLE and PYTHON_DASH_B
|
include(VolkPython) #sets PYTHON_EXECUTABLE and PYTHON_DASH_B
|
||||||
VOLK_PYTHON_CHECK_MODULE("python >= 2.7" sys "sys.version.split()[0] >= '2.7'" PYTHON_MIN_VER_FOUND)
|
volk_python_check_module("python >= 2.7" sys "sys.version.split()[0] >= '2.7'" PYTHON_MIN_VER_FOUND)
|
||||||
VOLK_PYTHON_CHECK_MODULE("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||||
VOLK_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
|
||||||
|
|
||||||
if(NOT PYTHON_MIN_VER_FOUND)
|
if(NOT PYTHON_MIN_VER_FOUND)
|
||||||
@ -199,16 +199,16 @@ endif()
|
|||||||
|
|
||||||
# Boost
|
# Boost
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
if (NOT DEFINED BOOST_ALL_DYN_LINK)
|
if(NOT DEFINED BOOST_ALL_DYN_LINK)
|
||||||
set(BOOST_ALL_DYN_LINK TRUE)
|
set(BOOST_ALL_DYN_LINK TRUE)
|
||||||
endif()
|
endif()
|
||||||
set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
|
set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
|
||||||
if(BOOST_ALL_DYN_LINK)
|
if(BOOST_ALL_DYN_LINK)
|
||||||
add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
|
add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
|
||||||
else(BOOST_ALL_DYN_LINK)
|
else()
|
||||||
unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
|
unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
|
||||||
endif(BOOST_ALL_DYN_LINK)
|
endif()
|
||||||
endif(MSVC)
|
endif()
|
||||||
|
|
||||||
include(VolkBoost)
|
include(VolkBoost)
|
||||||
|
|
||||||
@ -220,9 +220,9 @@ endif()
|
|||||||
option(ENABLE_ORC "Enable Orc" True)
|
option(ENABLE_ORC "Enable Orc" True)
|
||||||
if(ENABLE_ORC)
|
if(ENABLE_ORC)
|
||||||
find_package(ORC)
|
find_package(ORC)
|
||||||
else(ENABLE_ORC)
|
else()
|
||||||
message(STATUS "Disabling use of ORC")
|
message(STATUS "Disabling use of ORC")
|
||||||
endif(ENABLE_ORC)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -240,7 +240,7 @@ if(DOXYGEN_FOUND)
|
|||||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||||
COMMENT "Generating documentation with Doxygen" VERBATIM
|
COMMENT "Generating documentation with Doxygen" VERBATIM
|
||||||
)
|
)
|
||||||
endif(DOXYGEN_FOUND)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -255,7 +255,8 @@ set(includedir "\${prefix}/include")
|
|||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr.pc.in
|
${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr.pc.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.pc
|
${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.pc
|
||||||
@ONLY)
|
@ONLY
|
||||||
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.pc
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.pc
|
||||||
@ -304,17 +305,17 @@ if(APPLE)
|
|||||||
set(CMAKE_INSTALL_NAME_DIR
|
set(CMAKE_INSTALL_NAME_DIR
|
||||||
${CMAKE_INSTALL_PREFIX}/${VOLK_LIBRARY_DIR} CACHE
|
${CMAKE_INSTALL_PREFIX}/${VOLK_LIBRARY_DIR} CACHE
|
||||||
PATH "Library Install Name Destination Directory" FORCE)
|
PATH "Library Install Name Destination Directory" FORCE)
|
||||||
endif(NOT CMAKE_INSTALL_NAME_DIR)
|
endif()
|
||||||
if(NOT CMAKE_INSTALL_RPATH)
|
if(NOT CMAKE_INSTALL_RPATH)
|
||||||
set(CMAKE_INSTALL_RPATH
|
set(CMAKE_INSTALL_RPATH
|
||||||
${CMAKE_INSTALL_PREFIX}/${VOLK_LIBRARY_DIR} CACHE
|
${CMAKE_INSTALL_PREFIX}/${VOLK_LIBRARY_DIR} CACHE
|
||||||
PATH "Library Install RPath" FORCE)
|
PATH "Library Install RPath" FORCE)
|
||||||
endif(NOT CMAKE_INSTALL_RPATH)
|
endif()
|
||||||
if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
|
if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
|
||||||
BOOL "Do Build Using Library Install RPath" FORCE)
|
BOOL "Do Build Using Library Install RPath" FORCE)
|
||||||
endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
|
endif()
|
||||||
endif(APPLE)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -358,7 +359,7 @@ configure_file(
|
|||||||
|
|
||||||
if(NOT CMAKE_MODULES_DIR)
|
if(NOT CMAKE_MODULES_DIR)
|
||||||
set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
|
set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
|
||||||
endif(NOT CMAKE_MODULES_DIR)
|
endif()
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
@ -371,7 +372,7 @@ install(
|
|||||||
########################################################################
|
########################################################################
|
||||||
# Option to enable QA testing, on by default
|
# Option to enable QA testing, on by default
|
||||||
########################################################################
|
########################################################################
|
||||||
OPTION(ENABLE_TESTING "Enable QA testing" ON)
|
option(ENABLE_TESTING "Enable QA testing" ON)
|
||||||
if(ENABLE_TESTING)
|
if(ENABLE_TESTING)
|
||||||
message(STATUS "QA Testing is enabled.")
|
message(STATUS "QA Testing is enabled.")
|
||||||
else()
|
else()
|
||||||
@ -383,7 +384,7 @@ message(STATUS " Modify using: -DENABLE_TESTING=ON/OFF")
|
|||||||
########################################################################
|
########################################################################
|
||||||
# Option to enable post-build profiling using volk_profile, off by default
|
# Option to enable post-build profiling using volk_profile, off by default
|
||||||
########################################################################
|
########################################################################
|
||||||
OPTION(ENABLE_PROFILING "Launch system profiler after build" OFF)
|
option(ENABLE_PROFILING "Launch system profiler after build" OFF)
|
||||||
if(ENABLE_PROFILING)
|
if(ENABLE_PROFILING)
|
||||||
set(ENABLE_STATIC_LIBS ON)
|
set(ENABLE_STATIC_LIBS ON)
|
||||||
if(DEFINED VOLK_CONFIGPATH)
|
if(DEFINED VOLK_CONFIGPATH)
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
########################################################################
|
########################################################################
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/cmake/msvc)
|
include_directories(${PROJECT_SOURCE_DIR}/cmake/msvc)
|
||||||
endif(MSVC)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@ -37,26 +37,26 @@ include_directories(
|
|||||||
|
|
||||||
set(Clang_required_link "")
|
set(Clang_required_link "")
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set(Clang_required_link "c++")
|
set(Clang_required_link "c++")
|
||||||
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
endif()
|
||||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ORC_FOUND)
|
if(ORC_FOUND)
|
||||||
set(orc_lib ${ORC_LIBRARIES})
|
set(orc_lib ${ORC_LIBRARIES})
|
||||||
elseif(ORC_FOUND)
|
else()
|
||||||
set(orc_lib "")
|
set(orc_lib "")
|
||||||
endif(ORC_FOUND)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# allow 'large' files in 32 bit builds
|
# allow 'large' files in 32 bit builds
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
add_definitions( -D_LARGEFILE_SOURCE
|
add_definitions(-D_LARGEFILE_SOURCE
|
||||||
-D_FILE_OFFSET_BITS=64
|
-D_FILE_OFFSET_BITS=64
|
||||||
-D_LARGE_FILES
|
-D_LARGE_FILES
|
||||||
)
|
)
|
||||||
endif(UNIX)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# MAKE volk_gnsssdr_profile
|
# MAKE volk_gnsssdr_profile
|
||||||
@ -68,18 +68,18 @@ add_executable(volk_gnsssdr_profile
|
|||||||
|
|
||||||
if(ENABLE_STATIC_LIBS)
|
if(ENABLE_STATIC_LIBS)
|
||||||
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr_static ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
|
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr_static ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
|
||||||
else(ENABLE_STATIC_LIBS)
|
else()
|
||||||
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
|
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
|
||||||
add_dependencies(volk_gnsssdr_profile volk_gnsssdr)
|
add_dependencies(volk_gnsssdr_profile volk_gnsssdr)
|
||||||
endif(ENABLE_STATIC_LIBS)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_STRIP)
|
if(ENABLE_STRIP)
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
set_target_properties(volk_gnsssdr_profile
|
set_target_properties(volk_gnsssdr_profile
|
||||||
PROPERTIES LINK_FLAGS "-s")
|
PROPERTIES LINK_FLAGS "-s")
|
||||||
endif((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
endif()
|
||||||
endif(ENABLE_STRIP)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
install(
|
install(
|
||||||
@ -92,18 +92,18 @@ install(
|
|||||||
# MAKE volk_gnsssdr-config-info
|
# MAKE volk_gnsssdr-config-info
|
||||||
add_executable(volk_gnsssdr-config-info volk_gnsssdr-config-info.cc ${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr_option_helpers.cc)
|
add_executable(volk_gnsssdr-config-info volk_gnsssdr-config-info.cc ${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr_option_helpers.cc)
|
||||||
if(ENABLE_STATIC_LIBS)
|
if(ENABLE_STATIC_LIBS)
|
||||||
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr_static ${Clang_required_link} ${orc_lib})
|
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr_static ${Clang_required_link} ${orc_lib})
|
||||||
else(ENABLE_STATIC_LIBS)
|
else()
|
||||||
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${Clang_required_link} ${orc_lib})
|
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${Clang_required_link} ${orc_lib})
|
||||||
add_dependencies(volk_gnsssdr-config-info volk_gnsssdr)
|
add_dependencies(volk_gnsssdr-config-info volk_gnsssdr)
|
||||||
endif(ENABLE_STATIC_LIBS)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_STRIP)
|
if(ENABLE_STRIP)
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
set_target_properties(volk_gnsssdr-config-info
|
set_target_properties(volk_gnsssdr-config-info
|
||||||
PROPERTIES LINK_FLAGS "-s")
|
PROPERTIES LINK_FLAGS "-s")
|
||||||
endif((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
endif()
|
||||||
endif(ENABLE_STRIP)
|
endif()
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS volk_gnsssdr-config-info
|
TARGETS volk_gnsssdr-config-info
|
||||||
@ -114,17 +114,14 @@ install(
|
|||||||
|
|
||||||
# Launch volk_gnsssdr_profile if requested to do so
|
# Launch volk_gnsssdr_profile if requested to do so
|
||||||
if(ENABLE_PROFILING)
|
if(ENABLE_PROFILING)
|
||||||
if(DEFINED VOLK_CONFIGPATH)
|
if(DEFINED VOLK_CONFIGPATH)
|
||||||
set( VOLK_CONFIG_ARG "-p${VOLK_CONFIGPATH}" )
|
set( VOLK_CONFIG_ARG "-p${VOLK_CONFIGPATH}" )
|
||||||
set( VOLK_CONFIG "${VOLK_CONFIGPATH}/volk_gnsssdr_config" )
|
set( VOLK_CONFIG "${VOLK_CONFIGPATH}/volk_gnsssdr_config" )
|
||||||
endif()
|
endif()
|
||||||
add_custom_command(OUTPUT ${VOLK_CONFIG}
|
add_custom_command(OUTPUT ${VOLK_CONFIG}
|
||||||
COMMAND volk_gnsssdr_profile "${VOLK_CONFIG_ARG}"
|
COMMAND volk_gnsssdr_profile "${VOLK_CONFIG_ARG}"
|
||||||
DEPENDS volk_gnsssdr_profile
|
DEPENDS volk_gnsssdr_profile
|
||||||
COMMENT "Launching profiler, this may take a few minutes..."
|
COMMENT "Launching profiler, this may take a few minutes..."
|
||||||
)
|
)
|
||||||
add_custom_target(volk-gnsssdr-profile-run ALL DEPENDS ${VOLK_CONFIG})
|
add_custom_target(volk-gnsssdr-profile-run ALL DEPENDS ${VOLK_CONFIG})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,52 +16,56 @@
|
|||||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
FIND_PACKAGE(PkgConfig)
|
find_package(PkgConfig)
|
||||||
PKG_CHECK_MODULES(PC_ORC "orc-0.4 > 0.4.22")
|
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
|
||||||
|
|
||||||
FIND_PROGRAM(ORCC_EXECUTABLE orcc
|
find_program(ORCC_EXECUTABLE orcc
|
||||||
HINTS ${PC_ORC_TOOLSDIR}
|
HINTS ${PC_ORC_TOOLSDIR}
|
||||||
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin)
|
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin
|
||||||
|
)
|
||||||
|
|
||||||
FIND_PATH(ORC_INCLUDE_DIR NAMES orc/orc.h
|
find_path(ORC_INCLUDE_DIR NAMES orc/orc.h
|
||||||
HINTS ${PC_ORC_INCLUDEDIR}
|
HINTS ${PC_ORC_INCLUDEDIR}
|
||||||
PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4)
|
PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(ORC_LIBRARY_DIR NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
|
|
||||||
HINTS ${PC_ORC_LIBDIR}
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib/x86_64-linux-gnu
|
|
||||||
/usr/lib/i386-linux-gnu
|
|
||||||
/usr/lib/arm-linux-gnueabihf
|
|
||||||
/usr/lib/arm-linux-gnueabi
|
|
||||||
/usr/lib/aarch64-linux-gnu
|
|
||||||
/usr/lib/mipsel-linux-gnu
|
|
||||||
/usr/lib/mips-linux-gnu
|
|
||||||
/usr/lib/mips64el-linux-gnuabi64
|
|
||||||
/usr/lib/powerpc-linux-gnu
|
|
||||||
/usr/lib/powerpc64-linux-gnu
|
|
||||||
/usr/lib/powerpc64le-linux-gnu
|
|
||||||
/usr/lib/hppa-linux-gnu
|
|
||||||
/usr/lib/s390x-linux-gnu
|
|
||||||
/usr/lib64
|
|
||||||
/usr/lib
|
|
||||||
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
|
|
||||||
|
|
||||||
FIND_LIBRARY(ORC_LIB orc-0.4
|
|
||||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
|
||||||
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
|
|
||||||
|
|
||||||
LIST(APPEND ORC_LIBRARY
|
|
||||||
${ORC_LIB}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
SET(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
|
find_path(ORC_LIBRARY_DIR
|
||||||
SET(ORC_LIBRARIES ${ORC_LIBRARY})
|
NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||||
SET(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
|
HINTS ${PC_ORC_LIBDIR}
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib/x86_64-linux-gnu
|
||||||
|
/usr/lib/i386-linux-gnu
|
||||||
|
/usr/lib/arm-linux-gnueabihf
|
||||||
|
/usr/lib/arm-linux-gnueabi
|
||||||
|
/usr/lib/aarch64-linux-gnu
|
||||||
|
/usr/lib/mipsel-linux-gnu
|
||||||
|
/usr/lib/mips-linux-gnu
|
||||||
|
/usr/lib/mips64el-linux-gnuabi64
|
||||||
|
/usr/lib/powerpc-linux-gnu
|
||||||
|
/usr/lib/powerpc64-linux-gnu
|
||||||
|
/usr/lib/powerpc64le-linux-gnu
|
||||||
|
/usr/lib/hppa-linux-gnu
|
||||||
|
/usr/lib/s390x-linux-gnu
|
||||||
|
/usr/lib64
|
||||||
|
/usr/lib
|
||||||
|
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
|
||||||
|
)
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
find_library(ORC_LIB orc-0.4
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
|
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||||
|
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
|
||||||
|
|
||||||
|
list(APPEND ORC_LIBRARY
|
||||||
|
${ORC_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
|
||||||
|
set(ORC_LIBRARIES ${ORC_LIBRARY})
|
||||||
|
set(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
|
||||||
|
|
||||||
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE)
|
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE)
|
||||||
|
@ -30,7 +30,7 @@ set(__INCLUDED_VOLK_ADD_TEST TRUE)
|
|||||||
|
|
||||||
function(VOLK_GEN_TEST executable_name)
|
function(VOLK_GEN_TEST executable_name)
|
||||||
include(CMakeParseArgumentsCopy)
|
include(CMakeParseArgumentsCopy)
|
||||||
CMAKE_PARSE_ARGUMENTS(VOLK_TEST "" "" "SOURCES;TARGET_DEPS;EXTRA_LIB_DIRS;ENVIRONS;ARGS" ${ARGN})
|
cmake_parse_arguments(VOLK_TEST "" "" "SOURCES;TARGET_DEPS;EXTRA_LIB_DIRS;ENVIRONS;ARGS" ${ARGN})
|
||||||
add_executable(${executable_name} ${VOLK_TEST_SOURCES})
|
add_executable(${executable_name} ${VOLK_TEST_SOURCES})
|
||||||
target_link_libraries(${executable_name} ${VOLK_TEST_TARGET_DEPS})
|
target_link_libraries(${executable_name} ${VOLK_TEST_TARGET_DEPS})
|
||||||
endfunction()
|
endfunction()
|
||||||
@ -53,7 +53,7 @@ function(VOLK_ADD_TEST test_name executable_name)
|
|||||||
|
|
||||||
#parse the arguments for component names
|
#parse the arguments for component names
|
||||||
include(CMakeParseArgumentsCopy)
|
include(CMakeParseArgumentsCopy)
|
||||||
CMAKE_PARSE_ARGUMENTS(VOLK_TEST "" "" "TARGET_DEPS;EXTRA_LIB_DIRS;ENVIRONS;ARGS" ${ARGN})
|
cmake_parse_arguments(VOLK_TEST "" "" "TARGET_DEPS;EXTRA_LIB_DIRS;ENVIRONS;ARGS" ${ARGN})
|
||||||
|
|
||||||
#set the initial environs to use
|
#set the initial environs to use
|
||||||
set(environs ${VOLK_TEST_ENVIRONS})
|
set(environs ${VOLK_TEST_ENVIRONS})
|
||||||
@ -146,7 +146,7 @@ function(VOLK_ADD_TEST test_name executable_name)
|
|||||||
#each line sets an environment variable
|
#each line sets an environment variable
|
||||||
foreach(environ ${environs})
|
foreach(environ ${environs})
|
||||||
file(APPEND ${sh_file} "export ${environ}\n")
|
file(APPEND ${sh_file} "export ${environ}\n")
|
||||||
endforeach(environ)
|
endforeach()
|
||||||
|
|
||||||
set(VOLK_TEST_ARGS "${test_name}")
|
set(VOLK_TEST_ARGS "${test_name}")
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ function(VOLK_ADD_TEST test_name executable_name)
|
|||||||
COMMAND ${SHELL} ${sh_file} ${TARGET_DIR_LIST}
|
COMMAND ${SHELL} ${sh_file} ${TARGET_DIR_LIST}
|
||||||
)
|
)
|
||||||
|
|
||||||
endif(UNIX)
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
#In the land of windows, all libraries must be in the PATH. Since
|
#In the land of windows, all libraries must be in the PATH. Since
|
||||||
@ -199,7 +199,7 @@ function(VOLK_ADD_TEST test_name executable_name)
|
|||||||
#each line sets an environment variable
|
#each line sets an environment variable
|
||||||
foreach(environ ${environs})
|
foreach(environ ${environs})
|
||||||
file(APPEND ${bat_file} "SET ${environ}\n")
|
file(APPEND ${bat_file} "SET ${environ}\n")
|
||||||
endforeach(environ)
|
endforeach()
|
||||||
|
|
||||||
set(VOLK_TEST_ARGS "${test_name}")
|
set(VOLK_TEST_ARGS "${test_name}")
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ function(VOLK_ADD_TEST test_name executable_name)
|
|||||||
add_test(NAME qa_${test_name}
|
add_test(NAME qa_${test_name}
|
||||||
COMMAND ${bat_file} ${TARGET_DIR_LIST}
|
COMMAND ${bat_file} ${TARGET_DIR_LIST}
|
||||||
)
|
)
|
||||||
endif(WIN32)
|
endif()
|
||||||
|
|
||||||
endfunction(VOLK_ADD_TEST)
|
endfunction()
|
||||||
|
|
||||||
|
@ -31,21 +31,21 @@ set(BOOST_REQUIRED_COMPONENTS
|
|||||||
|
|
||||||
if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
|
if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
|
||||||
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
|
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
|
||||||
endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS} chrono)
|
set(BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS} chrono)
|
||||||
|
|
||||||
if (NOT DEFINED BOOST_ALL_DYN_LINK)
|
if(NOT DEFINED BOOST_ALL_DYN_LINK)
|
||||||
set(BOOST_ALL_DYN_LINK TRUE)
|
set(BOOST_ALL_DYN_LINK TRUE)
|
||||||
endif()
|
endif()
|
||||||
set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
|
set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
|
||||||
if(BOOST_ALL_DYN_LINK)
|
if(BOOST_ALL_DYN_LINK)
|
||||||
add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
|
add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
|
||||||
else(BOOST_ALL_DYN_LINK)
|
else()
|
||||||
unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
|
unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
|
||||||
endif(BOOST_ALL_DYN_LINK)
|
endif()
|
||||||
endif(MSVC)
|
endif()
|
||||||
|
|
||||||
find_package(Boost "1.35" COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
|
find_package(Boost "1.35" COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
|
||||||
|
|
||||||
@ -68,10 +68,10 @@ set(Boost_ADDITIONAL_VERSIONS
|
|||||||
# Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669
|
# Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669
|
||||||
# Similar problems with Boost 1.46 and 1.47.
|
# Similar problems with Boost 1.46 and 1.47.
|
||||||
|
|
||||||
OPTION(ENABLE_BAD_BOOST "Enable known bad versions of Boost" OFF)
|
option(ENABLE_BAD_BOOST "Enable known bad versions of Boost" OFF)
|
||||||
if(ENABLE_BAD_BOOST)
|
if(ENABLE_BAD_BOOST)
|
||||||
MESSAGE(STATUS "Enabling use of known bad versions of Boost.")
|
message(STATUS "Enabling use of known bad versions of Boost.")
|
||||||
endif(ENABLE_BAD_BOOST)
|
endif()
|
||||||
|
|
||||||
# For any unsuitable Boost version, add the version number below in
|
# For any unsuitable Boost version, add the version number below in
|
||||||
# the following format: XXYYZZ
|
# the following format: XXYYZZ
|
||||||
@ -80,17 +80,17 @@ endif(ENABLE_BAD_BOOST)
|
|||||||
# YY is the minor version number ('46' for 1.46)
|
# YY is the minor version number ('46' for 1.46)
|
||||||
# ZZ is the patcher version number (typically just '00')
|
# ZZ is the patcher version number (typically just '00')
|
||||||
set(Boost_NOGO_VERSIONS
|
set(Boost_NOGO_VERSIONS
|
||||||
104600 104601 104700 105200
|
104600 104601 104700 105200
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(ver ${Boost_NOGO_VERSIONS})
|
foreach(ver ${Boost_NOGO_VERSIONS})
|
||||||
if("${Boost_VERSION}" STREQUAL "${ver}")
|
if("${Boost_VERSION}" STREQUAL "${ver}")
|
||||||
if(NOT ENABLE_BAD_BOOST)
|
if(NOT ENABLE_BAD_BOOST)
|
||||||
MESSAGE(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Disabling.")
|
message(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Disabling.")
|
||||||
set(Boost_FOUND FALSE)
|
set(Boost_FOUND FALSE)
|
||||||
else(NOT ENABLE_BAD_BOOST)
|
else()
|
||||||
MESSAGE(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Continuing anyway.")
|
message(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Continuing anyway.")
|
||||||
set(Boost_FOUND TRUE)
|
set(Boost_FOUND TRUE)
|
||||||
endif(NOT ENABLE_BAD_BOOST)
|
endif()
|
||||||
endif("${Boost_VERSION}" STREQUAL "${ver}")
|
endif()
|
||||||
endforeach(ver)
|
endforeach()
|
||||||
|
@ -53,16 +53,16 @@ list(APPEND AVAIL_BUILDTYPES
|
|||||||
# the avialable build types.
|
# the avialable build types.
|
||||||
########################################################################
|
########################################################################
|
||||||
function(VOLK_CHECK_BUILD_TYPE settype)
|
function(VOLK_CHECK_BUILD_TYPE settype)
|
||||||
STRING(TOUPPER ${settype} _settype)
|
string(TOUPPER ${settype} _settype)
|
||||||
foreach(btype ${AVAIL_BUILDTYPES})
|
foreach(btype ${AVAIL_BUILDTYPES})
|
||||||
STRING(TOUPPER ${btype} _btype)
|
string(TOUPPER ${btype} _btype)
|
||||||
if(${_settype} STREQUAL ${_btype})
|
if(${_settype} STREQUAL ${_btype})
|
||||||
return() # found it; exit cleanly
|
return() # found it; exit cleanly
|
||||||
endif(${_settype} STREQUAL ${_btype})
|
endif()
|
||||||
endforeach(btype)
|
endforeach()
|
||||||
# Build type not found; error out
|
# Build type not found; error out
|
||||||
message(FATAL_ERROR "Build type '${settype}' not valid, must be one of: ${AVAIL_BUILDTYPES}")
|
message(FATAL_ERROR "Build type '${settype}' not valid, must be one of: ${AVAIL_BUILDTYPES}")
|
||||||
endfunction(VOLK_CHECK_BUILD_TYPE)
|
endfunction()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# For GCC and Clang, we can set a build type:
|
# For GCC and Clang, we can set a build type:
|
||||||
@ -74,23 +74,23 @@ endfunction(VOLK_CHECK_BUILD_TYPE)
|
|||||||
# NOTE: This is not defined on Windows systems.
|
# NOTE: This is not defined on Windows systems.
|
||||||
########################################################################
|
########################################################################
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUGPARANOID "-Wall -Wextra -g -O0" CACHE STRING
|
set(CMAKE_CXX_FLAGS_DEBUGPARANOID "-Wall -Wextra -g -O0" CACHE STRING
|
||||||
"Flags used by the C++ compiler during DebugParanoid builds." FORCE)
|
"Flags used by the C++ compiler during DebugParanoid builds." FORCE)
|
||||||
SET(CMAKE_C_FLAGS_DEBUGPARANOID "-Wall -Wextra -g -O0" CACHE STRING
|
set(CMAKE_C_FLAGS_DEBUGPARANOID "-Wall -Wextra -g -O0" CACHE STRING
|
||||||
"Flags used by the C compiler during DebugParanoid builds." FORCE)
|
"Flags used by the C compiler during DebugParanoid builds." FORCE)
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
|
||||||
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
||||||
"Flags used for linking binaries during NoOptWithASM builds." FORCE)
|
"Flags used for linking binaries during NoOptWithASM builds." FORCE)
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUGPARANOID
|
set(CMAKE_SHARED_LINKER_FLAGS_DEBUGPARANOID
|
||||||
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
||||||
"Flags used by the shared lib linker during NoOptWithASM builds." FORCE)
|
"Flags used by the shared lib linker during NoOptWithASM builds." FORCE)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
mark_as_advanced(
|
||||||
CMAKE_CXX_FLAGS_DEBUGPARANOID
|
CMAKE_CXX_FLAGS_DEBUGPARANOID
|
||||||
CMAKE_C_FLAGS_DEBUGPARANOID
|
CMAKE_C_FLAGS_DEBUGPARANOID
|
||||||
CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
|
CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
|
||||||
CMAKE_SHARED_LINKER_DEBUGPARANOID)
|
CMAKE_SHARED_LINKER_DEBUGPARANOID)
|
||||||
endif(NOT WIN32)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -105,23 +105,23 @@ endif(NOT WIN32)
|
|||||||
# NOTE: This is not defined on Windows systems.
|
# NOTE: This is not defined on Windows systems.
|
||||||
########################################################################
|
########################################################################
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
SET(CMAKE_CXX_FLAGS_NOOPTWITHASM "-save-temps -g -O0" CACHE STRING
|
set(CMAKE_CXX_FLAGS_NOOPTWITHASM "-save-temps -g -O0" CACHE STRING
|
||||||
"Flags used by the C++ compiler during NoOptWithASM builds." FORCE)
|
"Flags used by the C++ compiler during NoOptWithASM builds." FORCE)
|
||||||
SET(CMAKE_C_FLAGS_NOOPTWITHASM "-save-temps -g -O0" CACHE STRING
|
set(CMAKE_C_FLAGS_NOOPTWITHASM "-save-temps -g -O0" CACHE STRING
|
||||||
"Flags used by the C compiler during NoOptWithASM builds." FORCE)
|
"Flags used by the C compiler during NoOptWithASM builds." FORCE)
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
|
set(CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
|
||||||
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
||||||
"Flags used for linking binaries during NoOptWithASM builds." FORCE)
|
"Flags used for linking binaries during NoOptWithASM builds." FORCE)
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM
|
set(CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM
|
||||||
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
||||||
"Flags used by the shared lib linker during NoOptWithASM builds." FORCE)
|
"Flags used by the shared lib linker during NoOptWithASM builds." FORCE)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
mark_as_advanced(
|
||||||
CMAKE_CXX_FLAGS_NOOPTWITHASM
|
CMAKE_CXX_FLAGS_NOOPTWITHASM
|
||||||
CMAKE_C_FLAGS_NOOPTWITHASM
|
CMAKE_C_FLAGS_NOOPTWITHASM
|
||||||
CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
|
CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
|
||||||
CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM)
|
CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM)
|
||||||
endif(NOT WIN32)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -137,23 +137,23 @@ endif(NOT WIN32)
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
SET(CMAKE_CXX_FLAGS_O2WITHASM "-save-temps -g -O2" CACHE STRING
|
set(CMAKE_CXX_FLAGS_O2WITHASM "-save-temps -g -O2" CACHE STRING
|
||||||
"Flags used by the C++ compiler during O2WithASM builds." FORCE)
|
"Flags used by the C++ compiler during O2WithASM builds." FORCE)
|
||||||
SET(CMAKE_C_FLAGS_O2WITHASM "-save-temps -g -O2" CACHE STRING
|
set(CMAKE_C_FLAGS_O2WITHASM "-save-temps -g -O2" CACHE STRING
|
||||||
"Flags used by the C compiler during O2WithASM builds." FORCE)
|
"Flags used by the C compiler during O2WithASM builds." FORCE)
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS_O2WITHASM
|
set(CMAKE_EXE_LINKER_FLAGS_O2WITHASM
|
||||||
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
||||||
"Flags used for linking binaries during O2WithASM builds." FORCE)
|
"Flags used for linking binaries during O2WithASM builds." FORCE)
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS_O2WITHASM
|
set(CMAKE_SHARED_LINKER_FLAGS_O2WITHASM
|
||||||
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
||||||
"Flags used by the shared lib linker during O2WithASM builds." FORCE)
|
"Flags used by the shared lib linker during O2WithASM builds." FORCE)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
mark_as_advanced(
|
||||||
CMAKE_CXX_FLAGS_O2WITHASM
|
CMAKE_CXX_FLAGS_O2WITHASM
|
||||||
CMAKE_C_FLAGS_O2WITHASM
|
CMAKE_C_FLAGS_O2WITHASM
|
||||||
CMAKE_EXE_LINKER_FLAGS_O2WITHASM
|
CMAKE_EXE_LINKER_FLAGS_O2WITHASM
|
||||||
CMAKE_SHARED_LINKER_FLAGS_O2WITHASM)
|
CMAKE_SHARED_LINKER_FLAGS_O2WITHASM)
|
||||||
endif(NOT WIN32)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -169,23 +169,23 @@ endif(NOT WIN32)
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
SET(CMAKE_CXX_FLAGS_O3WITHASM "-save-temps -g -O3" CACHE STRING
|
set(CMAKE_CXX_FLAGS_O3WITHASM "-save-temps -g -O3" CACHE STRING
|
||||||
"Flags used by the C++ compiler during O3WithASM builds." FORCE)
|
"Flags used by the C++ compiler during O3WithASM builds." FORCE)
|
||||||
SET(CMAKE_C_FLAGS_O3WITHASM "-save-temps -g -O3" CACHE STRING
|
set(CMAKE_C_FLAGS_O3WITHASM "-save-temps -g -O3" CACHE STRING
|
||||||
"Flags used by the C compiler during O3WithASM builds." FORCE)
|
"Flags used by the C compiler during O3WithASM builds." FORCE)
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS_O3WITHASM
|
set(CMAKE_EXE_LINKER_FLAGS_O3WITHASM
|
||||||
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
||||||
"Flags used for linking binaries during O3WithASM builds." FORCE)
|
"Flags used for linking binaries during O3WithASM builds." FORCE)
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS_O3WITHASM
|
set(CMAKE_SHARED_LINKER_FLAGS_O3WITHASM
|
||||||
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
|
||||||
"Flags used by the shared lib linker during O3WithASM builds." FORCE)
|
"Flags used by the shared lib linker during O3WithASM builds." FORCE)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
mark_as_advanced(
|
||||||
CMAKE_CXX_FLAGS_O3WITHASM
|
CMAKE_CXX_FLAGS_O3WITHASM
|
||||||
CMAKE_C_FLAGS_O3WITHASM
|
CMAKE_C_FLAGS_O3WITHASM
|
||||||
CMAKE_EXE_LINKER_FLAGS_O3WITHASM
|
CMAKE_EXE_LINKER_FLAGS_O3WITHASM
|
||||||
CMAKE_SHARED_LINKER_FLAGS_O3WITHASM)
|
CMAKE_SHARED_LINKER_FLAGS_O3WITHASM)
|
||||||
endif(NOT WIN32)
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# For GCC and Clang, we can set a build type:
|
# For GCC and Clang, we can set a build type:
|
||||||
@ -197,14 +197,14 @@ endif(NOT WIN32)
|
|||||||
# NOTE: This is not defined on Windows systems.
|
# NOTE: This is not defined on Windows systems.
|
||||||
########################################################################
|
########################################################################
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
SET(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
|
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
|
||||||
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
|
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
|
||||||
SET(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
|
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
|
||||||
"Flags used by the C compiler during Address Sanitized builds." FORCE)
|
"Flags used by the C compiler during Address Sanitized builds." FORCE)
|
||||||
MARK_AS_ADVANCED(
|
mark_as_advanced(
|
||||||
CMAKE_CXX_FLAGS_ASAN
|
CMAKE_CXX_FLAGS_ASAN
|
||||||
CMAKE_C_FLAGS_ASAN
|
CMAKE_C_FLAGS_ASAN
|
||||||
CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
|
CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
|
||||||
CMAKE_SHARED_LINKER_DEBUGPARANOID)
|
CMAKE_SHARED_LINKER_DEBUGPARANOID)
|
||||||
endif(NOT WIN32)
|
endif()
|
||||||
|
|
||||||
|
@ -15,33 +15,33 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
INCLUDE(FindPkgConfig)
|
include(FindPkgConfig)
|
||||||
PKG_CHECK_MODULES(PC_VOLK_GNSSSDR volk_gnsssdr)
|
pkg_check_modules(PC_VOLK_GNSSSDR volk_gnsssdr)
|
||||||
|
|
||||||
FIND_PATH(
|
find_path(
|
||||||
VOLK_GNSSSDR_INCLUDE_DIRS
|
VOLK_GNSSSDR_INCLUDE_DIRS
|
||||||
NAMES volk_gnsssdr/volk_gnsssdr.h
|
NAMES volk_gnsssdr/volk_gnsssdr.h
|
||||||
HINTS $ENV{VOLK_DIR}/include
|
HINTS $ENV{VOLK_DIR}/include
|
||||||
${PC_VOLK_INCLUDEDIR}
|
${PC_VOLK_INCLUDEDIR}
|
||||||
PATHS /usr/local/include
|
PATHS /usr/local/include
|
||||||
/usr/include
|
/usr/include
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
"@CMAKE_INSTALL_PREFIX@/include"
|
"@CMAKE_INSTALL_PREFIX@/include"
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(
|
find_library(
|
||||||
VOLK_GNSSSDR_LIBRARIES
|
VOLK_GNSSSDR_LIBRARIES
|
||||||
NAMES volk_gnsssdr
|
NAMES volk_gnsssdr
|
||||||
HINTS $ENV{VOLK_DIR}/lib
|
HINTS $ENV{VOLK_DIR}/lib
|
||||||
${PC_VOLK_LIBDIR}
|
${PC_VOLK_LIBDIR}
|
||||||
PATHS /usr/local/lib
|
PATHS /usr/local/lib
|
||||||
/usr/local/lib64
|
/usr/local/lib64
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/lib64
|
/usr/lib64
|
||||||
/opt/local/lib
|
/opt/local/lib
|
||||||
"@CMAKE_INSTALL_PREFIX@/lib"
|
"@CMAKE_INSTALL_PREFIX@/lib"
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VOLK_GNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
|
find_package_handle_standard_args(VOLKGNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
|
||||||
MARK_AS_ADVANCED(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
|
mark_as_advanced(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
|
||||||
|
@ -27,6 +27,6 @@ if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${MAJOR_VERSION})
|
|||||||
if(NOT ${PACKAGE_FIND_VERSION_PATCH} GREATER ${MAINT_VERSION})
|
if(NOT ${PACKAGE_FIND_VERSION_PATCH} GREATER ${MAINT_VERSION})
|
||||||
set(PACKAGE_VERSION_EXACT 1) # exact match for API version
|
set(PACKAGE_VERSION_EXACT 1) # exact match for API version
|
||||||
set(PACKAGE_VERSION_COMPATIBLE 1) # compat for minor/patch version
|
set(PACKAGE_VERSION_COMPATIBLE 1) # compat for minor/patch version
|
||||||
endif(NOT ${PACKAGE_FIND_VERSION_PATCH} GREATER ${MAINT_VERSION})
|
endif()
|
||||||
endif(${PACKAGE_FIND_VERSION_MINOR} EQUAL ${MINOR_VERSION})
|
endif()
|
||||||
endif(${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${MAJOR_VERSION})
|
endif()
|
||||||
|
@ -32,30 +32,30 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
|||||||
if(PYTHON_EXECUTABLE)
|
if(PYTHON_EXECUTABLE)
|
||||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||||
else(PYTHON_EXECUTABLE)
|
else()
|
||||||
message(STATUS "PYTHON_EXECUTABLE not set - using default python2")
|
message(STATUS "PYTHON_EXECUTABLE not set - using default python2")
|
||||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
|
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
|
||||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||||
if(NOT PYTHONINTERP_FOUND)
|
if(NOT PYTHONINTERP_FOUND)
|
||||||
message(STATUS "python2 not found - using python3")
|
message(STATUS "python2 not found - using python3")
|
||||||
find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED)
|
find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED)
|
||||||
endif(NOT PYTHONINTERP_FOUND)
|
endif()
|
||||||
endif(PYTHON_EXECUTABLE)
|
endif()
|
||||||
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
|
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
|
||||||
else(CMAKE_VERSION VERSION_LESS 3.12)
|
else()
|
||||||
if(PYTHON_EXECUTABLE)
|
if(PYTHON_EXECUTABLE)
|
||||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||||
else(PYTHON_EXECUTABLE)
|
else()
|
||||||
find_package (Python COMPONENTS Interpreter)
|
find_package(Python COMPONENTS Interpreter)
|
||||||
set(PYTHON_VERSION_MAJOR ${Python_VERSION_MAJOR})
|
set(PYTHON_VERSION_MAJOR ${Python_VERSION_MAJOR})
|
||||||
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
|
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
|
||||||
endif(PYTHON_EXECUTABLE)
|
endif()
|
||||||
endif(CMAKE_VERSION VERSION_LESS 3.12)
|
endif()
|
||||||
|
|
||||||
if (${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
||||||
set(PYTHON3 TRUE)
|
set(PYTHON3 TRUE)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ macro(VOLK_PYTHON_CHECK_MODULE_RAW desc python_code have)
|
|||||||
message(STATUS "Python checking for ${desc} - not found")
|
message(STATUS "Python checking for ${desc} - not found")
|
||||||
set(${have} FALSE)
|
set(${have} FALSE)
|
||||||
endif()
|
endif()
|
||||||
endmacro(VOLK_PYTHON_CHECK_MODULE_RAW)
|
endmacro()
|
||||||
|
|
||||||
macro(VOLK_PYTHON_CHECK_MODULE desc mod cmd have)
|
macro(VOLK_PYTHON_CHECK_MODULE desc mod cmd have)
|
||||||
VOLK_PYTHON_CHECK_MODULE_RAW(
|
VOLK_PYTHON_CHECK_MODULE_RAW(
|
||||||
@ -92,7 +92,7 @@ except (ImportError, AssertionError): exit(-1)
|
|||||||
except: pass
|
except: pass
|
||||||
#########################################"
|
#########################################"
|
||||||
"${have}")
|
"${have}")
|
||||||
endmacro(VOLK_PYTHON_CHECK_MODULE)
|
endmacro()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Sets the python installation directory VOLK_PYTHON_DIR
|
# Sets the python installation directory VOLK_PYTHON_DIR
|
||||||
@ -121,14 +121,14 @@ unique = hashlib.md5(b'${reldir}${ARGN}').hexdigest()[:5]
|
|||||||
print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
|
print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
|
||||||
OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
add_custom_target(${_target} ALL DEPENDS ${ARGN})
|
add_custom_target(${_target} ALL DEPENDS ${ARGN})
|
||||||
endfunction(VOLK_UNIQUE_TARGET)
|
endfunction()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Install python sources (also builds and installs byte-compiled python)
|
# Install python sources (also builds and installs byte-compiled python)
|
||||||
########################################################################
|
########################################################################
|
||||||
function(VOLK_PYTHON_INSTALL)
|
function(VOLK_PYTHON_INSTALL)
|
||||||
include(CMakeParseArgumentsCopy)
|
include(CMakeParseArgumentsCopy)
|
||||||
CMAKE_PARSE_ARGUMENTS(VOLK_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
|
cmake_parse_arguments(VOLK_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
if(VOLK_PYTHON_INSTALL_FILES)
|
if(VOLK_PYTHON_INSTALL_FILES)
|
||||||
@ -162,7 +162,7 @@ function(VOLK_PYTHON_INSTALL)
|
|||||||
get_filename_component(pygen_path ${pygenfile} PATH)
|
get_filename_component(pygen_path ${pygenfile} PATH)
|
||||||
file(MAKE_DIRECTORY ${pygen_path})
|
file(MAKE_DIRECTORY ${pygen_path})
|
||||||
|
|
||||||
endforeach(pyfile)
|
endforeach()
|
||||||
|
|
||||||
#the command to generate the pyc files
|
#the command to generate the pyc files
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
@ -189,8 +189,8 @@ function(VOLK_PYTHON_INSTALL)
|
|||||||
####################################################################
|
####################################################################
|
||||||
file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native)
|
file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native)
|
||||||
|
|
||||||
if (CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
set(pyexe_native "/usr/bin/env python")
|
set(pyexe_native "/usr/bin/env python")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(pyfile ${VOLK_PYTHON_INSTALL_PROGRAMS})
|
foreach(pyfile ${VOLK_PYTHON_INSTALL_PROGRAMS})
|
||||||
@ -220,13 +220,13 @@ function(VOLK_PYTHON_INSTALL)
|
|||||||
DESTINATION ${VOLK_PYTHON_INSTALL_DESTINATION}
|
DESTINATION ${VOLK_PYTHON_INSTALL_DESTINATION}
|
||||||
COMPONENT ${VOLK_PYTHON_INSTALL_COMPONENT}
|
COMPONENT ${VOLK_PYTHON_INSTALL_COMPONENT}
|
||||||
)
|
)
|
||||||
endforeach(pyfile)
|
endforeach()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
VOLK_UNIQUE_TARGET("pygen" ${python_install_gen_targets})
|
volk_unique_target("pygen" ${python_install_gen_targets})
|
||||||
|
|
||||||
endfunction(VOLK_PYTHON_INSTALL)
|
endfunction()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Write the python helper script that generates byte code files
|
# Write the python helper script that generates byte code files
|
||||||
|
@ -22,22 +22,22 @@
|
|||||||
# header file detection
|
# header file detection
|
||||||
########################################################################
|
########################################################################
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
CHECK_INCLUDE_FILE(cpuid.h HAVE_CPUID_H)
|
check_include_file(cpuid.h HAVE_CPUID_H)
|
||||||
if(HAVE_CPUID_H)
|
if(HAVE_CPUID_H)
|
||||||
add_definitions(-DHAVE_CPUID_H)
|
add_definitions(-DHAVE_CPUID_H)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
CHECK_INCLUDE_FILE(intrin.h HAVE_INTRIN_H)
|
check_include_file(intrin.h HAVE_INTRIN_H)
|
||||||
if(HAVE_INTRIN_H)
|
if(HAVE_INTRIN_H)
|
||||||
add_definitions(-DHAVE_INTRIN_H)
|
add_definitions(-DHAVE_INTRIN_H)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
CHECK_INCLUDE_FILE(fenv.h HAVE_FENV_H)
|
check_include_file(fenv.h HAVE_FENV_H)
|
||||||
if(HAVE_FENV_H)
|
if(HAVE_FENV_H)
|
||||||
add_definitions(-DHAVE_FENV_H)
|
add_definitions(-DHAVE_FENV_H)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H)
|
check_include_file(dlfcn.h HAVE_DLFCN_H)
|
||||||
if(HAVE_DLFCN_H)
|
if(HAVE_DLFCN_H)
|
||||||
add_definitions(-DHAVE_DLFCN_H)
|
add_definitions(-DHAVE_DLFCN_H)
|
||||||
list(APPEND volk_gnsssdr_libraries ${CMAKE_DL_LIBS})
|
list(APPEND volk_gnsssdr_libraries ${CMAKE_DL_LIBS})
|
||||||
@ -62,7 +62,7 @@ endif()
|
|||||||
########################################################################
|
########################################################################
|
||||||
if(COMPILER_NAME MATCHES "GNU")
|
if(COMPILER_NAME MATCHES "GNU")
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
CHECK_CXX_COMPILER_FLAG("-Werror=unused-command-line-argument" HAVE_WERROR_UNUSED_CMD_LINE_ARG)
|
check_cxx_compiler_flag("-Werror=unused-command-line-argument" HAVE_WERROR_UNUSED_CMD_LINE_ARG)
|
||||||
if(HAVE_WERROR_UNUSED_CMD_LINE_ARG)
|
if(HAVE_WERROR_UNUSED_CMD_LINE_ARG)
|
||||||
set(VOLK_FLAG_CHECK_FLAGS "-Werror=unused-command-line-argument")
|
set(VOLK_FLAG_CHECK_FLAGS "-Werror=unused-command-line-argument")
|
||||||
endif()
|
endif()
|
||||||
@ -74,20 +74,20 @@ endif()
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
CHECK_SYMBOL_EXISTS(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
|
check_symbol_exists(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
|
||||||
|
|
||||||
if(HAVE_POSIX_MEMALIGN)
|
if(HAVE_POSIX_MEMALIGN)
|
||||||
add_definitions(-DHAVE_POSIX_MEMALIGN)
|
add_definitions(-DHAVE_POSIX_MEMALIGN)
|
||||||
endif(HAVE_POSIX_MEMALIGN)
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED _XOPEN_SOURCE)
|
if(NOT DEFINED _XOPEN_SOURCE)
|
||||||
add_definitions(-D_XOPEN_SOURCE=700)
|
add_definitions(-D_XOPEN_SOURCE=700)
|
||||||
endif(NOT DEFINED _XOPEN_SOURCE)
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# detect x86 flavor of CPU
|
# detect x86 flavor of CPU
|
||||||
########################################################################
|
########################################################################
|
||||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(i.86|x86|x86_64|amd64|AMD64)$")
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(i.86|x86|x86_64|amd64|AMD64)$")
|
||||||
message(STATUS "x86* CPU detected")
|
message(STATUS "x86* CPU detected")
|
||||||
set(CPU_IS_x86 TRUE)
|
set(CPU_IS_x86 TRUE)
|
||||||
endif()
|
endif()
|
||||||
@ -106,7 +106,7 @@ macro(check_arch arch_name)
|
|||||||
set(flags ${ARGN})
|
set(flags ${ARGN})
|
||||||
set(have_${arch_name} TRUE)
|
set(have_${arch_name} TRUE)
|
||||||
foreach(flag ${flags})
|
foreach(flag ${flags})
|
||||||
if (MSVC AND (${flag} STREQUAL "/arch:SSE2" OR ${flag} STREQUAL "/arch:SSE" ))
|
if(MSVC AND (${flag} STREQUAL "/arch:SSE2" OR ${flag} STREQUAL "/arch:SSE"))
|
||||||
# SSE/SSE2 is supported in MSVC since VS 2005 but flag not available when compiling 64-bit so do not check
|
# SSE/SSE2 is supported in MSVC since VS 2005 but flag not available when compiling 64-bit so do not check
|
||||||
else()
|
else()
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
@ -119,27 +119,27 @@ macro(check_arch arch_name)
|
|||||||
if(VOLK_FLAG_CHECK_FLAGS)
|
if(VOLK_FLAG_CHECK_FLAGS)
|
||||||
set(CMAKE_REQUIRED_FLAGS ${VOLK_FLAG_CHECK_FLAGS})
|
set(CMAKE_REQUIRED_FLAGS ${VOLK_FLAG_CHECK_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
CHECK_CXX_COMPILER_FLAG(${flag} ${have_flag})
|
check_cxx_compiler_flag(${flag} ${have_flag})
|
||||||
unset(CMAKE_REQUIRED_FLAGS)
|
unset(CMAKE_REQUIRED_FLAGS)
|
||||||
if (NOT ${have_flag})
|
if(NOT ${have_flag})
|
||||||
set(have_${arch_name} FALSE)
|
set(have_${arch_name} FALSE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
if (have_${arch_name})
|
if(have_${arch_name})
|
||||||
list(APPEND available_archs ${arch_name})
|
list(APPEND available_archs ${arch_name})
|
||||||
endif()
|
endif()
|
||||||
endmacro(check_arch)
|
endmacro()
|
||||||
|
|
||||||
foreach(line ${arch_flag_lines})
|
foreach(line ${arch_flag_lines})
|
||||||
string(REGEX REPLACE "," ";" arch_flags ${line})
|
string(REGEX REPLACE "," ";" arch_flags ${line})
|
||||||
check_arch(${arch_flags})
|
check_arch(${arch_flags})
|
||||||
endforeach(line)
|
endforeach()
|
||||||
|
|
||||||
macro(OVERRULE_ARCH arch reason)
|
macro(OVERRULE_ARCH arch reason)
|
||||||
message(STATUS "${reason}, Overruled arch ${arch}")
|
message(STATUS "${reason}, Overruled arch ${arch}")
|
||||||
list(REMOVE_ITEM available_archs ${arch})
|
list(REMOVE_ITEM available_archs ${arch})
|
||||||
endmacro(OVERRULE_ARCH)
|
endmacro()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# eliminate AVX on if not on x86, or if the compiler does not accept
|
# eliminate AVX on if not on x86, or if the compiler does not accept
|
||||||
@ -150,25 +150,25 @@ set(HAVE_XGETBV 0)
|
|||||||
set(HAVE_AVX_CVTPI32_PS 0)
|
set(HAVE_AVX_CVTPI32_PS 0)
|
||||||
if(CPU_IS_x86)
|
if(CPU_IS_x86)
|
||||||
# check to see if the compiler/linker works with xgetb instruction
|
# check to see if the compiler/linker works with xgetb instruction
|
||||||
if (NOT MSVC)
|
if(NOT MSVC)
|
||||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c "unsigned long long _xgetbv(unsigned int index) { unsigned int eax, edx; __asm__ __volatile__(\"xgetbv\" : \"=a\"(eax), \"=d\"(edx) : \"c\"(index)); return ((unsigned long long)edx << 32) | eax; } int main (void) { (void) _xgetbv(0); return (0); }")
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c "unsigned long long _xgetbv(unsigned int index) { unsigned int eax, edx; __asm__ __volatile__(\"xgetbv\" : \"=a\"(eax), \"=d\"(edx) : \"c\"(index)); return ((unsigned long long)edx << 32) | eax; } int main (void) { (void) _xgetbv(0); return (0); }")
|
||||||
else (NOT MSVC)
|
else()
|
||||||
#MSVC defines an intrinsic
|
#MSVC defines an intrinsic
|
||||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c "#include <stdio.h> \n #include <intrin.h> \n int main() { int avxSupported = 0; \n#if (_MSC_FULL_VER >= 160040219) \nint cpuInfo[4]; __cpuid(cpuInfo, 1);\nif ((cpuInfo[2] & (1 << 27) || 0) && (cpuInfo[2] & (1 << 28) || 0)) \n{\nunsigned long long xcrFeatureMask = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);\n avxSupported = (xcrFeatureMask & 0x6) == 6;}\n#endif \n return 1- avxSupported; }")
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c "#include <stdio.h> \n #include <intrin.h> \n int main() { int avxSupported = 0; \n#if (_MSC_FULL_VER >= 160040219) \nint cpuInfo[4]; __cpuid(cpuInfo, 1);\nif ((cpuInfo[2] & (1 << 27) || 0) && (cpuInfo[2] & (1 << 28) || 0)) \n{\nunsigned long long xcrFeatureMask = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);\n avxSupported = (xcrFeatureMask & 0x6) == 6;}\n#endif \n return 1- avxSupported; }")
|
||||||
endif(NOT MSVC)
|
endif()
|
||||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -o
|
execute_process(COMMAND ${CMAKE_C_COMPILER} -o
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
|
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c
|
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c
|
||||||
OUTPUT_QUIET ERROR_QUIET
|
OUTPUT_QUIET ERROR_QUIET
|
||||||
RESULT_VARIABLE avx_compile_result)
|
RESULT_VARIABLE avx_compile_result)
|
||||||
if(NOT ${avx_compile_result} EQUAL 0)
|
if(NOT ${avx_compile_result} EQUAL 0)
|
||||||
OVERRULE_ARCH(avx "Compiler or linker missing xgetbv instruction")
|
overrule_arch(avx "Compiler or linker missing xgetbv instruction")
|
||||||
elseif(NOT CROSSCOMPILE_MULTILIB)
|
elseif(NOT CROSSCOMPILE_MULTILIB)
|
||||||
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
|
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
|
||||||
OUTPUT_QUIET ERROR_QUIET
|
OUTPUT_QUIET ERROR_QUIET
|
||||||
RESULT_VARIABLE avx_exe_result)
|
RESULT_VARIABLE avx_exe_result)
|
||||||
if(NOT ${avx_exe_result} EQUAL 0)
|
if(NOT ${avx_exe_result} EQUAL 0)
|
||||||
OVERRULE_ARCH(avx "CPU missing xgetbv")
|
overrule_arch(avx "CPU missing xgetbv")
|
||||||
else()
|
else()
|
||||||
set(HAVE_XGETBV 1)
|
set(HAVE_XGETBV 1)
|
||||||
endif()
|
endif()
|
||||||
@ -184,7 +184,7 @@ if(CPU_IS_x86)
|
|||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
# check to see if the compiler/linker works with cvtpi32_ps instrinsic when using AVX
|
# check to see if the compiler/linker works with cvtpi32_ps instrinsic when using AVX
|
||||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c "#include <immintrin.h>\nint main (void) {__m128 __a; __m64 __b; __m128 foo = _mm_cvtpi32_ps(__a, __b); return (0); }")
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c "#include <immintrin.h>\nint main (void) {__m128 __a; __m64 __b; __m128 foo = _mm_cvtpi32_ps(__a, __b); return (0); }")
|
||||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -mavx -o
|
execute_process(COMMAND ${CMAKE_C_COMPILER} -mavx -o
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
||||||
@ -192,13 +192,13 @@ if(CPU_IS_x86)
|
|||||||
OUTPUT_QUIET ERROR_QUIET
|
OUTPUT_QUIET ERROR_QUIET
|
||||||
RESULT_VARIABLE avx_compile_result)
|
RESULT_VARIABLE avx_compile_result)
|
||||||
if(NOT ${avx_compile_result} EQUAL 0)
|
if(NOT ${avx_compile_result} EQUAL 0)
|
||||||
OVERRULE_ARCH(avx "Compiler missing cvtpi32_ps instrinsic")
|
overrule_arch(avx "Compiler missing cvtpi32_ps instrinsic")
|
||||||
elseif(NOT CROSSCOMPILE_MULTILIB)
|
elseif(NOT CROSSCOMPILE_MULTILIB)
|
||||||
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
||||||
OUTPUT_QUIET ERROR_QUIET
|
OUTPUT_QUIET ERROR_QUIET
|
||||||
RESULT_VARIABLE avx_exe_result)
|
RESULT_VARIABLE avx_exe_result)
|
||||||
if(NOT ${avx_exe_result} EQUAL 0)
|
if(NOT ${avx_exe_result} EQUAL 0)
|
||||||
OVERRULE_ARCH(avx "CPU missing cvtpi32_ps")
|
overrule_arch(avx "CPU missing cvtpi32_ps")
|
||||||
else()
|
else()
|
||||||
set(HAVE_AVX_CVTPI32_PS 1)
|
set(HAVE_AVX_CVTPI32_PS 1)
|
||||||
endif()
|
endif()
|
||||||
@ -207,10 +207,10 @@ if(CPU_IS_x86)
|
|||||||
endif()
|
endif()
|
||||||
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c)
|
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c)
|
||||||
else(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
else()
|
||||||
# 64-bit compilations won't need this command so don't overrule AVX
|
# 64-bit compilations won't need this command so don't overrule AVX
|
||||||
set(HAVE_AVX_CVTPI32_PS 0)
|
set(HAVE_AVX_CVTPI32_PS 0)
|
||||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
endif()
|
||||||
|
|
||||||
# Disable SSE4a if Clang is less than version 3.2
|
# Disable SSE4a if Clang is less than version 3.2
|
||||||
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
|
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
|
||||||
@ -222,14 +222,14 @@ if(CPU_IS_x86)
|
|||||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||||
OUTPUT_VARIABLE clang_version)
|
OUTPUT_VARIABLE clang_version)
|
||||||
string(REGEX MATCH "[0-9].[0-9]" CMAKE_C_COMPILER_VERSION ${clang_version})
|
string(REGEX MATCH "[0-9].[0-9]" CMAKE_C_COMPILER_VERSION ${clang_version})
|
||||||
endif(CMAKE_VERSION VERSION_LESS "2.8.10")
|
endif()
|
||||||
|
|
||||||
if(CMAKE_C_COMPILER_VERSION VERSION_LESS "3.2")
|
if(CMAKE_C_COMPILER_VERSION VERSION_LESS "3.2")
|
||||||
OVERRULE_ARCH(sse4_a "Clang >= 3.2 required for SSE4a")
|
overrule_arch(sse4_a "Clang >= 3.2 required for SSE4a")
|
||||||
endif(CMAKE_C_COMPILER_VERSION VERSION_LESS "3.2")
|
endif()
|
||||||
endif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
|
endif()
|
||||||
|
|
||||||
endif(CPU_IS_x86)
|
endif()
|
||||||
|
|
||||||
if(${HAVE_XGETBV})
|
if(${HAVE_XGETBV})
|
||||||
add_definitions(-DHAVE_XGETBV)
|
add_definitions(-DHAVE_XGETBV)
|
||||||
@ -244,17 +244,17 @@ endif()
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
if(NOT CPU_IS_x86)
|
if(NOT CPU_IS_x86)
|
||||||
OVERRULE_ARCH(3dnow "Architecture is not x86 or x86_64")
|
overrule_arch(3dnow "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(mmx "Architecture is not x86 or x86_64")
|
overrule_arch(mmx "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(sse "Architecture is not x86 or x86_64")
|
overrule_arch(sse "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(sse2 "Architecture is not x86 or x86_64")
|
overrule_arch(sse2 "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(sse3 "Architecture is not x86 or x86_64")
|
overrule_arch(sse3 "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(ssse3 "Architecture is not x86 or x86_64")
|
overrule_arch(ssse3 "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(sse4_a "Architecture is not x86 or x86_64")
|
overrule_arch(sse4_a "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(sse4_1 "Architecture is not x86 or x86_64")
|
overrule_arch(sse4_1 "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(sse4_2 "Architecture is not x86 or x86_64")
|
overrule_arch(sse4_2 "Architecture is not x86 or x86_64")
|
||||||
OVERRULE_ARCH(avx "Architecture is not x86 or x86_64")
|
overrule_arch(avx "Architecture is not x86 or x86_64")
|
||||||
endif(NOT CPU_IS_x86)
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Select neon based on ARM ISA version
|
# Select neon based on ARM ISA version
|
||||||
@ -265,33 +265,33 @@ endif(NOT CPU_IS_x86)
|
|||||||
include(CheckCSourceCompiles)
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
check_c_source_compiles("#include <arm_neon.h>\nint main(){ uint8_t *dest; uint8x8_t res; vst1_u8(dest, res); }"
|
check_c_source_compiles("#include <arm_neon.h>\nint main(){ uint8_t *dest; uint8x8_t res; vst1_u8(dest, res); }"
|
||||||
neon_compile_result)
|
neon_compile_result)
|
||||||
|
|
||||||
if(neon_compile_result)
|
if(neon_compile_result)
|
||||||
check_c_source_compiles("int main(){asm volatile(\"vrev32.8 q0, q0\");}"
|
check_c_source_compiles("int main(){asm volatile(\"vrev32.8 q0, q0\");}"
|
||||||
have_neonv7_result )
|
have_neonv7_result)
|
||||||
check_c_source_compiles("int main(){asm volatile(\"sub v1.4s,v1.4s,v1.4s\");}"
|
check_c_source_compiles("int main(){asm volatile(\"sub v1.4s,v1.4s,v1.4s\");}"
|
||||||
have_neonv8_result )
|
have_neonv8_result)
|
||||||
|
|
||||||
if (have_neonv7_result)
|
if(have_neonv7_result)
|
||||||
OVERRULE_ARCH(neonv8 "CPU is armv7")
|
overrule_arch(neonv8 "CPU is armv7")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (have_neonv8_result)
|
if(have_neonv8_result)
|
||||||
OVERRULE_ARCH(neonv7 "CPU is armv8")
|
overrule_arch(neonv7 "CPU is armv8")
|
||||||
endif()
|
endif()
|
||||||
else(neon_compile_result)
|
else()
|
||||||
OVERRULE_ARCH(neon "Compiler doesn't support NEON")
|
overrule_arch(neon "Compiler doesn't support NEON")
|
||||||
OVERRULE_ARCH(neonv7 "Compiler doesn't support NEON")
|
overrule_arch(neonv7 "Compiler doesn't support NEON")
|
||||||
OVERRULE_ARCH(neonv8 "Compiler doesn't support NEON")
|
overrule_arch(neonv8 "Compiler doesn't support NEON")
|
||||||
endif(neon_compile_result)
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# implement overruling in the ORC case,
|
# implement overruling in the ORC case,
|
||||||
# since ORC always passes flag detection
|
# since ORC always passes flag detection
|
||||||
########################################################################
|
########################################################################
|
||||||
if(NOT ORC_FOUND)
|
if(NOT ORC_FOUND)
|
||||||
OVERRULE_ARCH(orc "ORC support not found")
|
overrule_arch(orc "ORC support not found")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -301,16 +301,16 @@ endif()
|
|||||||
if(NOT CROSSCOMPILE_MULTILIB AND CPU_IS_x86)
|
if(NOT CROSSCOMPILE_MULTILIB AND CPU_IS_x86)
|
||||||
include(CheckTypeSize)
|
include(CheckTypeSize)
|
||||||
check_type_size("void*[8]" SIZEOF_CPU BUILTIN_TYPES_ONLY)
|
check_type_size("void*[8]" SIZEOF_CPU BUILTIN_TYPES_ONLY)
|
||||||
if (${SIZEOF_CPU} EQUAL 64)
|
if(${SIZEOF_CPU} EQUAL 64)
|
||||||
OVERRULE_ARCH(32 "CPU width is 64 bits")
|
overrule_arch(32 "CPU width is 64 bits")
|
||||||
endif()
|
endif()
|
||||||
if (${SIZEOF_CPU} EQUAL 32)
|
if(${SIZEOF_CPU} EQUAL 32)
|
||||||
OVERRULE_ARCH(64 "CPU width is 32 bits")
|
overrule_arch(64 "CPU width is 32 bits")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#MSVC 64 bit does not have MMX, overrule it
|
#MSVC 64 bit does not have MMX, overrule it
|
||||||
if (${SIZEOF_CPU} EQUAL 64 AND MSVC)
|
if(${SIZEOF_CPU} EQUAL 64 AND MSVC)
|
||||||
OVERRULE_ARCH(mmx "No MMX for Win64")
|
overrule_arch(mmx "No MMX for Win64")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
@ -340,12 +340,12 @@ execute_process(
|
|||||||
foreach(arch mmx orc 64 32)
|
foreach(arch mmx orc 64 32)
|
||||||
foreach(machine_name ${available_machines})
|
foreach(machine_name ${available_machines})
|
||||||
string(REPLACE "_${arch}" "" machine_name_no_arch ${machine_name})
|
string(REPLACE "_${arch}" "" machine_name_no_arch ${machine_name})
|
||||||
if (${machine_name} STREQUAL ${machine_name_no_arch})
|
if(${machine_name} STREQUAL ${machine_name_no_arch})
|
||||||
else()
|
else()
|
||||||
list(REMOVE_ITEM available_machines ${machine_name_no_arch})
|
list(REMOVE_ITEM available_machines ${machine_name_no_arch})
|
||||||
endif()
|
endif()
|
||||||
endforeach(machine_name)
|
endforeach()
|
||||||
endforeach(arch)
|
endforeach()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# done overrules! print the result
|
# done overrules! print the result
|
||||||
@ -373,7 +373,7 @@ macro(gen_template tmpl output)
|
|||||||
${PROJECT_SOURCE_DIR}/gen/volk_gnsssdr_tmpl_utils.py
|
${PROJECT_SOURCE_DIR}/gen/volk_gnsssdr_tmpl_utils.py
|
||||||
--input ${tmpl} --output ${output} ${ARGN}
|
--input ${tmpl} --output ${output} ${ARGN}
|
||||||
)
|
)
|
||||||
endmacro(gen_template)
|
endmacro()
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/volk_gnsssdr)
|
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/volk_gnsssdr)
|
||||||
|
|
||||||
@ -399,13 +399,13 @@ if(MSVC)
|
|||||||
elseif(MSVC11) #Visual Studio 11
|
elseif(MSVC11) #Visual Studio 11
|
||||||
set(cmake_c_compiler_version "Microsoft Visual Studio 11.0")
|
set(cmake_c_compiler_version "Microsoft Visual Studio 11.0")
|
||||||
elseif(MSVC12) #Visual Studio 12
|
elseif(MSVC12) #Visual Studio 12
|
||||||
SET(cmake_c_compiler_version "Microsoft Visual Studio 12.0")
|
set(cmake_c_compiler_version "Microsoft Visual Studio 12.0")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||||
OUTPUT_VARIABLE cmake_c_compiler_version)
|
OUTPUT_VARIABLE cmake_c_compiler_version)
|
||||||
endif(MSVC)
|
endif()
|
||||||
set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n" )
|
set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n")
|
||||||
|
|
||||||
foreach(machine_name ${available_machines})
|
foreach(machine_name ${available_machines})
|
||||||
#generate machine source
|
#generate machine source
|
||||||
@ -419,8 +419,8 @@ foreach(machine_name ${available_machines})
|
|||||||
--mode "machine_flags" --machine "${machine_name}" --compiler "${COMPILER_NAME}"
|
--mode "machine_flags" --machine "${machine_name}" --compiler "${COMPILER_NAME}"
|
||||||
OUTPUT_VARIABLE ${machine_name}_flags OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_VARIABLE ${machine_name}_flags OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
MESSAGE(STATUS "BUILD INFO ::: ${machine_name} ::: ${COMPILER_NAME} ::: ${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}")
|
message(STATUS "BUILD INFO ::: ${machine_name} ::: ${COMPILER_NAME} ::: ${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}")
|
||||||
set(COMPILER_INFO "${COMPILER_INFO}${machine_name}:::${COMPILER_NAME}:::${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}\n" )
|
set(COMPILER_INFO "${COMPILER_INFO}${machine_name}:::${COMPILER_NAME}:::${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}\n")
|
||||||
if(${machine_name}_flags AND NOT MSVC)
|
if(${machine_name}_flags AND NOT MSVC)
|
||||||
set_source_files_properties(${machine_source} PROPERTIES COMPILE_FLAGS "${${machine_name}_flags}")
|
set_source_files_properties(${machine_source} PROPERTIES COMPILE_FLAGS "${${machine_name}_flags}")
|
||||||
endif()
|
endif()
|
||||||
@ -428,12 +428,12 @@ foreach(machine_name ${available_machines})
|
|||||||
#add to available machine defs
|
#add to available machine defs
|
||||||
string(TOUPPER LV_MACHINE_${machine_name} machine_def)
|
string(TOUPPER LV_MACHINE_${machine_name} machine_def)
|
||||||
list(APPEND machine_defs ${machine_def})
|
list(APPEND machine_defs ${machine_def})
|
||||||
endforeach(machine_name)
|
endforeach()
|
||||||
|
|
||||||
# Convert to a C string to compile and display properly
|
# Convert to a C string to compile and display properly
|
||||||
string(STRIP "${cmake_c_compiler_version}" cmake_c_compiler_version)
|
string(STRIP "${cmake_c_compiler_version}" cmake_c_compiler_version)
|
||||||
string(STRIP ${COMPILER_INFO} COMPILER_INFO)
|
string(STRIP ${COMPILER_INFO} COMPILER_INFO)
|
||||||
MESSAGE(STATUS "Compiler Version: ${cmake_c_compiler_version}")
|
message(STATUS "Compiler Version: ${cmake_c_compiler_version}")
|
||||||
string(REPLACE "\n" " \\n" cmake_c_compiler_version ${cmake_c_compiler_version})
|
string(REPLACE "\n" " \\n" cmake_c_compiler_version ${cmake_c_compiler_version})
|
||||||
string(REPLACE "\n" " \\n" COMPILER_INFO ${COMPILER_INFO})
|
string(REPLACE "\n" " \\n" COMPILER_INFO ${COMPILER_INFO})
|
||||||
|
|
||||||
@ -462,7 +462,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
|
|||||||
# set up the assembler flags and include the source files
|
# set up the assembler flags and include the source files
|
||||||
foreach(ARCH ${ASM_ARCHS_AVAILABLE})
|
foreach(ARCH ${ASM_ARCHS_AVAILABLE})
|
||||||
string(REGEX MATCH "${ARCH}" ASM_ARCH "${available_archs}")
|
string(REGEX MATCH "${ARCH}" ASM_ARCH "${available_archs}")
|
||||||
if( ASM_ARCH STREQUAL "neonv7" )
|
if(ASM_ARCH STREQUAL "neonv7")
|
||||||
message(STATUS "---- Adding ASM files") # we always use ATT syntax
|
message(STATUS "---- Adding ASM files") # we always use ATT syntax
|
||||||
message(STATUS "-- Detected neon architecture; enabling ASM")
|
message(STATUS "-- Detected neon architecture; enabling ASM")
|
||||||
# setup architecture specific assembler flags
|
# setup architecture specific assembler flags
|
||||||
@ -474,23 +474,23 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
|
|||||||
foreach(asm_file ${asm_files})
|
foreach(asm_file ${asm_files})
|
||||||
list(APPEND volk_gnsssdr_sources ${asm_file})
|
list(APPEND volk_gnsssdr_sources ${asm_file})
|
||||||
message(STATUS "Adding source file: ${asm_file}")
|
message(STATUS "Adding source file: ${asm_file}")
|
||||||
endforeach(asm_file)
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
set(CMAKE_ASM_FLAGS ${ARCH_ASM_FLAGS})
|
set(CMAKE_ASM_FLAGS ${ARCH_ASM_FLAGS})
|
||||||
message(STATUS "c flags: ${FULL_C_FLAGS}")
|
message(STATUS "c flags: ${FULL_C_FLAGS}")
|
||||||
message(STATUS "asm flags: ${CMAKE_ASM_FLAGS}")
|
message(STATUS "asm flags: ${CMAKE_ASM_FLAGS}")
|
||||||
endforeach(ARCH)
|
endforeach()
|
||||||
|
|
||||||
else(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
|
else()
|
||||||
message(STATUS "Not enabling ASM support. CMake >= 2.8.10 required.")
|
message(STATUS "Not enabling ASM support. CMake >= 2.8.10 required.")
|
||||||
foreach(machine_name ${available_machines})
|
foreach(machine_name ${available_machines})
|
||||||
string(REGEX MATCH "neon" NEON_MACHINE ${machine_name})
|
string(REGEX MATCH "neon" NEON_MACHINE ${machine_name})
|
||||||
if( NEON_MACHINE STREQUAL "neon")
|
if(NEON_MACHINE STREQUAL "neon")
|
||||||
message(FATAL_ERROR "CMake >= 2.8.10 is required for ARM NEON support")
|
message(FATAL_ERROR "CMake >= 2.8.10 is required for ARM NEON support")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Handle orc support
|
# Handle orc support
|
||||||
@ -517,7 +517,7 @@ if(ORC_FOUND)
|
|||||||
)
|
)
|
||||||
list(APPEND volk_gnsssdr_sources ${orcc_gen})
|
list(APPEND volk_gnsssdr_sources ${orcc_gen})
|
||||||
|
|
||||||
endforeach(orc_file)
|
endforeach()
|
||||||
else()
|
else()
|
||||||
message(STATUS "Did not find liborc and orcc, disabling orc support...")
|
message(STATUS "Did not find liborc and orcc, disabling orc support...")
|
||||||
endif()
|
endif()
|
||||||
@ -597,7 +597,7 @@ if(CMAKE_VERSION VERSION_GREATER "2.8.7")
|
|||||||
install(TARGETS volk_gnsssdr_static
|
install(TARGETS volk_gnsssdr_static
|
||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_gnsssdr_devel"
|
ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_gnsssdr_devel"
|
||||||
)
|
)
|
||||||
endif(ENABLE_STATIC_LIBS)
|
endif()
|
||||||
|
|
||||||
#Older cmake versions (slower to build when building dynamic/static libs)
|
#Older cmake versions (slower to build when building dynamic/static libs)
|
||||||
else()
|
else()
|
||||||
@ -619,14 +619,14 @@ else()
|
|||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
set_target_properties(volk_gnsssdr_static
|
set_target_properties(volk_gnsssdr_static
|
||||||
PROPERTIES OUTPUT_NAME volk_gnsssdr)
|
PROPERTIES OUTPUT_NAME volk_gnsssdr)
|
||||||
endif(NOT WIN32)
|
endif()
|
||||||
|
|
||||||
install(TARGETS volk_gnsssdr_static
|
install(TARGETS volk_gnsssdr_static
|
||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_gnsssdr_devel" # .lib file
|
ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_gnsssdr_devel" # .lib file
|
||||||
)
|
)
|
||||||
endif(ENABLE_STATIC_LIBS)
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
endif(CMAKE_VERSION VERSION_GREATER "2.8.7")
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Build the QA test application
|
# Build the QA test application
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -641,7 +641,7 @@ if(ENABLE_TESTING)
|
|||||||
)
|
)
|
||||||
|
|
||||||
include(VolkAddTest)
|
include(VolkAddTest)
|
||||||
VOLK_GEN_TEST("volk_gnsssdr_test_all"
|
volk_gen_test("volk_gnsssdr_test_all"
|
||||||
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
|
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
|
||||||
TARGET_DEPS volk_gnsssdr
|
TARGET_DEPS volk_gnsssdr
|
||||||
@ -649,7 +649,7 @@ if(ENABLE_TESTING)
|
|||||||
foreach(kernel ${h_files})
|
foreach(kernel ${h_files})
|
||||||
get_filename_component(kernel ${kernel} NAME)
|
get_filename_component(kernel ${kernel} NAME)
|
||||||
string(REPLACE ".h" "" kernel ${kernel})
|
string(REPLACE ".h" "" kernel ${kernel})
|
||||||
VOLK_ADD_TEST(${kernel} "volk_gnsssdr_test_all")
|
volk_add_test(${kernel} "volk_gnsssdr_test_all")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
endif(ENABLE_TESTING)
|
endif()
|
||||||
|
@ -48,14 +48,14 @@ if(MATIO_FOUND)
|
|||||||
glog-${glog_RELEASE}
|
glog-${glog_RELEASE}
|
||||||
armadillo-${armadillo_RELEASE}
|
armadillo-${armadillo_RELEASE}
|
||||||
)
|
)
|
||||||
else(MATIO_FOUND)
|
else()
|
||||||
add_dependencies(obs_gr_blocks
|
add_dependencies(obs_gr_blocks
|
||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
glog-${glog_RELEASE}
|
glog-${glog_RELEASE}
|
||||||
armadillo-${armadillo_RELEASE}
|
armadillo-${armadillo_RELEASE}
|
||||||
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
||||||
)
|
)
|
||||||
endif(MATIO_FOUND)
|
endif()
|
||||||
|
|
||||||
target_link_libraries(obs_gr_blocks
|
target_link_libraries(obs_gr_blocks
|
||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
|
@ -39,7 +39,7 @@ include_directories(
|
|||||||
|
|
||||||
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
||||||
add_definitions(-DGR_GREATER_38=1)
|
add_definitions(-DGR_GREATER_38=1)
|
||||||
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
endif()
|
||||||
|
|
||||||
list(SORT RESAMPLER_ADAPTER_HEADERS)
|
list(SORT RESAMPLER_ADAPTER_HEADERS)
|
||||||
list(SORT RESAMPLER_ADAPTER_SOURCES)
|
list(SORT RESAMPLER_ADAPTER_SOURCES)
|
||||||
|
@ -47,8 +47,8 @@ target_link_libraries(signal_generator_blocks
|
|||||||
${ORC_LIBRARIES}
|
${ORC_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(VOLK_GNSSSDR_FOUND)
|
if(VOLKGNSSSDR_FOUND)
|
||||||
# add_dependencies(signal_generator_blocks glog-${glog_RELEASE})
|
# add_dependencies(signal_generator_blocks glog-${glog_RELEASE})
|
||||||
else(VOLK_GNSSSDR_FOUND)
|
else()
|
||||||
add_dependencies(signal_generator_blocks volk_gnsssdr_module)
|
add_dependencies(signal_generator_blocks volk_gnsssdr_module)
|
||||||
endif(VOLK_GNSSSDR_FOUND)
|
endif()
|
||||||
|
@ -23,13 +23,13 @@ if(ENABLE_RAW_UDP)
|
|||||||
find_package(PCAP)
|
find_package(PCAP)
|
||||||
if(NOT PCAP_FOUND)
|
if(NOT PCAP_FOUND)
|
||||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
||||||
endif(NOT PCAP_FOUND)
|
endif()
|
||||||
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} custom_udp_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} custom_udp_signal_source.h)
|
||||||
endif(ENABLE_RAW_UDP)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
||||||
find_package(GRIIO REQUIRED)
|
find_package(GRIIO REQUIRED)
|
||||||
@ -40,10 +40,10 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
|||||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||||
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled.")
|
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled.")
|
||||||
endif(NOT GRIIO_FOUND)
|
endif()
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
||||||
endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_AD9361)
|
if(ENABLE_AD9361)
|
||||||
find_package(LIBIIO REQUIRED)
|
find_package(LIBIIO REQUIRED)
|
||||||
@ -54,10 +54,10 @@ if(ENABLE_AD9361)
|
|||||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||||
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled.")
|
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled.")
|
||||||
endif(NOT LIBIIO_FOUND)
|
endif()
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
|
||||||
endif(ENABLE_AD9361)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_PLUTOSDR)
|
if(ENABLE_PLUTOSDR)
|
||||||
@ -67,8 +67,8 @@ if(ENABLE_PLUTOSDR)
|
|||||||
if(GRIIO_FOUND)
|
if(GRIIO_FOUND)
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h)
|
||||||
endif(GRIIO_FOUND)
|
endif()
|
||||||
endif(ENABLE_PLUTOSDR)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_FMCOMMS2)
|
if(ENABLE_FMCOMMS2)
|
||||||
@ -78,8 +78,8 @@ if(ENABLE_FMCOMMS2)
|
|||||||
if(GRIIO_FOUND)
|
if(GRIIO_FOUND)
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h)
|
||||||
endif(GRIIO_FOUND)
|
endif()
|
||||||
endif(ENABLE_FMCOMMS2)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_AD9361)
|
if(ENABLE_AD9361)
|
||||||
@ -89,8 +89,8 @@ if(ENABLE_AD9361)
|
|||||||
if(LIBIIO_FOUND)
|
if(LIBIIO_FOUND)
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h)
|
||||||
endif(LIBIIO_FOUND)
|
endif()
|
||||||
endif(ENABLE_AD9361)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_GN3S)
|
if(ENABLE_GN3S)
|
||||||
@ -101,12 +101,12 @@ if(ENABLE_GN3S)
|
|||||||
if(NOT GRGN3S_FOUND)
|
if(NOT GRGN3S_FOUND)
|
||||||
message(" gr-gn3s not found, install it from https://github.com/gnss-sdr/gr-gn3s ")
|
message(" gr-gn3s not found, install it from https://github.com/gnss-sdr/gr-gn3s ")
|
||||||
message(FATAL_ERROR "gr-gn3s required for building gnss-sdr with this option enabled")
|
message(FATAL_ERROR "gr-gn3s required for building gnss-sdr with this option enabled")
|
||||||
endif(NOT GRGN3S_FOUND)
|
endif()
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_GN3S_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_GN3S_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_GN3S_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_GN3S_INCLUDE_DIRS})
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gn3s_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gn3s_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gn3s_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gn3s_signal_source.h)
|
||||||
endif(ENABLE_GN3S)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_FLEXIBAND)
|
if(ENABLE_FLEXIBAND)
|
||||||
@ -116,7 +116,7 @@ if(ENABLE_FLEXIBAND)
|
|||||||
find_package(TELEORBIT REQUIRED)
|
find_package(TELEORBIT REQUIRED)
|
||||||
if(NOT TELEORBIT_FOUND)
|
if(NOT TELEORBIT_FOUND)
|
||||||
message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter")
|
message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter")
|
||||||
endif(NOT TELEORBIT_FOUND)
|
endif()
|
||||||
# Set up variables
|
# Set up variables
|
||||||
set(FLEXIBAND_DRIVER_INCLUDE_DIRS
|
set(FLEXIBAND_DRIVER_INCLUDE_DIRS
|
||||||
${OPT_DRIVER_INCLUDE_DIRS}
|
${OPT_DRIVER_INCLUDE_DIRS}
|
||||||
@ -126,7 +126,7 @@ if(ENABLE_FLEXIBAND)
|
|||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${FLEXIBAND_DRIVER_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${FLEXIBAND_DRIVER_INCLUDE_DIRS})
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} flexiband_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} flexiband_signal_source.h)
|
||||||
endif(ENABLE_FLEXIBAND)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_ARRAY)
|
if(ENABLE_ARRAY)
|
||||||
@ -137,12 +137,12 @@ if(ENABLE_ARRAY)
|
|||||||
if(NOT GRDBFCTTC_FOUND)
|
if(NOT GRDBFCTTC_FOUND)
|
||||||
message(" gr-dbfcttc not found, install it from https://github.com/gnss-sdr/gr-dbfcttc ")
|
message(" gr-dbfcttc not found, install it from https://github.com/gnss-sdr/gr-dbfcttc ")
|
||||||
message(FATAL_ERROR "gr-dbfcttc required for building gnss-sdr with this option enabled")
|
message(FATAL_ERROR "gr-dbfcttc required for building gnss-sdr with this option enabled")
|
||||||
endif(NOT GRDBFCTTC_FOUND)
|
endif()
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_DBFCTTC_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_DBFCTTC_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_DBFCTTC_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_DBFCTTC_INCLUDE_DIRS})
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} raw_array_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} raw_array_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} raw_array_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} raw_array_signal_source.h)
|
||||||
endif(ENABLE_ARRAY)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_OSMOSDR)
|
if(ENABLE_OSMOSDR)
|
||||||
@ -152,8 +152,8 @@ if(ENABLE_OSMOSDR)
|
|||||||
if(NOT GROSMOSDR_FOUND)
|
if(NOT GROSMOSDR_FOUND)
|
||||||
if(ENABLE_PACKAGING)
|
if(ENABLE_PACKAGING)
|
||||||
list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/osmosdr_signal_source.h)
|
list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/osmosdr_signal_source.h)
|
||||||
endif(ENABLE_PACKAGING)
|
endif()
|
||||||
else(NOT GROSMOSDR_FOUND)
|
else()
|
||||||
# set OSMO include dirs
|
# set OSMO include dirs
|
||||||
set(OSMO_DRIVER_INCLUDE_DIRS
|
set(OSMO_DRIVER_INCLUDE_DIRS
|
||||||
${OPT_DRIVER_INCLUDE_DIRS}
|
${OPT_DRIVER_INCLUDE_DIRS}
|
||||||
@ -163,8 +163,8 @@ if(ENABLE_OSMOSDR)
|
|||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h)
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GROSMOSDR_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GROSMOSDR_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${OSMO_DRIVER_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${OSMO_DRIVER_INCLUDE_DIRS})
|
||||||
endif(NOT GROSMOSDR_FOUND)
|
endif()
|
||||||
endif(ENABLE_OSMOSDR)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
||||||
@ -172,27 +172,29 @@ if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
|||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h)
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${UHD_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${UHD_INCLUDE_DIRS})
|
||||||
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc
|
set(SIGNAL_SOURCE_ADAPTER_SOURCES
|
||||||
gen_signal_source.cc
|
file_signal_source.cc
|
||||||
nsr_file_signal_source.cc
|
gen_signal_source.cc
|
||||||
spir_file_signal_source.cc
|
nsr_file_signal_source.cc
|
||||||
spir_gss6450_file_signal_source.cc
|
spir_file_signal_source.cc
|
||||||
rtl_tcp_signal_source.cc
|
spir_gss6450_file_signal_source.cc
|
||||||
labsat_signal_source.cc
|
rtl_tcp_signal_source.cc
|
||||||
${OPT_DRIVER_SOURCES}
|
labsat_signal_source.cc
|
||||||
|
${OPT_DRIVER_SOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SIGNAL_SOURCE_ADAPTER_HEADERS file_signal_source.h
|
set(SIGNAL_SOURCE_ADAPTER_HEADERS
|
||||||
gen_signal_source.h
|
file_signal_source.h
|
||||||
nsr_file_signal_source.h
|
gen_signal_source.h
|
||||||
spir_file_signal_source.h
|
nsr_file_signal_source.h
|
||||||
spir_gss6450_file_signal_source.h
|
spir_file_signal_source.h
|
||||||
rtl_tcp_signal_source.h
|
spir_gss6450_file_signal_source.h
|
||||||
labsat_signal_source.h
|
rtl_tcp_signal_source.h
|
||||||
${OPT_DRIVER_HEADERS}
|
labsat_signal_source.h
|
||||||
|
${OPT_DRIVER_HEADERS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -203,7 +205,7 @@ if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
|||||||
set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
|
set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
|
||||||
two_bit_cpx_file_signal_source.h
|
two_bit_cpx_file_signal_source.h
|
||||||
two_bit_packed_file_signal_source.h)
|
two_bit_packed_file_signal_source.h)
|
||||||
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@ -222,7 +224,7 @@ include_directories(
|
|||||||
|
|
||||||
if(ARCH_64BITS)
|
if(ARCH_64BITS)
|
||||||
add_definitions(-DARCH_64BITS=1)
|
add_definitions(-DARCH_64BITS=1)
|
||||||
endif(ARCH_64BITS)
|
endif()
|
||||||
|
|
||||||
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
|
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
@ -20,14 +20,14 @@
|
|||||||
if(ENABLE_RAW_UDP)
|
if(ENABLE_RAW_UDP)
|
||||||
find_package(PCAP)
|
find_package(PCAP)
|
||||||
if(NOT PCAP_FOUND)
|
if(NOT PCAP_FOUND)
|
||||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source")
|
||||||
endif(NOT PCAP_FOUND)
|
endif()
|
||||||
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gr_complex_ip_packet_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gr_complex_ip_packet_source.h)
|
||||||
endif(ENABLE_RAW_UDP)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
|
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
|
||||||
@ -69,12 +69,18 @@ include_directories(
|
|||||||
list(SORT SIGNAL_SOURCE_GR_BLOCKS_HEADERS)
|
list(SORT SIGNAL_SOURCE_GR_BLOCKS_HEADERS)
|
||||||
list(SORT SIGNAL_SOURCE_GR_BLOCKS_SOURCES)
|
list(SORT SIGNAL_SOURCE_GR_BLOCKS_SOURCES)
|
||||||
|
|
||||||
add_library(signal_source_gr_blocks ${SIGNAL_SOURCE_GR_BLOCKS_SOURCES} ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
|
add_library(signal_source_gr_blocks
|
||||||
|
${SIGNAL_SOURCE_GR_BLOCKS_SOURCES}
|
||||||
|
${SIGNAL_SOURCE_GR_BLOCKS_HEADERS}
|
||||||
|
)
|
||||||
|
|
||||||
source_group(Headers FILES ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
|
source_group(Headers FILES ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
|
||||||
|
|
||||||
target_link_libraries(signal_source_gr_blocks
|
target_link_libraries(signal_source_gr_blocks
|
||||||
signal_source_lib
|
signal_source_lib
|
||||||
${GNURADIO_RUNTIME_LIBRARIES}
|
${GNURADIO_RUNTIME_LIBRARIES}
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${OPT_LIBRARIES}
|
${OPT_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(signal_source_gr_blocks glog-${glog_RELEASE})
|
add_dependencies(signal_source_gr_blocks glog-${glog_RELEASE})
|
||||||
|
@ -236,8 +236,8 @@ int labsat23_source::general_work(int noutput_items,
|
|||||||
//std::cout << "Section ID: " << (int)section_id << std::endl;
|
//std::cout << "Section ID: " << (int)section_id << std::endl;
|
||||||
byte_counter += 2;
|
byte_counter += 2;
|
||||||
|
|
||||||
uint8_t section_lenght_bytes = 0;
|
//uint8_t section_lenght_bytes = 0;
|
||||||
section_lenght_bytes += memblock[byte_counter] | (memblock[byte_counter + 1] << 8) | (memblock[byte_counter + 2] << 16) | (memblock[byte_counter + 3] << 24);
|
//section_lenght_bytes += memblock[byte_counter] | (memblock[byte_counter + 1] << 8) | (memblock[byte_counter + 2] << 16) | (memblock[byte_counter + 3] << 24);
|
||||||
//std::cout << "section_lenght_bytes=" << (int)section_lenght_bytes << std::endl;
|
//std::cout << "section_lenght_bytes=" << (int)section_lenght_bytes << std::endl;
|
||||||
|
|
||||||
byte_counter += 4;
|
byte_counter += 4;
|
||||||
|
@ -25,10 +25,10 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
|||||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||||
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled")
|
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled")
|
||||||
endif(NOT GRIIO_FOUND)
|
endif()
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
||||||
endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
||||||
find_package(LIBIIO REQUIRED)
|
find_package(LIBIIO REQUIRED)
|
||||||
@ -39,7 +39,7 @@ if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
|||||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||||
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled")
|
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled")
|
||||||
endif(NOT LIBIIO_FOUND)
|
endif()
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
|
||||||
|
|
||||||
@ -49,13 +49,13 @@ if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
|||||||
if(LIBIIO_FOUND)
|
if(LIBIIO_FOUND)
|
||||||
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ad9361_manager.cc)
|
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ad9361_manager.cc)
|
||||||
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ad9361_manager.h)
|
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ad9361_manager.h)
|
||||||
endif(LIBIIO_FOUND)
|
endif()
|
||||||
endif(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FPGA OR ENABLE_AD9361)
|
if(ENABLE_FPGA OR ENABLE_AD9361)
|
||||||
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ${OPT_SIGNAL_SOURCE_LIB_SOURCES} fpga_switch.cc)
|
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ${OPT_SIGNAL_SOURCE_LIB_SOURCES} fpga_switch.cc)
|
||||||
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ${OPT_SIGNAL_SOURCE_LIB_HEADERS} fpga_switch.h)
|
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ${OPT_SIGNAL_SOURCE_LIB_HEADERS} fpga_switch.h)
|
||||||
endif(ENABLE_FPGA OR ENABLE_AD9361)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
@ -67,6 +67,6 @@ target_link_libraries(telemetry_decoder_gr_blocks
|
|||||||
${VOLK_GNSSSDR_LIBRARIES}
|
${VOLK_GNSSSDR_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT VOLK_GNSSSDR_FOUND)
|
if(NOT VOLKGNSSSDR_FOUND)
|
||||||
add_dependencies(telemetry_decoder_gr_blocks volk_gnsssdr_module)
|
add_dependencies(telemetry_decoder_gr_blocks volk_gnsssdr_module)
|
||||||
endif(NOT VOLK_GNSSSDR_FOUND)
|
endif()
|
||||||
|
@ -30,7 +30,7 @@ if(ENABLE_CUDA)
|
|||||||
${OPT_TRACKING_INCLUDE_DIRS}
|
${OPT_TRACKING_INCLUDE_DIRS}
|
||||||
${CUDA_INCLUDE_DIRS}
|
${CUDA_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
endif(ENABLE_CUDA)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FPGA)
|
if(ENABLE_FPGA)
|
||||||
set(OPT_TRACKING_ADAPTERS_SOURCES
|
set(OPT_TRACKING_ADAPTERS_SOURCES
|
||||||
@ -41,7 +41,6 @@ if(ENABLE_FPGA)
|
|||||||
galileo_e5a_dll_pll_tracking_fpga.cc
|
galileo_e5a_dll_pll_tracking_fpga.cc
|
||||||
gps_l5_dll_pll_tracking_fpga.cc
|
gps_l5_dll_pll_tracking_fpga.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OPT_TRACKING_ADAPTERS_HEADERS
|
set(OPT_TRACKING_ADAPTERS_HEADERS
|
||||||
${OPT_TRACKING_ADAPTERS_HEADERS}
|
${OPT_TRACKING_ADAPTERS_HEADERS}
|
||||||
gps_l1_ca_dll_pll_tracking_fpga.h
|
gps_l1_ca_dll_pll_tracking_fpga.h
|
||||||
@ -50,7 +49,7 @@ if(ENABLE_FPGA)
|
|||||||
galileo_e5a_dll_pll_tracking_fpga.h
|
galileo_e5a_dll_pll_tracking_fpga.h
|
||||||
gps_l5_dll_pll_tracking_fpga.h
|
gps_l5_dll_pll_tracking_fpga.h
|
||||||
)
|
)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
set(TRACKING_ADAPTER_SOURCES
|
set(TRACKING_ADAPTER_SOURCES
|
||||||
galileo_e1_dll_pll_veml_tracking.cc
|
galileo_e1_dll_pll_veml_tracking.cc
|
||||||
|
@ -33,7 +33,7 @@ if(ENABLE_CUDA)
|
|||||||
${OPT_TRACKING_LIBRARIES}
|
${OPT_TRACKING_LIBRARIES}
|
||||||
${CUDA_LIBRARIES}
|
${CUDA_LIBRARIES}
|
||||||
)
|
)
|
||||||
endif(ENABLE_CUDA)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FPGA)
|
if(ENABLE_FPGA)
|
||||||
set(OPT_TRACKING_BLOCKS_SOURCES
|
set(OPT_TRACKING_BLOCKS_SOURCES
|
||||||
@ -44,7 +44,7 @@ if(ENABLE_FPGA)
|
|||||||
${OPT_TRACKING_BLOCKS_HEADERS}
|
${OPT_TRACKING_BLOCKS_HEADERS}
|
||||||
dll_pll_veml_tracking_fpga.h
|
dll_pll_veml_tracking_fpga.h
|
||||||
)
|
)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
set(TRACKING_GR_BLOCKS_SOURCES
|
set(TRACKING_GR_BLOCKS_SOURCES
|
||||||
galileo_e1_tcp_connector_tracking_cc.cc
|
galileo_e1_tcp_connector_tracking_cc.cc
|
||||||
@ -97,12 +97,15 @@ include_directories(
|
|||||||
|
|
||||||
if(ENABLE_GENERIC_ARCH)
|
if(ENABLE_GENERIC_ARCH)
|
||||||
add_definitions(-DGENERIC_ARCH=1)
|
add_definitions(-DGENERIC_ARCH=1)
|
||||||
endif(ENABLE_GENERIC_ARCH)
|
endif()
|
||||||
|
|
||||||
list(SORT TRACKING_GR_BLOCKS_HEADERS)
|
list(SORT TRACKING_GR_BLOCKS_HEADERS)
|
||||||
list(SORT TRACKING_GR_BLOCKS_SOURCES)
|
list(SORT TRACKING_GR_BLOCKS_SOURCES)
|
||||||
|
|
||||||
add_library(tracking_gr_blocks ${TRACKING_GR_BLOCKS_SOURCES} ${TRACKING_GR_BLOCKS_HEADERS})
|
add_library(tracking_gr_blocks
|
||||||
|
${TRACKING_GR_BLOCKS_SOURCES}
|
||||||
|
${TRACKING_GR_BLOCKS_HEADERS}
|
||||||
|
)
|
||||||
|
|
||||||
source_group(Headers FILES ${TRACKING_GR_BLOCKS_HEADERS})
|
source_group(Headers FILES ${TRACKING_GR_BLOCKS_HEADERS})
|
||||||
|
|
||||||
@ -116,14 +119,18 @@ target_link_libraries(tracking_gr_blocks
|
|||||||
${OPT_TRACKING_LIBRARIES}
|
${OPT_TRACKING_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT VOLK_GNSSSDR_FOUND)
|
if(NOT VOLKGNSSSDR_FOUND)
|
||||||
if(MATIO_FOUND)
|
if(MATIO_FOUND)
|
||||||
add_dependencies(tracking_gr_blocks volk_gnsssdr_module)
|
add_dependencies(tracking_gr_blocks volk_gnsssdr_module)
|
||||||
else(MATIO_FOUND)
|
else()
|
||||||
add_dependencies(tracking_gr_blocks volk_gnsssdr_module matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
add_dependencies(tracking_gr_blocks volk_gnsssdr_module
|
||||||
endif(MATIO_FOUND)
|
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
||||||
else(NOT VOLK_GNSSSDR_FOUND)
|
)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
if(NOT MATIO_FOUND)
|
if(NOT MATIO_FOUND)
|
||||||
add_dependencies(tracking_gr_blocks matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
add_dependencies(tracking_gr_blocks
|
||||||
endif(NOT MATIO_FOUND)
|
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
||||||
endif(NOT VOLK_GNSSSDR_FOUND)
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
@ -27,7 +27,7 @@ if(ENABLE_CUDA)
|
|||||||
cuda_add_library(CUDA_CORRELATOR_LIB ${LIB_TYPE} cuda_multicorrelator.h cuda_multicorrelator.cu)
|
cuda_add_library(CUDA_CORRELATOR_LIB ${LIB_TYPE} cuda_multicorrelator.h cuda_multicorrelator.cu)
|
||||||
set(OPT_TRACKING_LIBRARIES ${OPT_TRACKING_LIBRARIES} CUDA_CORRELATOR_LIB)
|
set(OPT_TRACKING_LIBRARIES ${OPT_TRACKING_LIBRARIES} CUDA_CORRELATOR_LIB)
|
||||||
set(OPT_TRACKING_INCLUDES ${OPT_TRACKING_INCLUDES} ${CUDA_INCLUDE_DIRS})
|
set(OPT_TRACKING_INCLUDES ${OPT_TRACKING_INCLUDES} ${CUDA_INCLUDE_DIRS})
|
||||||
endif(ENABLE_CUDA)
|
endif()
|
||||||
|
|
||||||
set(TRACKING_LIB_SOURCES
|
set(TRACKING_LIB_SOURCES
|
||||||
cpu_multicorrelator.cc
|
cpu_multicorrelator.cc
|
||||||
@ -64,7 +64,7 @@ set(TRACKING_LIB_HEADERS
|
|||||||
if(ENABLE_FPGA)
|
if(ENABLE_FPGA)
|
||||||
set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} fpga_multicorrelator.cc dll_pll_conf_fpga.cc)
|
set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} fpga_multicorrelator.cc dll_pll_conf_fpga.cc)
|
||||||
set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} fpga_multicorrelator.h dll_pll_conf_fpga.h)
|
set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} fpga_multicorrelator.h dll_pll_conf_fpga.h)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@ -82,11 +82,11 @@ include_directories(
|
|||||||
|
|
||||||
if(ENABLE_GENERIC_ARCH)
|
if(ENABLE_GENERIC_ARCH)
|
||||||
add_definitions(-DGENERIC_ARCH=1)
|
add_definitions(-DGENERIC_ARCH=1)
|
||||||
endif(ENABLE_GENERIC_ARCH)
|
endif()
|
||||||
|
|
||||||
if(SSE3_AVAILABLE)
|
if(SSE3_AVAILABLE)
|
||||||
add_definitions(-DHAVE_SSE3=1)
|
add_definitions(-DHAVE_SSE3=1)
|
||||||
endif(SSE3_AVAILABLE)
|
endif()
|
||||||
|
|
||||||
list(SORT TRACKING_LIB_HEADERS)
|
list(SORT TRACKING_LIB_HEADERS)
|
||||||
list(SORT TRACKING_LIB_SOURCES)
|
list(SORT TRACKING_LIB_SOURCES)
|
||||||
@ -103,8 +103,8 @@ target_link_libraries(tracking_lib
|
|||||||
${GNURADIO_RUNTIME_LIBRARIES}
|
${GNURADIO_RUNTIME_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(VOLK_GNSSSDR_FOUND)
|
if(VOLKGNSSSDR_FOUND)
|
||||||
add_dependencies(tracking_lib glog-${glog_RELEASE})
|
add_dependencies(tracking_lib glog-${glog_RELEASE})
|
||||||
else(VOLK_GNSSSDR_FOUND)
|
else()
|
||||||
add_dependencies(tracking_lib glog-${glog_RELEASE} volk_gnsssdr_module)
|
add_dependencies(tracking_lib glog-${glog_RELEASE} volk_gnsssdr_module)
|
||||||
endif()
|
endif()
|
||||||
|
@ -20,7 +20,7 @@ add_subdirectory(supl)
|
|||||||
|
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
||||||
endif(OPENSSL_FOUND)
|
endif()
|
||||||
|
|
||||||
set(CORE_LIBS_SOURCES
|
set(CORE_LIBS_SOURCES
|
||||||
ini.cc
|
ini.cc
|
||||||
@ -57,4 +57,4 @@ target_link_libraries(rx_core_lib supl_library ${PUGIXML_LIBRARY})
|
|||||||
|
|
||||||
if(PUGIXML_LOCAL)
|
if(PUGIXML_LOCAL)
|
||||||
add_dependencies(rx_core_lib pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION})
|
add_dependencies(rx_core_lib pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION})
|
||||||
endif(PUGIXML_LOCAL)
|
endif()
|
||||||
|
@ -27,7 +27,7 @@ set(SUPL_SOURCES
|
|||||||
|
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
||||||
endif(OPENSSL_FOUND)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@ -40,8 +40,8 @@ include_directories(
|
|||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
set(MY_C_FLAGS "${MY_C_FLAGS} -Wno-parentheses-equality")
|
set(MY_C_FLAGS "${MY_C_FLAGS} -Wno-parentheses-equality")
|
||||||
endif(CMAKE_BUILD_TYPE MATCHES "Release")
|
endif()
|
||||||
endif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
endif()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_C_FLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_C_FLAGS}")
|
||||||
|
|
||||||
add_library(supl_library STATIC ${ASN_RRLP_SOURCES} ${ASN_SUPL_SOURCES} ${SUPL_SOURCES})
|
add_library(supl_library STATIC ${ASN_RRLP_SOURCES} ${ASN_SUPL_SOURCES} ${SUPL_SOURCES})
|
||||||
|
@ -34,6 +34,7 @@ set(GNSS_RECEIVER_HEADERS
|
|||||||
gnss_block_factory.h
|
gnss_block_factory.h
|
||||||
gnss_flowgraph.h
|
gnss_flowgraph.h
|
||||||
in_memory_configuration.h
|
in_memory_configuration.h
|
||||||
|
tcp_cmd_interface.h
|
||||||
concurrent_map.h
|
concurrent_map.h
|
||||||
concurrent_queue.h
|
concurrent_queue.h
|
||||||
control_message.h
|
control_message.h
|
||||||
@ -41,78 +42,86 @@ set(GNSS_RECEIVER_HEADERS
|
|||||||
|
|
||||||
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
||||||
add_definitions(-DMODERN_GNURADIO=1)
|
add_definitions(-DMODERN_GNURADIO=1)
|
||||||
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUDA)
|
if(ENABLE_CUDA)
|
||||||
add_definitions(-DCUDA_GPU_ACCEL=1)
|
add_definitions(-DCUDA_GPU_ACCEL=1)
|
||||||
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS})
|
set(OPT_RECEIVER_INCLUDE_DIRS
|
||||||
endif(ENABLE_CUDA)
|
${OPT_RECEIVER_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FPGA)
|
if(ENABLE_FPGA)
|
||||||
add_definitions(-DENABLE_FPGA=1)
|
add_definitions(-DENABLE_FPGA=1)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_RAW_UDP)
|
if(ENABLE_RAW_UDP)
|
||||||
add_definitions(-DRAW_UDP=1)
|
add_definitions(-DRAW_UDP=1)
|
||||||
endif(ENABLE_RAW_UDP)
|
endif()
|
||||||
|
|
||||||
if(Boost_VERSION LESS 105000)
|
if(Boost_VERSION LESS 105000)
|
||||||
add_definitions(-DOLD_BOOST=1)
|
add_definitions(-DOLD_BOOST=1)
|
||||||
endif(Boost_VERSION LESS 105000)
|
endif()
|
||||||
|
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
add_definitions( -DUSE_OPENSSL_FALLBACK=1 )
|
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
||||||
endif(OPENSSL_FOUND)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_GN3S)
|
if(ENABLE_GN3S)
|
||||||
add_definitions(-DGN3S_DRIVER=1)
|
add_definitions(-DGN3S_DRIVER=1)
|
||||||
endif(ENABLE_GN3S)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_ARRAY)
|
if(ENABLE_ARRAY)
|
||||||
add_definitions(-DRAW_ARRAY_DRIVER=1)
|
add_definitions(-DRAW_ARRAY_DRIVER=1)
|
||||||
endif(ENABLE_ARRAY)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FLEXIBAND)
|
if(ENABLE_FLEXIBAND)
|
||||||
add_definitions(-DFLEXIBAND_DRIVER=1)
|
add_definitions(-DFLEXIBAND_DRIVER=1)
|
||||||
endif(ENABLE_FLEXIBAND)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_OSMOSDR)
|
if(ENABLE_OSMOSDR)
|
||||||
if(GROSMOSDR_FOUND)
|
if(GROSMOSDR_FOUND)
|
||||||
add_definitions(-DOSMOSDR_DRIVER=1)
|
add_definitions(-DOSMOSDR_DRIVER=1)
|
||||||
endif(GROSMOSDR_FOUND)
|
endif()
|
||||||
endif(ENABLE_OSMOSDR)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
||||||
add_definitions(-DUHD_DRIVER=1)
|
add_definitions(-DUHD_DRIVER=1)
|
||||||
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
endif()
|
||||||
|
|
||||||
#Enable OpenCL if found in the system
|
#Enable OpenCL if found in the system
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
message(STATUS "Adding processing blocks implemented using OpenCL")
|
message(STATUS "Adding processing blocks implemented using OpenCL")
|
||||||
add_definitions(-DOPENCL_BLOCKS=1)
|
add_definitions(-DOPENCL_BLOCKS=1)
|
||||||
else(OPENCL_FOUND)
|
else()
|
||||||
add_definitions(-DOPENCL_BLOCKS=0)
|
add_definitions(-DOPENCL_BLOCKS=0)
|
||||||
endif(OPENCL_FOUND)
|
endif()
|
||||||
|
|
||||||
#enable SDR Hardware based on fmcomms2
|
#enable SDR Hardware based on fmcomms2
|
||||||
if(ENABLE_PLUTOSDR)
|
if(ENABLE_PLUTOSDR)
|
||||||
add_definitions(-DPLUTOSDR_DRIVER=1)
|
add_definitions(-DPLUTOSDR_DRIVER=1)
|
||||||
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
set(OPT_RECEIVER_INCLUDE_DIRS
|
||||||
endif(ENABLE_PLUTOSDR)
|
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FMCOMMS2)
|
if(ENABLE_FMCOMMS2)
|
||||||
add_definitions(-DFMCOMMS2_DRIVER=1)
|
add_definitions(-DFMCOMMS2_DRIVER=1)
|
||||||
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
set(OPT_RECEIVER_INCLUDE_DIRS
|
||||||
endif(ENABLE_FMCOMMS2)
|
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_AD9361)
|
if(ENABLE_AD9361)
|
||||||
add_definitions(-DAD9361_DRIVER=1)
|
add_definitions(-DAD9361_DRIVER=1)
|
||||||
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
set(OPT_RECEIVER_INCLUDE_DIRS
|
||||||
endif(ENABLE_AD9361)
|
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
||||||
add_definitions( -DGR_GREATER_38=1 )
|
add_definitions(-DGR_GREATER_38=1)
|
||||||
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
endif()
|
||||||
|
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
@ -184,7 +193,8 @@ add_library(gnss_rx
|
|||||||
${GNSS_RECEIVER_INTERFACE_HEADERS}
|
${GNSS_RECEIVER_INTERFACE_HEADERS}
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group(Headers FILES ${GNSS_RECEIVER_HEADERS} ${GNSS_RECEIVER_INTERFACE_HEADERS})
|
source_group(Headers FILES ${GNSS_RECEIVER_HEADERS}
|
||||||
|
${GNSS_RECEIVER_INTERFACE_HEADERS})
|
||||||
|
|
||||||
target_link_libraries(gnss_rx
|
target_link_libraries(gnss_rx
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/msg.h>
|
#include <sys/msg.h>
|
||||||
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -99,6 +100,94 @@ ControlThread::ControlThread(std::shared_ptr<ConfigurationInterface> configurati
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ControlThread::init()
|
||||||
|
{
|
||||||
|
// Instantiates a control queue, a GNSS flowgraph, and a control message factory
|
||||||
|
control_queue_ = gr::msg_queue::make(0);
|
||||||
|
cmd_interface_.set_msg_queue(control_queue_); //set also the queue pointer for the telecommand thread
|
||||||
|
try
|
||||||
|
{
|
||||||
|
flowgraph_ = std::make_shared<GNSSFlowgraph>(configuration_, control_queue_);
|
||||||
|
}
|
||||||
|
catch (const boost::bad_lexical_cast &e)
|
||||||
|
{
|
||||||
|
std::cout << "Caught bad lexical cast with error " << e.what() << std::endl;
|
||||||
|
}
|
||||||
|
control_message_factory_ = std::make_shared<ControlMessageFactory>();
|
||||||
|
stop_ = false;
|
||||||
|
processed_control_messages_ = 0;
|
||||||
|
applied_actions_ = 0;
|
||||||
|
supl_mcc = 0;
|
||||||
|
supl_mns = 0;
|
||||||
|
supl_lac = 0;
|
||||||
|
supl_ci = 0;
|
||||||
|
msqid = -1;
|
||||||
|
agnss_ref_location_ = Agnss_Ref_Location();
|
||||||
|
agnss_ref_time_ = Agnss_Ref_Time();
|
||||||
|
|
||||||
|
std::string empty_string = "";
|
||||||
|
std::string ref_location_str = configuration_->property("GNSS-SDR.AGNSS_ref_location", empty_string);
|
||||||
|
std::string ref_time_str = configuration_->property("GNSS-SDR.AGNSS_ref_utc_time", empty_string);
|
||||||
|
if (ref_location_str.compare(empty_string) != 0)
|
||||||
|
{
|
||||||
|
std::vector<double> vect;
|
||||||
|
std::stringstream ss(ref_location_str);
|
||||||
|
double d;
|
||||||
|
while (ss >> d)
|
||||||
|
{
|
||||||
|
vect.push_back(d);
|
||||||
|
if ((ss.peek() == ',') or (ss.peek() == ' '))
|
||||||
|
ss.ignore();
|
||||||
|
}
|
||||||
|
// fill agnss_ref_location_
|
||||||
|
if (vect.size() >= 2)
|
||||||
|
{
|
||||||
|
if ((vect[0] < 90.0) and (vect[0] > -90) and (vect[1] < 180.0) and (vect[1] > -180.0))
|
||||||
|
{
|
||||||
|
agnss_ref_location_.lat = vect[0];
|
||||||
|
agnss_ref_location_.lon = vect[1];
|
||||||
|
agnss_ref_location_.valid = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "GNSS-SDR.AGNSS_ref_location=" << ref_location_str << " is not a valid position." << std::endl;
|
||||||
|
agnss_ref_location_.valid = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ref_time_str.compare(empty_string) == 0)
|
||||||
|
{
|
||||||
|
// Make an educated guess
|
||||||
|
time_t rawtime;
|
||||||
|
time(&rawtime);
|
||||||
|
agnss_ref_time_.d_tv_sec = rawtime;
|
||||||
|
agnss_ref_time_.valid = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// fill agnss_ref_time_
|
||||||
|
struct tm tm;
|
||||||
|
if (strptime(ref_time_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm) != nullptr)
|
||||||
|
{
|
||||||
|
agnss_ref_time_.d_tv_sec = timegm(&tm);
|
||||||
|
if (agnss_ref_time_.d_tv_sec > 0)
|
||||||
|
{
|
||||||
|
agnss_ref_time_.valid = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "GNSS-SDR.AGNSS_ref_utc_time=" << ref_time_str << " is not well-formed. Please use four digits for the year: DD/MM/YYYY HH:MM:SS" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "GNSS-SDR.AGNSS_ref_utc_time=" << ref_time_str << " is not well-formed. Should be DD/MM/YYYY HH:MM:SS in UTC" << std::endl;
|
||||||
|
agnss_ref_time_.valid = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ControlThread::~ControlThread()
|
ControlThread::~ControlThread()
|
||||||
{
|
{
|
||||||
// save navigation data to files
|
// save navigation data to files
|
||||||
@ -109,7 +198,7 @@ ControlThread::~ControlThread()
|
|||||||
|
|
||||||
void ControlThread::telecommand_listener()
|
void ControlThread::telecommand_listener()
|
||||||
{
|
{
|
||||||
int tcp_cmd_port = configuration_->property("Channel.telecontrol_tcp_port", 3333);
|
int tcp_cmd_port = configuration_->property("GNSS-SDR.telecontrol_tcp_port", 3333);
|
||||||
cmd_interface_.run_cmd_server(tcp_cmd_port);
|
cmd_interface_.run_cmd_server(tcp_cmd_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +273,7 @@ int ControlThread::run()
|
|||||||
stop_ = true;
|
stop_ = true;
|
||||||
flowgraph_->disconnect();
|
flowgraph_->disconnect();
|
||||||
|
|
||||||
//Join keyboard thread
|
// Join keyboard thread
|
||||||
#ifdef OLD_BOOST
|
#ifdef OLD_BOOST
|
||||||
keyboard_thread_.timed_join(boost::posix_time::seconds(1));
|
keyboard_thread_.timed_join(boost::posix_time::seconds(1));
|
||||||
sysv_queue_thread_.timed_join(boost::posix_time::seconds(1));
|
sysv_queue_thread_.timed_join(boost::posix_time::seconds(1));
|
||||||
@ -200,11 +289,11 @@ int ControlThread::run()
|
|||||||
|
|
||||||
if (restart_)
|
if (restart_)
|
||||||
{
|
{
|
||||||
return 42; //signal the gnss-sdr-harness.sh to restart the receiver program
|
return 42; // signal the gnss-sdr-harness.sh to restart the receiver program
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 0; //normal shutdown
|
return 0; // normal shutdown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +590,7 @@ void ControlThread::assist_GNSS()
|
|||||||
bool SUPL_read_gps_assistance_xml = configuration_->property("GNSS-SDR.SUPL_read_gps_assistance_xml", false);
|
bool SUPL_read_gps_assistance_xml = configuration_->property("GNSS-SDR.SUPL_read_gps_assistance_xml", false);
|
||||||
if (SUPL_read_gps_assistance_xml == true)
|
if (SUPL_read_gps_assistance_xml == true)
|
||||||
{
|
{
|
||||||
// read assistance from file
|
// Read assistance from file
|
||||||
if (read_assistance_from_XML())
|
if (read_assistance_from_XML())
|
||||||
{
|
{
|
||||||
std::cout << "GNSS assistance data loaded from local XML file(s)." << std::endl;
|
std::cout << "GNSS assistance data loaded from local XML file(s)." << std::endl;
|
||||||
@ -651,8 +740,8 @@ void ControlThread::assist_GNSS()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have enough AGNSS data, make use of it
|
// If AGNSS is enabled, make use of it
|
||||||
if (agnss_ref_location_.valid == true) // and agnss_ref_time_.valid == true and we have AGNSS data
|
if ((agnss_ref_location_.valid == true) and ((enable_gps_supl_assistance == true) or (enable_agnss_xml == true)))
|
||||||
{
|
{
|
||||||
// Get the list of visible satellites
|
// Get the list of visible satellites
|
||||||
arma::vec ref_LLH = arma::zeros(3, 1);
|
arma::vec ref_LLH = arma::zeros(3, 1);
|
||||||
@ -675,70 +764,6 @@ void ControlThread::assist_GNSS()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ControlThread::init()
|
|
||||||
{
|
|
||||||
// Instantiates a control queue, a GNSS flowgraph, and a control message factory
|
|
||||||
control_queue_ = gr::msg_queue::make(0);
|
|
||||||
cmd_interface_.set_msg_queue(control_queue_); //set also the queue pointer for the telecommand thread
|
|
||||||
try
|
|
||||||
{
|
|
||||||
flowgraph_ = std::make_shared<GNSSFlowgraph>(configuration_, control_queue_);
|
|
||||||
}
|
|
||||||
catch (const boost::bad_lexical_cast &e)
|
|
||||||
{
|
|
||||||
std::cout << "Caught bad lexical cast with error " << e.what() << std::endl;
|
|
||||||
}
|
|
||||||
control_message_factory_ = std::make_shared<ControlMessageFactory>();
|
|
||||||
stop_ = false;
|
|
||||||
processed_control_messages_ = 0;
|
|
||||||
applied_actions_ = 0;
|
|
||||||
supl_mcc = 0;
|
|
||||||
supl_mns = 0;
|
|
||||||
supl_lac = 0;
|
|
||||||
supl_ci = 0;
|
|
||||||
msqid = -1;
|
|
||||||
agnss_ref_location_ = Agnss_Ref_Location();
|
|
||||||
agnss_ref_time_ = Agnss_Ref_Time();
|
|
||||||
|
|
||||||
std::string empty_string = "";
|
|
||||||
std::string ref_location_str = configuration_->property("GNSS-SDR.AGNSS_ref_location", empty_string);
|
|
||||||
std::string ref_time_str = configuration_->property("GNSS-SDR.AGNSS_ref_utc_time", empty_string);
|
|
||||||
if (ref_location_str.compare(empty_string) != 0)
|
|
||||||
{
|
|
||||||
std::vector<double> vect;
|
|
||||||
std::stringstream ss(ref_location_str);
|
|
||||||
double d;
|
|
||||||
while (ss >> d)
|
|
||||||
{
|
|
||||||
vect.push_back(d);
|
|
||||||
if (ss.peek() == ',')
|
|
||||||
ss.ignore();
|
|
||||||
}
|
|
||||||
// fill agnss_ref_location_
|
|
||||||
if (vect.size() >= 2)
|
|
||||||
{
|
|
||||||
agnss_ref_location_.lat = vect[0];
|
|
||||||
agnss_ref_location_.lon = vect[1];
|
|
||||||
agnss_ref_location_.valid = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ref_time_str.compare(empty_string) == 0)
|
|
||||||
{
|
|
||||||
// Make an educated guess
|
|
||||||
time_t rawtime;
|
|
||||||
time(&rawtime);
|
|
||||||
agnss_ref_time_.d_tv_sec = rawtime;
|
|
||||||
agnss_ref_time_.valid = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// fill agnss_ref_time_
|
|
||||||
agnss_ref_time_.d_tv_sec = 0; // fill
|
|
||||||
agnss_ref_time_.valid = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ControlThread::read_control_messages()
|
void ControlThread::read_control_messages()
|
||||||
{
|
{
|
||||||
DLOG(INFO) << "Reading control messages from queue";
|
DLOG(INFO) << "Reading control messages from queue";
|
||||||
@ -755,7 +780,6 @@ void ControlThread::read_control_messages()
|
|||||||
|
|
||||||
|
|
||||||
// Apply the corresponding control actions
|
// Apply the corresponding control actions
|
||||||
// TODO: May be it is better to move the apply_action state machine to the control_thread
|
|
||||||
void ControlThread::process_control_messages()
|
void ControlThread::process_control_messages()
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < control_messages_->size(); i++)
|
for (unsigned int i = 0; i < control_messages_->size(); i++)
|
||||||
@ -767,7 +791,7 @@ void ControlThread::process_control_messages()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (control_messages_->at(i)->who == 300) //some TC commands require also actions from controlthread
|
if (control_messages_->at(i)->who == 300) // some TC commands require also actions from control_thread
|
||||||
{
|
{
|
||||||
apply_action(control_messages_->at(i)->what);
|
apply_action(control_messages_->at(i)->what);
|
||||||
}
|
}
|
||||||
@ -799,32 +823,32 @@ void ControlThread::apply_action(unsigned int what)
|
|||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
LOG(INFO) << "Receiver action COLDSTART";
|
LOG(INFO) << "Receiver action COLDSTART";
|
||||||
//delete all ephemeris and almanac information from maps (also the PVT map queue)
|
// delete all ephemeris and almanac information from maps (also the PVT map queue)
|
||||||
pvt_ptr = flowgraph_->get_pvt();
|
pvt_ptr = flowgraph_->get_pvt();
|
||||||
pvt_ptr->clear_ephemeris();
|
pvt_ptr->clear_ephemeris();
|
||||||
//todo: reorder the satellite queues to the receiver default startup order.
|
// todo: reorder the satellite queues to the receiver default startup order.
|
||||||
//This is required to allow repeatability. Otherwise the satellite search order will depend on the last tracked satellites
|
// This is required to allow repeatability. Otherwise the satellite search order will depend on the last tracked satellites
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
LOG(INFO) << "Receiver action HOTSTART";
|
LOG(INFO) << "Receiver action HOTSTART";
|
||||||
visible_satellites = get_visible_sats(cmd_interface_.get_utc_time(), cmd_interface_.get_LLH());
|
visible_satellites = get_visible_sats(cmd_interface_.get_utc_time(), cmd_interface_.get_LLH());
|
||||||
//reorder the satellite queue to acquire first those visible satellites
|
// reorder the satellite queue to acquire first those visible satellites
|
||||||
flowgraph_->priorize_satellites(visible_satellites);
|
flowgraph_->priorize_satellites(visible_satellites);
|
||||||
//start again the satellite acquisitions (done in chained apply_action to flowgraph)
|
// start again the satellite acquisitions (done in chained apply_action to flowgraph)
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
LOG(INFO) << "Receiver action WARMSTART";
|
LOG(INFO) << "Receiver action WARMSTART";
|
||||||
//delete all ephemeris and almanac information from maps (also the PVT map queue)
|
// delete all ephemeris and almanac information from maps (also the PVT map queue)
|
||||||
pvt_ptr = flowgraph_->get_pvt();
|
pvt_ptr = flowgraph_->get_pvt();
|
||||||
pvt_ptr->clear_ephemeris();
|
pvt_ptr->clear_ephemeris();
|
||||||
//load the ephemeris and the almanac from XML files (receiver assistance)
|
// load the ephemeris and the almanac from XML files (receiver assistance)
|
||||||
read_assistance_from_XML();
|
read_assistance_from_XML();
|
||||||
//call here the function that computes the set of visible satellites and its elevation
|
// call here the function that computes the set of visible satellites and its elevation
|
||||||
//for the date and time specified by the warm start command and the assisted position
|
// for the date and time specified by the warm start command and the assisted position
|
||||||
get_visible_sats(cmd_interface_.get_utc_time(), cmd_interface_.get_LLH());
|
get_visible_sats(cmd_interface_.get_utc_time(), cmd_interface_.get_LLH());
|
||||||
//reorder the satellite queue to acquire first those visible satellites
|
// reorder the satellite queue to acquire first those visible satellites
|
||||||
flowgraph_->priorize_satellites(visible_satellites);
|
flowgraph_->priorize_satellites(visible_satellites);
|
||||||
//start again the satellite acquisitions (done in chained apply_action to flowgraph)
|
// start again the satellite acquisitions (done in chained apply_action to flowgraph)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG(INFO) << "Unrecognized action.";
|
LOG(INFO) << "Unrecognized action.";
|
||||||
@ -851,7 +875,8 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
// 3. loop through all the available ephemeris or almanac and compute satellite positions and elevations
|
// 3. loop through all the available ephemeris or almanac and compute satellite positions and elevations
|
||||||
// store visible satellites in a vector of pairs <int,Gnss_Satellite> to associate an elevation to the each satellite
|
// store visible satellites in a vector of pairs <int,Gnss_Satellite> to associate an elevation to the each satellite
|
||||||
std::vector<std::pair<int, Gnss_Satellite>> available_satellites;
|
std::vector<std::pair<int, Gnss_Satellite>> available_satellites;
|
||||||
|
std::vector<unsigned int> visible_gps;
|
||||||
|
std::vector<unsigned int> visible_gal;
|
||||||
std::shared_ptr<PvtInterface> pvt_ptr = flowgraph_->get_pvt();
|
std::shared_ptr<PvtInterface> pvt_ptr = flowgraph_->get_pvt();
|
||||||
struct tm tstruct;
|
struct tm tstruct;
|
||||||
char buf[80];
|
char buf[80];
|
||||||
@ -859,7 +884,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
strftime(buf, sizeof(buf), "%d/%m/%Y %H:%M:%S ", &tstruct);
|
strftime(buf, sizeof(buf), "%d/%m/%Y %H:%M:%S ", &tstruct);
|
||||||
std::string str_time = std::string(buf);
|
std::string str_time = std::string(buf);
|
||||||
std::cout << "Get visible satellites at " << str_time
|
std::cout << "Get visible satellites at " << str_time
|
||||||
<< " UTC, assuming RX position " << LLH(0) << " [deg], " << LLH(1) << " [deg], " << LLH(2) << " [m]" << std::endl;
|
<< "UTC, assuming RX position " << LLH(0) << " [deg], " << LLH(1) << " [deg], " << LLH(2) << " [m]" << std::endl;
|
||||||
|
|
||||||
std::map<int, Gps_Ephemeris> gps_eph_map = pvt_ptr->get_gps_ephemeris();
|
std::map<int, Gps_Ephemeris> gps_eph_map = pvt_ptr->get_gps_ephemeris();
|
||||||
for (std::map<int, Gps_Ephemeris>::iterator it = gps_eph_map.begin(); it != gps_eph_map.end(); ++it)
|
for (std::map<int, Gps_Ephemeris>::iterator it = gps_eph_map.begin(); it != gps_eph_map.end(); ++it)
|
||||||
@ -880,6 +905,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
std::cout << "Using GPS Ephemeris: Sat " << it->second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
|
std::cout << "Using GPS Ephemeris: Sat " << it->second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
|
||||||
available_satellites.push_back(std::pair<int, Gnss_Satellite>(floor(El),
|
available_satellites.push_back(std::pair<int, Gnss_Satellite>(floor(El),
|
||||||
(Gnss_Satellite(std::string("GPS"), it->second.i_satellite_PRN))));
|
(Gnss_Satellite(std::string("GPS"), it->second.i_satellite_PRN))));
|
||||||
|
visible_gps.push_back(it->second.i_satellite_PRN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -902,6 +928,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
std::cout << "Using Galileo Ephemeris: Sat " << it->second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
|
std::cout << "Using Galileo Ephemeris: Sat " << it->second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
|
||||||
available_satellites.push_back(std::pair<int, Gnss_Satellite>(floor(El),
|
available_satellites.push_back(std::pair<int, Gnss_Satellite>(floor(El),
|
||||||
(Gnss_Satellite(std::string("Galileo"), it->second.i_satellite_PRN))));
|
(Gnss_Satellite(std::string("Galileo"), it->second.i_satellite_PRN))));
|
||||||
|
visible_gal.push_back(it->second.i_satellite_PRN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -911,17 +938,24 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
alm_t rtklib_alm = alm_to_rtklib(it->second);
|
alm_t rtklib_alm = alm_to_rtklib(it->second);
|
||||||
double r_sat[3];
|
double r_sat[3];
|
||||||
double clock_bias_s;
|
double clock_bias_s;
|
||||||
alm2pos(gps_gtime, &rtklib_alm, &r_sat[0], &clock_bias_s);
|
gtime_t aux_gtime;
|
||||||
|
aux_gtime.time = fmod(utc2gpst(gps_gtime).time + 345600, 604800);
|
||||||
|
alm2pos(aux_gtime, &rtklib_alm, &r_sat[0], &clock_bias_s);
|
||||||
double Az, El, dist_m;
|
double Az, El, dist_m;
|
||||||
arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]};
|
arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]};
|
||||||
arma::vec dx = r_sat_eb_e - r_eb_e;
|
arma::vec dx = r_sat_eb_e - r_eb_e;
|
||||||
topocent(&Az, &El, &dist_m, r_eb_e, dx);
|
topocent(&Az, &El, &dist_m, r_eb_e, dx);
|
||||||
// push sat
|
// push sat
|
||||||
|
std::vector<unsigned int>::iterator it2;
|
||||||
if (El > 0)
|
if (El > 0)
|
||||||
{
|
{
|
||||||
std::cout << "Using GPS Almanac: Sat " << it->second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
|
it2 = std::find(visible_gps.begin(), visible_gps.end(), it->second.i_satellite_PRN);
|
||||||
available_satellites.push_back(std::pair<int, Gnss_Satellite>(floor(El),
|
if (it2 == visible_gps.end())
|
||||||
(Gnss_Satellite(std::string("GPS"), it->second.i_satellite_PRN))));
|
{
|
||||||
|
std::cout << "Using GPS Almanac: Sat " << it->second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
|
||||||
|
available_satellites.push_back(std::pair<int, Gnss_Satellite>(floor(El),
|
||||||
|
(Gnss_Satellite(std::string("GPS"), it->second.i_satellite_PRN))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -931,17 +965,24 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
alm_t rtklib_alm = alm_to_rtklib(it->second);
|
alm_t rtklib_alm = alm_to_rtklib(it->second);
|
||||||
double r_sat[3];
|
double r_sat[3];
|
||||||
double clock_bias_s;
|
double clock_bias_s;
|
||||||
alm2pos(gps_gtime, &rtklib_alm, &r_sat[0], &clock_bias_s);
|
gtime_t gal_gtime;
|
||||||
|
gal_gtime.time = fmod(utc2gpst(gps_gtime).time + 345600, 604800);
|
||||||
|
alm2pos(gal_gtime, &rtklib_alm, &r_sat[0], &clock_bias_s);
|
||||||
double Az, El, dist_m;
|
double Az, El, dist_m;
|
||||||
arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]};
|
arma::vec r_sat_eb_e = arma::vec{r_sat[0], r_sat[1], r_sat[2]};
|
||||||
arma::vec dx = r_sat_eb_e - r_eb_e;
|
arma::vec dx = r_sat_eb_e - r_eb_e;
|
||||||
topocent(&Az, &El, &dist_m, r_eb_e, dx);
|
topocent(&Az, &El, &dist_m, r_eb_e, dx);
|
||||||
// push sat
|
// push sat
|
||||||
|
std::vector<unsigned int>::iterator it2;
|
||||||
if (El > 0)
|
if (El > 0)
|
||||||
{
|
{
|
||||||
std::cout << "Using Galileo Almanac: Sat " << it->second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
|
it2 = std::find(visible_gal.begin(), visible_gal.end(), it->second.i_satellite_PRN);
|
||||||
available_satellites.push_back(std::pair<int, Gnss_Satellite>(floor(El),
|
if (it2 == visible_gal.end())
|
||||||
(Gnss_Satellite(std::string("Galileo"), it->second.i_satellite_PRN))));
|
{
|
||||||
|
std::cout << "Using Galileo Almanac: Sat " << it->second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
|
||||||
|
available_satellites.push_back(std::pair<int, Gnss_Satellite>(floor(El),
|
||||||
|
(Gnss_Satellite(std::string("Galileo"), it->second.i_satellite_PRN))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -949,7 +990,8 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
std::sort(available_satellites.begin(), available_satellites.end(), [](const std::pair<int, Gnss_Satellite> &a, const std::pair<int, Gnss_Satellite> &b) { // use lambda. Cleaner and easier to read
|
std::sort(available_satellites.begin(), available_satellites.end(), [](const std::pair<int, Gnss_Satellite> &a, const std::pair<int, Gnss_Satellite> &b) { // use lambda. Cleaner and easier to read
|
||||||
return a.first < b.first;
|
return a.first < b.first;
|
||||||
});
|
});
|
||||||
// std::reverse(available_satellites.begin(), available_satellites.end());
|
// provide list starting from satellites with higher elevation
|
||||||
|
std::reverse(available_satellites.begin(), available_satellites.end());
|
||||||
return available_satellites;
|
return available_satellites;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,35 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
TcpCmdInterface::TcpCmdInterface()
|
||||||
|
{
|
||||||
|
register_functions();
|
||||||
|
keep_running_ = true;
|
||||||
|
control_queue_ = nullptr;
|
||||||
|
rx_latitude_ = 0;
|
||||||
|
rx_longitude_ = 0;
|
||||||
|
rx_altitude_ = 0;
|
||||||
|
receiver_utc_time_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TcpCmdInterface::~TcpCmdInterface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TcpCmdInterface::register_functions()
|
||||||
|
{
|
||||||
|
functions["status"] = std::bind(&TcpCmdInterface::status, this, std::placeholders::_1);
|
||||||
|
functions["standby"] = std::bind(&TcpCmdInterface::standby, this, std::placeholders::_1);
|
||||||
|
functions["reset"] = std::bind(&TcpCmdInterface::reset, this, std::placeholders::_1);
|
||||||
|
functions["hotstart"] = std::bind(&TcpCmdInterface::hotstart, this, std::placeholders::_1);
|
||||||
|
functions["warmstart"] = std::bind(&TcpCmdInterface::warmstart, this, std::placeholders::_1);
|
||||||
|
functions["coldstart"] = std::bind(&TcpCmdInterface::coldstart, this, std::placeholders::_1);
|
||||||
|
functions["set_ch_satellite"] = std::bind(&TcpCmdInterface::set_ch_satellite, this, std::placeholders::_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void TcpCmdInterface::set_pvt(std::shared_ptr<PvtInterface> PVT_sptr)
|
void TcpCmdInterface::set_pvt(std::shared_ptr<PvtInterface> PVT_sptr)
|
||||||
{
|
{
|
||||||
PVT_sptr_ = PVT_sptr;
|
PVT_sptr_ = PVT_sptr;
|
||||||
@ -145,7 +174,11 @@ std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLin
|
|||||||
{
|
{
|
||||||
// Read commandline time parameter
|
// Read commandline time parameter
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm);
|
if (strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr)
|
||||||
|
{
|
||||||
|
response = "ERROR: time parameter malformed\n";
|
||||||
|
return response;
|
||||||
|
}
|
||||||
receiver_utc_time_ = timegm(&tm);
|
receiver_utc_time_ = timegm(&tm);
|
||||||
|
|
||||||
// Read latitude, longitude, and height
|
// Read latitude, longitude, and height
|
||||||
@ -188,7 +221,11 @@ std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLi
|
|||||||
// Read commandline time parameter
|
// Read commandline time parameter
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
tmp_str = commandLine.at(1) + commandLine.at(2);
|
tmp_str = commandLine.at(1) + commandLine.at(2);
|
||||||
strptime(tmp_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm);
|
if (strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr)
|
||||||
|
{
|
||||||
|
response = "ERROR: time parameter malformed\n";
|
||||||
|
return response;
|
||||||
|
}
|
||||||
receiver_utc_time_ = timegm(&tm);
|
receiver_utc_time_ = timegm(&tm);
|
||||||
|
|
||||||
// Read latitude, longitude, and height
|
// Read latitude, longitude, and height
|
||||||
@ -247,30 +284,6 @@ std::string TcpCmdInterface::set_ch_satellite(const std::vector<std::string> &co
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TcpCmdInterface::register_functions()
|
|
||||||
{
|
|
||||||
functions["status"] = std::bind(&TcpCmdInterface::status, this, std::placeholders::_1);
|
|
||||||
functions["standby"] = std::bind(&TcpCmdInterface::standby, this, std::placeholders::_1);
|
|
||||||
functions["reset"] = std::bind(&TcpCmdInterface::reset, this, std::placeholders::_1);
|
|
||||||
functions["hotstart"] = std::bind(&TcpCmdInterface::hotstart, this, std::placeholders::_1);
|
|
||||||
functions["warmstart"] = std::bind(&TcpCmdInterface::warmstart, this, std::placeholders::_1);
|
|
||||||
functions["coldstart"] = std::bind(&TcpCmdInterface::coldstart, this, std::placeholders::_1);
|
|
||||||
functions["set_ch_satellite"] = std::bind(&TcpCmdInterface::set_ch_satellite, this, std::placeholders::_1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TcpCmdInterface::TcpCmdInterface()
|
|
||||||
{
|
|
||||||
register_functions();
|
|
||||||
keep_running_ = true;
|
|
||||||
control_queue_ = nullptr;
|
|
||||||
rx_latitude_ = 0;
|
|
||||||
rx_longitude_ = 0;
|
|
||||||
rx_altitude_ = 0;
|
|
||||||
receiver_utc_time_ = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void TcpCmdInterface::set_msg_queue(gr::msg_queue::sptr control_queue)
|
void TcpCmdInterface::set_msg_queue(gr::msg_queue::sptr control_queue)
|
||||||
{
|
{
|
||||||
control_queue_ = control_queue;
|
control_queue_ = control_queue;
|
||||||
@ -385,9 +398,3 @@ void TcpCmdInterface::run_cmd_server(int tcp_port)
|
|||||||
std::cout << "TCP Command Interface exception: address already in use" << std::endl;
|
std::cout << "TCP Command Interface exception: address already in use" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TcpCmdInterface::~TcpCmdInterface()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated destructor stub
|
|
||||||
}
|
|
||||||
|
@ -99,8 +99,6 @@ include_directories(
|
|||||||
${GFlags_INCLUDE_DIRS}
|
${GFlags_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
link_directories(${Boost_LIBRARY_DIR})
|
|
||||||
|
|
||||||
list(SORT SYSTEM_PARAMETERS_HEADERS)
|
list(SORT SYSTEM_PARAMETERS_HEADERS)
|
||||||
list(SORT SYSTEM_PARAMETERS_SOURCES)
|
list(SORT SYSTEM_PARAMETERS_SOURCES)
|
||||||
|
|
||||||
|
@ -459,7 +459,7 @@ int64_t Galileo_Fnav_Message::read_navigation_signed(std::bitset<GALILEO_FNAV_DA
|
|||||||
// read the MSB and perform the sign extension
|
// read the MSB and perform the sign extension
|
||||||
if (bits[GALILEO_FNAV_DATA_FRAME_BITS - parameter[0].first] == 1)
|
if (bits[GALILEO_FNAV_DATA_FRAME_BITS - parameter[0].first] == 1)
|
||||||
{
|
{
|
||||||
value ^= 0xFFFFFFFFFFFFFFFF; //64 bits variable
|
value ^= 0x0FFFFFFFFFFFFFFF; // 64 bits variable
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -225,6 +225,7 @@ int64_t Gps_Navigation_Message::read_navigation_signed(std::bitset<GPS_SUBFRAME_
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t Gps_Navigation_Message::subframe_decoder(char *subframe)
|
int32_t Gps_Navigation_Message::subframe_decoder(char *subframe)
|
||||||
{
|
{
|
||||||
int32_t subframe_ID = 0;
|
int32_t subframe_ID = 0;
|
||||||
|
@ -23,28 +23,28 @@ if(ENABLE_GPERFTOOLS)
|
|||||||
if(GPERFTOOLS_FOUND)
|
if(GPERFTOOLS_FOUND)
|
||||||
set(GNSS_SDR_OPTIONAL_LIBS "${GNSS_SDR_OPTIONAL_LIBS};${GPERFTOOLS_PROFILER};${GPERFTOOLS_TCMALLOC}")
|
set(GNSS_SDR_OPTIONAL_LIBS "${GNSS_SDR_OPTIONAL_LIBS};${GPERFTOOLS_PROFILER};${GPERFTOOLS_TCMALLOC}")
|
||||||
set(GNSS_SDR_OPTIONAL_HEADERS "${GNSS_SDR_OPTIONAL_HEADERS};${GPERFTOOLS_INCLUDE_DIR}")
|
set(GNSS_SDR_OPTIONAL_HEADERS "${GNSS_SDR_OPTIONAL_HEADERS};${GPERFTOOLS_INCLUDE_DIR}")
|
||||||
endif(GPERFTOOLS_FOUND)
|
endif()
|
||||||
endif(ENABLE_GPERFTOOLS)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
||||||
set(GNSS_SDR_OPTIONAL_LIBS ${GNSS_SDR_OPTIONAL_LIBS} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
|
set(GNSS_SDR_OPTIONAL_LIBS ${GNSS_SDR_OPTIONAL_LIBS} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
|
||||||
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${UHD_INCLUDE_DIRS})
|
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${UHD_INCLUDE_DIRS})
|
||||||
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
endif()
|
||||||
|
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
||||||
endif(OPENSSL_FOUND)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUDA)
|
if(ENABLE_CUDA)
|
||||||
add_definitions(-DCUDA_GPU_ACCEL=1)
|
add_definitions(-DCUDA_GPU_ACCEL=1)
|
||||||
set(GNSS_SDR_OPTIONAL_LIBS ${GNSS_SDR_OPTIONAL_LIBS} ${CUDA_LIBRARIES})
|
set(GNSS_SDR_OPTIONAL_LIBS ${GNSS_SDR_OPTIONAL_LIBS} ${CUDA_LIBRARIES})
|
||||||
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${CUDA_INCLUDE_DIRS})
|
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${CUDA_INCLUDE_DIRS})
|
||||||
endif(ENABLE_CUDA)
|
endif()
|
||||||
|
|
||||||
if(ORC_FOUND)
|
if(ORC_FOUND)
|
||||||
set(GNSS_SDR_OPTIONAL_LIBS ${GNSS_SDR_OPTIONAL_LIBS} ${ORC_LIBRARIES})
|
set(GNSS_SDR_OPTIONAL_LIBS ${GNSS_SDR_OPTIONAL_LIBS} ${ORC_LIBRARIES})
|
||||||
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${ORC_INCLUDE_DIRS})
|
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${ORC_INCLUDE_DIRS})
|
||||||
endif(ORC_FOUND)
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||||
@ -72,8 +72,8 @@ add_definitions(-DGNSS_SDR_VERSION="${VERSION}")
|
|||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
set(MAC_LIBRARIES "-framework Accelerate -lc++")
|
set(MAC_LIBRARIES "-framework Accelerate -lc++")
|
||||||
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
endif()
|
||||||
endif(OS_IS_MACOSX)
|
endif()
|
||||||
|
|
||||||
add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
||||||
|
|
||||||
@ -110,10 +110,10 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/conf DESTINATION share/gnss-sdr
|
|||||||
install(FILES ${CMAKE_SOURCE_DIR}/conf/gnss-sdr.conf DESTINATION share/gnss-sdr/conf
|
install(FILES ${CMAKE_SOURCE_DIR}/conf/gnss-sdr.conf DESTINATION share/gnss-sdr/conf
|
||||||
RENAME default.conf)
|
RENAME default.conf)
|
||||||
|
|
||||||
if(NOT VOLK_GNSSSDR_FOUND)
|
if(NOT VOLKGNSSSDR_FOUND)
|
||||||
install(PROGRAMS ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/apps/volk_gnsssdr_profile DESTINATION bin COMPONENT "volk_gnsssdr")
|
install(PROGRAMS ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/apps/volk_gnsssdr_profile DESTINATION bin COMPONENT "volk_gnsssdr")
|
||||||
install(PROGRAMS ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/apps/volk_gnsssdr-config-info DESTINATION bin COMPONENT "volk_gnsssdr")
|
install(PROGRAMS ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/apps/volk_gnsssdr-config-info DESTINATION bin COMPONENT "volk_gnsssdr")
|
||||||
endif(NOT VOLK_GNSSSDR_FOUND)
|
endif()
|
||||||
|
|
||||||
find_program(GZIP
|
find_program(GZIP
|
||||||
gzip
|
gzip
|
||||||
@ -135,12 +135,12 @@ if(NOT GZIP_NOTFOUND)
|
|||||||
|
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/changelog.gz DESTINATION share/doc/gnss-sdr)
|
install(FILES ${CMAKE_BINARY_DIR}/changelog.gz DESTINATION share/doc/gnss-sdr)
|
||||||
|
|
||||||
if(NOT VOLK_GNSSSDR_FOUND)
|
if(NOT VOLKGNSSSDR_FOUND)
|
||||||
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Packaging/volk_gnsssdr_profile-manpage
|
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Packaging/volk_gnsssdr_profile-manpage
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/volk_gnsssdr_profile.1.gz")
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/volk_gnsssdr_profile.1.gz")
|
||||||
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Packaging/volk_gnsssdr-config-info-manpage
|
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Packaging/volk_gnsssdr-config-info-manpage
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/volk_gnsssdr-config-info.1.gz")
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/volk_gnsssdr-config-info.1.gz")
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/volk_gnsssdr_profile.1.gz DESTINATION share/man/man1)
|
install(FILES ${CMAKE_BINARY_DIR}/volk_gnsssdr_profile.1.gz DESTINATION share/man/man1)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/volk_gnsssdr-config-info.1.gz DESTINATION share/man/man1)
|
install(FILES ${CMAKE_BINARY_DIR}/volk_gnsssdr-config-info.1.gz DESTINATION share/man/man1)
|
||||||
endif(NOT VOLK_GNSSSDR_FOUND)
|
endif()
|
||||||
endif(NOT GZIP_NOTFOUND)
|
endif()
|
||||||
|
@ -25,26 +25,26 @@ add_subdirectory(system-tests/libs)
|
|||||||
################################################################################
|
################################################################################
|
||||||
if(EXISTS $ENV{GTEST_DIR})
|
if(EXISTS $ENV{GTEST_DIR})
|
||||||
set(GTEST_DIR_LOCAL $ENV{GTEST_DIR})
|
set(GTEST_DIR_LOCAL $ENV{GTEST_DIR})
|
||||||
endif(EXISTS $ENV{GTEST_DIR})
|
endif()
|
||||||
if(GTEST_DIR)
|
if(GTEST_DIR)
|
||||||
set(GTEST_DIR_LOCAL ${GTEST_DIR})
|
set(GTEST_DIR_LOCAL ${GTEST_DIR})
|
||||||
endif(GTEST_DIR)
|
endif()
|
||||||
if(NOT GTEST_DIR_LOCAL)
|
if(NOT GTEST_DIR_LOCAL)
|
||||||
set(GTEST_DIR_LOCAL false)
|
set(GTEST_DIR_LOCAL false)
|
||||||
else()
|
else()
|
||||||
set(GTEST_DIR_LOCAL true)
|
set(GTEST_DIR_LOCAL true)
|
||||||
endif(NOT GTEST_DIR_LOCAL)
|
endif()
|
||||||
|
|
||||||
if(GTEST_INCLUDE_DIRS)
|
if(GTEST_INCLUDE_DIRS)
|
||||||
set(GTEST_DIR_LOCAL true)
|
set(GTEST_DIR_LOCAL true)
|
||||||
endif(GTEST_INCLUDE_DIRS)
|
endif()
|
||||||
|
|
||||||
set(GTEST_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
set(GTEST_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
||||||
set(TOOLCHAIN_ARG "")
|
set(TOOLCHAIN_ARG "")
|
||||||
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
||||||
set(GTEST_COMPILER "")
|
set(GTEST_COMPILER "")
|
||||||
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Toolchains/oe-sdk_cross.cmake")
|
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Toolchains/oe-sdk_cross.cmake")
|
||||||
endif(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
endif()
|
||||||
|
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
# if GTEST_DIR is not defined, we download and build it
|
# if GTEST_DIR is not defined, we download and build it
|
||||||
@ -60,7 +60,7 @@ if(NOT ${GTEST_DIR_LOCAL})
|
|||||||
PATCH_COMMAND ""
|
PATCH_COMMAND ""
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
)
|
)
|
||||||
else(CMAKE_VERSION VERSION_LESS 3.2)
|
else()
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||||
GIT_REPOSITORY https://github.com/google/googletest
|
GIT_REPOSITORY https://github.com/google/googletest
|
||||||
@ -74,7 +74,7 @@ if(NOT ${GTEST_DIR_LOCAL})
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
)
|
)
|
||||||
endif(CMAKE_VERSION VERSION_LESS 3.2)
|
endif()
|
||||||
|
|
||||||
# Set up variables
|
# Set up variables
|
||||||
# Set recently downloaded and build Googletest root folder
|
# Set recently downloaded and build Googletest root folder
|
||||||
@ -87,30 +87,31 @@ if(NOT ${GTEST_DIR_LOCAL})
|
|||||||
ExternalProject_Get_Property(gtest-${GNSSSDR_GTEST_LOCAL_VERSION} binary_dir)
|
ExternalProject_Get_Property(gtest-${GNSSSDR_GTEST_LOCAL_VERSION} binary_dir)
|
||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||||
set(binary_dir "${binary_dir}/Debug")
|
set(FINAL_D "d")
|
||||||
endif(CMAKE_GENERATOR STREQUAL Xcode)
|
set(ADD_DEBUG "Debug/")
|
||||||
endif(OS_IS_MACOSX)
|
endif()
|
||||||
set(GTEST_LIBRARY_PATH "${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX};${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
endif()
|
||||||
|
set(GTEST_LIBRARY_PATH "${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX};${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||||
set(GTEST_LIBRARY gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
set(GTEST_LIBRARY gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
set(GTEST_LIBRARIES
|
set(GTEST_LIBRARIES
|
||||||
${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
${THREAD_LIBRARIES})
|
${THREAD_LIBRARIES})
|
||||||
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest")
|
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest")
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
if(GTEST_INCLUDE_DIRS)
|
if(GTEST_INCLUDE_DIRS)
|
||||||
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS} ${LIBGTEST_DEV_DIR})
|
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS} ${LIBGTEST_DEV_DIR})
|
||||||
add_library(gtest ${LIBGTEST_DEV_DIR}/src/gtest-all.cc ${LIBGTEST_DEV_DIR}/src/gtest_main.cc)
|
add_library(gtest ${LIBGTEST_DEV_DIR}/src/gtest-all.cc ${LIBGTEST_DEV_DIR}/src/gtest_main.cc)
|
||||||
set(GTEST_LIBRARIES gtest)
|
set(GTEST_LIBRARIES gtest)
|
||||||
else(GTEST_INCLUDE_DIRS)
|
else()
|
||||||
# If the variable GTEST_DIR is defined, we use the existing Googletest
|
# If the variable GTEST_DIR is defined, we use the existing Googletest
|
||||||
set(GTEST_DIR $ENV{GTEST_DIR})
|
set(GTEST_DIR $ENV{GTEST_DIR})
|
||||||
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
|
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
|
||||||
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
|
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
|
||||||
set(GTEST_LIBRARIES gtest)
|
set(GTEST_LIBRARIES gtest)
|
||||||
endif(GTEST_INCLUDE_DIRS)
|
endif()
|
||||||
target_link_libraries(gtest ${THREAD_LIBRARIES})
|
target_link_libraries(gtest ${THREAD_LIBRARIES})
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -123,58 +124,57 @@ set(GNSS_SDR_TEST_OPTIONAL_HEADERS "")
|
|||||||
if(ENABLE_CUDA)
|
if(ENABLE_CUDA)
|
||||||
set(GNSS_SDR_TEST_OPTIONAL_HEADERS ${GNSS_SDR_TEST_OPTIONAL_HEADERS} ${CUDA_INCLUDE_DIRS})
|
set(GNSS_SDR_TEST_OPTIONAL_HEADERS ${GNSS_SDR_TEST_OPTIONAL_HEADERS} ${CUDA_INCLUDE_DIRS})
|
||||||
set(GNSS_SDR_TEST_OPTIONAL_LIBS ${GNSS_SDR_TEST_OPTIONAL_LIBS} ${CUDA_LIBRARIES})
|
set(GNSS_SDR_TEST_OPTIONAL_LIBS ${GNSS_SDR_TEST_OPTIONAL_LIBS} ${CUDA_LIBRARIES})
|
||||||
endif(ENABLE_CUDA)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_GPERFTOOLS)
|
if(ENABLE_GPERFTOOLS)
|
||||||
if(GPERFTOOLS_FOUND)
|
if(GPERFTOOLS_FOUND)
|
||||||
set(GNSS_SDR_TEST_OPTIONAL_LIBS "${GNSS_SDR_TEST_OPTIONAL_LIBS};${GPERFTOOLS_LIBRARIES}")
|
set(GNSS_SDR_TEST_OPTIONAL_LIBS "${GNSS_SDR_TEST_OPTIONAL_LIBS};${GPERFTOOLS_LIBRARIES}")
|
||||||
set(GNSS_SDR_TEST_OPTIONAL_HEADERS "${GNSS_SDR_TEST_OPTIONAL_HEADERS};${GPERFTOOLS_INCLUDE_DIR}")
|
set(GNSS_SDR_TEST_OPTIONAL_HEADERS "${GNSS_SDR_TEST_OPTIONAL_HEADERS};${GPERFTOOLS_INCLUDE_DIR}")
|
||||||
endif(GPERFTOOLS_FOUND)
|
endif()
|
||||||
endif(ENABLE_GPERFTOOLS)
|
endif()
|
||||||
|
|
||||||
if(Boost_VERSION LESS 105000)
|
if(Boost_VERSION LESS 105000)
|
||||||
add_definitions(-DOLD_BOOST=1)
|
add_definitions(-DOLD_BOOST=1)
|
||||||
endif(Boost_VERSION LESS 105000)
|
endif()
|
||||||
|
|
||||||
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
||||||
add_definitions( -DGR_GREATER_38=1)
|
add_definitions(-DGR_GREATER_38=1)
|
||||||
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
endif()
|
||||||
|
|
||||||
|
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15")
|
||||||
|
add_definitions(-DGR_GREATER_38=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
||||||
endif(OPENSSL_FOUND)
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
set(CLANG_FLAGS "-stdlib=libc++ -lc++")
|
set(CLANG_FLAGS "-stdlib=libc++ -lc++")
|
||||||
endif(OS_IS_MACOSX)
|
endif()
|
||||||
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
endif()
|
||||||
|
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
add_definitions(-DOPENCL_BLOCKS_TEST=1)
|
add_definitions(-DOPENCL_BLOCKS_TEST=1)
|
||||||
endif(OPENCL_FOUND)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUDA)
|
if(ENABLE_CUDA)
|
||||||
add_definitions(-DCUDA_BLOCKS_TEST=1)
|
add_definitions(-DCUDA_BLOCKS_TEST=1)
|
||||||
endif(ENABLE_CUDA)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FPGA)
|
if(ENABLE_FPGA)
|
||||||
add_definitions(-DFPGA_BLOCKS_TEST=1)
|
add_definitions(-DFPGA_BLOCKS_TEST=1)
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
find_package(Gnuplot)
|
find_package(Gnuplot)
|
||||||
if(GNUPLOT_FOUND)
|
if(GNUPLOT_FOUND)
|
||||||
add_definitions(-DGNUPLOT_EXECUTABLE="${GNUPLOT_EXECUTABLE}")
|
add_definitions(-DGNUPLOT_EXECUTABLE="${GNUPLOT_EXECUTABLE}")
|
||||||
endif(GNUPLOT_FOUND)
|
endif()
|
||||||
|
|
||||||
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15")
|
|
||||||
add_definitions(-DGR_GREATER_38=1)
|
|
||||||
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15")
|
|
||||||
|
|
||||||
if(ENABLE_UNIT_TESTING_MINIMAL)
|
if(ENABLE_UNIT_TESTING_MINIMAL)
|
||||||
add_definitions(-DUNIT_TESTING_MINIMAL=1)
|
add_definitions(-DUNIT_TESTING_MINIMAL=1)
|
||||||
endif(ENABLE_UNIT_TESTING_MINIMAL)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -186,42 +186,42 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
|||||||
set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
||||||
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
||||||
set(CROSS_INSTALL_DIR "${CROSS_INSTALL_DIR} -DBOOST_ROOT=$ENV{OECORE_TARGET_SYSROOT}/usr")
|
set(CROSS_INSTALL_DIR "${CROSS_INSTALL_DIR} -DBOOST_ROOT=$ENV{OECORE_TARGET_SYSROOT}/usr")
|
||||||
endif(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
endif()
|
||||||
else(ENABLE_FPGA)
|
else()
|
||||||
set(CROSS_INSTALL_DIR "")
|
set(CROSS_INSTALL_DIR "")
|
||||||
endif(ENABLE_FPGA)
|
endif()
|
||||||
find_package(GNSSSIMULATOR QUIET)
|
find_package(GNSSSIMULATOR QUIET)
|
||||||
if(GNSSSIMULATOR_FOUND OR NOT ENABLE_GNSS_SIM_INSTALL)
|
if(GNSSSIMULATOR_FOUND OR NOT ENABLE_GNSS_SIM_INSTALL)
|
||||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
||||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
||||||
else(GNSSSIMULATOR_FOUND OR NOT ENABLE_GNSS_SIM_INSTALL)
|
else()
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
gnss-sim
|
gnss-sim
|
||||||
GIT_REPOSITORY https://bitbucket.org/jarribas/gnss-simulator
|
GIT_REPOSITORY https://bitbucket.org/jarribas/gnss-simulator
|
||||||
GIT_TAG ${GNSSSDR_GNSS_SIM_LOCAL_VERSION}
|
GIT_TAG ${GNSSSDR_GNSS_SIM_LOCAL_VERSION}
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gnss-sim
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gnss-sim
|
||||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim
|
||||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} ${CROSS_INSTALL_DIR}
|
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} ${CROSS_INSTALL_DIR}
|
||||||
UPDATE_COMMAND ""
|
UPDATE_COMMAND ""
|
||||||
PATCH_COMMAND ""
|
PATCH_COMMAND ""
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
)
|
)
|
||||||
if(ENABLE_INSTALL_TESTS)
|
if(ENABLE_INSTALL_TESTS)
|
||||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim DESTINATION bin)
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim DESTINATION bin)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n DESTINATION share/gnss-sim)
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n DESTINATION share/gnss-sim)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv DESTINATION share/gnss-sim)
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv DESTINATION share/gnss-sim)
|
||||||
set(SW_GENERATOR_BIN ${CMAKE_INSTALL_PREFIX}/bin/gnss_sim)
|
set(SW_GENERATOR_BIN ${CMAKE_INSTALL_PREFIX}/bin/gnss_sim)
|
||||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
||||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
||||||
else(ENABLE_INSTALL_TESTS)
|
else()
|
||||||
set(SW_GENERATOR_BIN ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim)
|
set(SW_GENERATOR_BIN ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim)
|
||||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n")
|
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n")
|
||||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv")
|
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv")
|
||||||
endif(ENABLE_INSTALL_TESTS)
|
endif()
|
||||||
endif(GNSSSIMULATOR_FOUND OR NOT ENABLE_GNSS_SIM_INSTALL)
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Local installation of GPSTk http://www.gpstk.org/
|
# Local installation of GPSTk http://www.gpstk.org/
|
||||||
@ -229,10 +229,10 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
|||||||
find_package(GPSTK)
|
find_package(GPSTK)
|
||||||
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
||||||
message(STATUS "GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.")
|
message(STATUS "GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.")
|
||||||
if ("${TOOLCHAIN_ARG}" STREQUAL "")
|
if("${TOOLCHAIN_ARG}" STREQUAL "")
|
||||||
set(TOOLCHAIN_ARG "-DCMAKE_CXX_FLAGS=\"-Wno-deprecated\"")
|
set(TOOLCHAIN_ARG "-DCMAKE_CXX_FLAGS=\"-Wno-deprecated\"")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||||
endif("${TOOLCHAIN_ARG}" STREQUAL "")
|
endif()
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||||
@ -246,7 +246,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
|||||||
UPDATE_COMMAND ""
|
UPDATE_COMMAND ""
|
||||||
PATCH_COMMAND ""
|
PATCH_COMMAND ""
|
||||||
)
|
)
|
||||||
else(CMAKE_VERSION VERSION_LESS 3.2)
|
else()
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||||
GIT_REPOSITORY https://github.com/SGL-UT/GPSTk
|
GIT_REPOSITORY https://github.com/SGL-UT/GPSTk
|
||||||
@ -258,24 +258,24 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
|||||||
UPDATE_COMMAND ""
|
UPDATE_COMMAND ""
|
||||||
PATCH_COMMAND ""
|
PATCH_COMMAND ""
|
||||||
)
|
)
|
||||||
endif(CMAKE_VERSION VERSION_LESS 3.2)
|
endif()
|
||||||
set(GPSTK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include CACHE PATH "Local GPSTK headers")
|
set(GPSTK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include CACHE PATH "Local GPSTK headers")
|
||||||
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
|
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||||
set(GPSTK_BINDIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/bin/)
|
set(GPSTK_BINDIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/bin/)
|
||||||
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
||||||
set(OWN_GPSTK True)
|
set(OWN_GPSTK True)
|
||||||
else(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
else()
|
||||||
set(GPSTK_INCLUDE_DIRS ${GPSTK_INCLUDE_DIR})
|
set(GPSTK_INCLUDE_DIRS ${GPSTK_INCLUDE_DIR})
|
||||||
set(GPSTK_BINDIR ${GPSTK_LIBRARY}/../bin/)
|
set(GPSTK_BINDIR ${GPSTK_LIBRARY}/../bin/)
|
||||||
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
||||||
endif(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
endif()
|
||||||
endif(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (ENABLE_UNIT_TESTING_EXTRA)
|
if(ENABLE_UNIT_TESTING_EXTRA)
|
||||||
set(GNSS_SDR_TEST_OPTIONAL_LIBS ${GNSS_SDR_TEST_OPTIONAL_LIBS} ${GPSTK_LIBRARY})
|
set(GNSS_SDR_TEST_OPTIONAL_LIBS ${GNSS_SDR_TEST_OPTIONAL_LIBS} ${GPSTK_LIBRARY})
|
||||||
set(GNSS_SDR_TEST_OPTIONAL_HEADERS ${GNSS_SDR_TEST_OPTIONAL_HEADERS} ${GPSTK_INCLUDE_DIRS} ${GPSTK_INCLUDE_DIRS}/gpstk)
|
set(GNSS_SDR_TEST_OPTIONAL_HEADERS ${GNSS_SDR_TEST_OPTIONAL_HEADERS} ${GPSTK_INCLUDE_DIRS} ${GPSTK_INCLUDE_DIRS}/gpstk)
|
||||||
endif (ENABLE_UNIT_TESTING_EXTRA)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UNIT_TESTING_EXTRA)
|
if(ENABLE_UNIT_TESTING_EXTRA)
|
||||||
add_definitions(-DEXTRA_TESTS)
|
add_definitions(-DEXTRA_TESTS)
|
||||||
@ -284,18 +284,18 @@ if(ENABLE_UNIT_TESTING_EXTRA)
|
|||||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
|
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
|
||||||
SHOW_PROGRESS
|
SHOW_PROGRESS
|
||||||
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9)
|
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9)
|
||||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
|
endif()
|
||||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
|
||||||
message(STATUS "Downloading some data files for testing...")
|
message(STATUS "Downloading some data files for testing...")
|
||||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
|
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
|
||||||
SHOW_PROGRESS
|
SHOW_PROGRESS
|
||||||
EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a)
|
EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a)
|
||||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
|
endif()
|
||||||
if(ENABLE_INSTALL_TESTS)
|
if(ENABLE_INSTALL_TESTS)
|
||||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||||
endif(ENABLE_INSTALL_TESTS)
|
endif()
|
||||||
endif(ENABLE_UNIT_TESTING_EXTRA)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_INSTALL_TESTS)
|
if(ENABLE_INSTALL_TESTS)
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||||
@ -305,7 +305,7 @@ if(ENABLE_INSTALL_TESTS)
|
|||||||
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
|
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
|
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
|
||||||
add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/")
|
add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/")
|
||||||
else(ENABLE_INSTALL_TESTS)
|
else()
|
||||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||||
@ -313,7 +313,7 @@ else(ENABLE_INSTALL_TESTS)
|
|||||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/data/rtklib_test)
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/data/rtklib_test)
|
||||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/data/rtklib_test)
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/data/rtklib_test)
|
||||||
add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/thirdparty/")
|
add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/thirdparty/")
|
||||||
endif(ENABLE_INSTALL_TESTS)
|
endif()
|
||||||
|
|
||||||
set(LIST_INCLUDE_DIRS
|
set(LIST_INCLUDE_DIRS
|
||||||
${GTEST_INCLUDE_DIRECTORIES}
|
${GTEST_INCLUDE_DIRECTORIES}
|
||||||
@ -400,44 +400,46 @@ if(ENABLE_UNIT_TESTING)
|
|||||||
)
|
)
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(run_tests gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(run_tests gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
|
|
||||||
if(ENABLE_INSTALL_TESTS)
|
if(ENABLE_INSTALL_TESTS)
|
||||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/run_tests)
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/run_tests)
|
||||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/run_tests)
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/run_tests)
|
||||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/run_tests)
|
endif()
|
||||||
install(TARGETS run_tests RUNTIME DESTINATION bin COMPONENT "run_tests")
|
install(TARGETS run_tests RUNTIME DESTINATION bin COMPONENT "run_tests")
|
||||||
else(ENABLE_INSTALL_TESTS)
|
else()
|
||||||
add_custom_command(TARGET run_tests POST_BUILD
|
add_custom_command(TARGET run_tests POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:run_tests>
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:run_tests>
|
||||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:run_tests>)
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:run_tests>)
|
||||||
endif(ENABLE_INSTALL_TESTS)
|
endif()
|
||||||
endif(ENABLE_UNIT_TESTING)
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FPGA)
|
if(ENABLE_FPGA)
|
||||||
add_executable(gps_l1_ca_dll_pll_tracking_test_fpga
|
add_executable(gps_l1_ca_dll_pll_tracking_test_fpga
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc)
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc
|
||||||
|
)
|
||||||
target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga
|
target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${GFlags_LIBS}
|
${GFlags_LIBS}
|
||||||
${GLOG_LIBRARIES}
|
${GLOG_LIBRARIES}
|
||||||
${GTEST_LIBRARIES}
|
${GTEST_LIBRARIES}
|
||||||
${GNURADIO_RUNTIME_LIBRARIES}
|
${GNURADIO_RUNTIME_LIBRARIES}
|
||||||
${GNURADIO_BLOCKS_LIBRARIES}
|
${GNURADIO_BLOCKS_LIBRARIES}
|
||||||
${ARMADILLO_LIBRARIES}
|
${ARMADILLO_LIBRARIES}
|
||||||
${VOLK_LIBRARIES}
|
${VOLK_LIBRARIES}
|
||||||
${MATIO_LIBRARIES}
|
${MATIO_LIBRARIES}
|
||||||
channel_fsm
|
channel_fsm
|
||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
gnss_rx
|
gnss_rx
|
||||||
gnss_system_parameters
|
gnss_system_parameters
|
||||||
signal_processing_testing_lib
|
signal_processing_testing_lib
|
||||||
)
|
)
|
||||||
install(TARGETS gps_l1_ca_dll_pll_tracking_test_fpga
|
install(TARGETS gps_l1_ca_dll_pll_tracking_test_fpga
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
COMPONENT "fpga-test")
|
COMPONENT "fpga-test"
|
||||||
endif(ENABLE_FPGA)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -451,14 +453,14 @@ function(add_system_test executable)
|
|||||||
# Ensure that executable is rebuilt if it was previously built and then removed
|
# Ensure that executable is rebuilt if it was previously built and then removed
|
||||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${SYSTEM_TEST_SOURCES})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${SYSTEM_TEST_SOURCES})
|
||||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
endif()
|
||||||
add_executable(${executable} ${SYSTEM_TEST_SOURCES})
|
add_executable(${executable} ${SYSTEM_TEST_SOURCES})
|
||||||
|
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(${executable} gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(${executable} gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
add_dependencies(${executable} gtest)
|
add_dependencies(${executable} gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
|
|
||||||
include_directories(${OPT_INCLUDES_})
|
include_directories(${OPT_INCLUDES_})
|
||||||
target_link_libraries(${executable} ${OPT_LIBS_})
|
target_link_libraries(${executable} ${OPT_LIBS_})
|
||||||
@ -466,14 +468,14 @@ function(add_system_test executable)
|
|||||||
if(ENABLE_INSTALL_TESTS)
|
if(ENABLE_INSTALL_TESTS)
|
||||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/${executable})
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
endif()
|
||||||
install(TARGETS ${executable} RUNTIME DESTINATION bin COMPONENT "${executable}_test")
|
install(TARGETS ${executable} RUNTIME DESTINATION bin COMPONENT "${executable}_test")
|
||||||
else(ENABLE_INSTALL_TESTS)
|
else()
|
||||||
add_custom_command(TARGET ${executable} POST_BUILD
|
add_custom_command(TARGET ${executable} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${executable}>
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${executable}>
|
||||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:${executable}>)
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:${executable}>)
|
||||||
endif(ENABLE_INSTALL_TESTS)
|
endif()
|
||||||
endfunction(add_system_test)
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_SYSTEM_TESTING)
|
if(ENABLE_SYSTEM_TESTING)
|
||||||
@ -482,10 +484,10 @@ if(ENABLE_SYSTEM_TESTING)
|
|||||||
set(HOST_SYSTEM "GNU/Linux ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCH_}")
|
set(HOST_SYSTEM "GNU/Linux ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCH_}")
|
||||||
string(REPLACE "\n" "" HOST_SYSTEM "${HOST_SYSTEM}")
|
string(REPLACE "\n" "" HOST_SYSTEM "${HOST_SYSTEM}")
|
||||||
string(REPLACE "\"" "" HOST_SYSTEM "${HOST_SYSTEM}")
|
string(REPLACE "\"" "" HOST_SYSTEM "${HOST_SYSTEM}")
|
||||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
endif()
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
set(HOST_SYSTEM "MacOS")
|
set(HOST_SYSTEM "MacOS")
|
||||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
endif()
|
||||||
add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
|
add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
|
||||||
|
|
||||||
#### TTFF
|
#### TTFF
|
||||||
@ -505,32 +507,22 @@ if(ENABLE_SYSTEM_TESTING)
|
|||||||
${GNURADIO_ANALOG_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES}
|
${GNURADIO_ANALOG_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES}
|
||||||
gnss_sp_libs gnss_rx gnss_system_parameters
|
gnss_sp_libs gnss_rx gnss_system_parameters
|
||||||
system_testing_lib)
|
system_testing_lib)
|
||||||
|
|
||||||
add_system_test(position_test)
|
add_system_test(position_test)
|
||||||
|
else()
|
||||||
#if(GPSTK_FOUND OR OWN_GPSTK)
|
|
||||||
## OBS_SYSTEM_TEST and OBS_GPS_L1_SYSTEM_TEST
|
|
||||||
# set(OPT_LIBS_ ${GFlags_LIBS} ${GLOG_LIBRARIES} ${GTEST_LIBRARIES}
|
|
||||||
# gnss_sp_libs gnss_rx ${GPSTK_LIBRARY})
|
|
||||||
# set(OPT_INCLUDES_ ${GPSTK_INCLUDE_DIRS} ${GPSTK_INCLUDE_DIRS}/gpstk)
|
|
||||||
# add_system_test(obs_gps_l1_system_test)
|
|
||||||
# add_system_test(obs_system_test)
|
|
||||||
#endif(GPSTK_FOUND OR OWN_GPSTK)
|
|
||||||
else(ENABLE_SYSTEM_TESTING_EXTRA)
|
|
||||||
# Avoid working with old executables if they were switched ON and then OFF
|
# Avoid working with old executables if they were switched ON and then OFF
|
||||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/position_test)
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
endif()
|
||||||
endif(ENABLE_SYSTEM_TESTING_EXTRA)
|
endif()
|
||||||
else(ENABLE_SYSTEM_TESTING)
|
else()
|
||||||
# Avoid working with old executables if they were switched ON and then OFF
|
# Avoid working with old executables if they were switched ON and then OFF
|
||||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
||||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/ttff)
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/ttff)
|
||||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
endif()
|
||||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/position_test)
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
endif()
|
||||||
endif(ENABLE_SYSTEM_TESTING)
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
@ -550,13 +542,15 @@ target_link_libraries(flowgraph_test ${Boost_LIBRARIES}
|
|||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
gnss_rx
|
gnss_rx
|
||||||
gnss_system_parameters
|
gnss_system_parameters
|
||||||
${VOLK_GNSSSDR_LIBRARIES})
|
${VOLK_GNSSSDR_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
add_test(flowgraph_test flowgraph_test)
|
add_test(flowgraph_test flowgraph_test)
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(flowgraph_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(flowgraph_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
add_dependencies(flowgraph_test gtest)
|
add_dependencies(flowgraph_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
set_property(TEST flowgraph_test PROPERTY TIMEOUT 30)
|
set_property(TEST flowgraph_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
@ -569,7 +563,8 @@ add_executable(gnss_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/pass_through_test.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/pass_through_test.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/adapter_test.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/adapter_test.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_block_factory_test.cc)
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_block_factory_test.cc
|
||||||
|
)
|
||||||
target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
|
target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
|
||||||
${GFlags_LIBS}
|
${GFlags_LIBS}
|
||||||
${GLOG_LIBRARIES}
|
${GLOG_LIBRARIES}
|
||||||
@ -581,19 +576,21 @@ target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
|
|||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
gnss_rx
|
gnss_rx
|
||||||
gnss_system_parameters
|
gnss_system_parameters
|
||||||
${VOLK_GNSSSDR_LIBRARIES})
|
${VOLK_GNSSSDR_LIBRARIES}
|
||||||
|
)
|
||||||
add_test(gnss_block_test gnss_block_test)
|
add_test(gnss_block_test gnss_block_test)
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(gnss_block_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(gnss_block_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
add_dependencies(gnss_block_test gtest)
|
add_dependencies(gnss_block_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
set_property(TEST gnss_block_test PROPERTY TIMEOUT 60)
|
set_property(TEST gnss_block_test PROPERTY TIMEOUT 60)
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|
||||||
add_executable(gnuradio_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
add_executable(gnuradio_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc)
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc
|
||||||
|
)
|
||||||
target_link_libraries(gnuradio_block_test ${Boost_LIBRARIES}
|
target_link_libraries(gnuradio_block_test ${Boost_LIBRARIES}
|
||||||
${GFlags_LIBS}
|
${GFlags_LIBS}
|
||||||
${GLOG_LIBRARIES}
|
${GLOG_LIBRARIES}
|
||||||
@ -605,40 +602,42 @@ target_link_libraries(gnuradio_block_test ${Boost_LIBRARIES}
|
|||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
gnss_rx
|
gnss_rx
|
||||||
gnss_system_parameters
|
gnss_system_parameters
|
||||||
${VOLK_GNSSSDR_LIBRARIES})
|
${VOLK_GNSSSDR_LIBRARIES}
|
||||||
|
)
|
||||||
add_test(gnuradio_block_test gnuradio_block_test)
|
add_test(gnuradio_block_test gnuradio_block_test)
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(gnuradio_block_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(gnuradio_block_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
add_dependencies(gnuradio_block_test gtest)
|
add_dependencies(gnuradio_block_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
set_property(TEST gnuradio_block_test PROPERTY TIMEOUT 30)
|
set_property(TEST gnuradio_block_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|
||||||
add_executable(matio_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
add_executable(matio_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/arithmetic/matio_test.cc)
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/arithmetic/matio_test.cc
|
||||||
|
)
|
||||||
target_link_libraries(matio_test ${Boost_LIBRARIES}
|
target_link_libraries(matio_test ${Boost_LIBRARIES}
|
||||||
${GFlags_LIBS}
|
${GFlags_LIBS}
|
||||||
${GLOG_LIBRARIES}
|
${GLOG_LIBRARIES}
|
||||||
${GTEST_LIBRARIES}
|
${GTEST_LIBRARIES}
|
||||||
${MATIO_LIBRARIES}
|
${MATIO_LIBRARIES}
|
||||||
gnss_system_parameters)
|
gnss_system_parameters
|
||||||
|
)
|
||||||
add_test(matio_test matio_test)
|
add_test(matio_test matio_test)
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
if(MATIO_FOUND)
|
if(MATIO_FOUND)
|
||||||
add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
else(MATIO_FOUND)
|
else()
|
||||||
add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION} matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION} matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
||||||
endif(MATIO_FOUND)
|
endif()
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
if(MATIO_FOUND)
|
if(MATIO_FOUND)
|
||||||
add_dependencies(matio_test gtest)
|
add_dependencies(matio_test gtest)
|
||||||
else(MATIO_FOUND)
|
else()
|
||||||
add_dependencies(matio_test gtest matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
add_dependencies(matio_test gtest matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
||||||
endif(MATIO_FOUND)
|
endif()
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
set_property(TEST matio_test PROPERTY TIMEOUT 30)
|
set_property(TEST matio_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
@ -663,9 +662,9 @@ target_link_libraries(acq_test ${Boost_LIBRARIES}
|
|||||||
add_test(acq_test acq_test)
|
add_test(acq_test acq_test)
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(acq_test acq_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(acq_test acq_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
add_dependencies(acq_test acq_test gtest)
|
add_dependencies(acq_test acq_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
set_property(TEST acq_test PROPERTY TIMEOUT 30)
|
set_property(TEST acq_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
@ -674,7 +673,8 @@ add_executable(trk_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc)
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(trk_test ${Boost_LIBRARIES}
|
target_link_libraries(trk_test ${Boost_LIBRARIES}
|
||||||
${GFlags_LIBS}
|
${GFlags_LIBS}
|
||||||
@ -688,13 +688,14 @@ target_link_libraries(trk_test ${Boost_LIBRARIES}
|
|||||||
gnss_rx
|
gnss_rx
|
||||||
gnss_system_parameters
|
gnss_system_parameters
|
||||||
signal_generator_blocks
|
signal_generator_blocks
|
||||||
${VOLK_GNSSSDR_LIBRARIES})
|
${VOLK_GNSSSDR_LIBRARIES}
|
||||||
|
)
|
||||||
add_test(trk_test trk_test)
|
add_test(trk_test trk_test)
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(trk_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(trk_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
add_dependencies(trk_test gtest)
|
add_dependencies(trk_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
set_property(TEST trk_test PROPERTY TIMEOUT 30)
|
set_property(TEST trk_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
|
|
||||||
@ -703,29 +704,31 @@ set_property(TEST trk_test PROPERTY TIMEOUT 30)
|
|||||||
if(NOT ENABLE_PACKAGING)
|
if(NOT ENABLE_PACKAGING)
|
||||||
add_executable(control_thread_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
add_executable(control_thread_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_message_factory_test.cc
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_message_factory_test.cc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_thread_test.cc)
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_thread_test.cc
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(control_thread_test ${Boost_LIBRARIES}
|
target_link_libraries(control_thread_test ${Boost_LIBRARIES}
|
||||||
${GFlags_LIBS}
|
${GFlags_LIBS}
|
||||||
${GLOG_LIBRARIES}
|
${GLOG_LIBRARIES}
|
||||||
${GTEST_LIBRARIES}
|
${GTEST_LIBRARIES}
|
||||||
gnss_rx)
|
gnss_rx
|
||||||
|
)
|
||||||
|
|
||||||
add_test(control_thread_test control_thread_test)
|
add_test(control_thread_test control_thread_test)
|
||||||
if(NOT ${GTEST_DIR_LOCAL})
|
if(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(control_thread_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
add_dependencies(control_thread_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else()
|
||||||
add_dependencies(control_thread_test gtest)
|
add_dependencies(control_thread_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif()
|
||||||
set_property(TEST control_thread_test PROPERTY TIMEOUT 30)
|
set_property(TEST control_thread_test PROPERTY TIMEOUT 30)
|
||||||
endif(NOT ENABLE_PACKAGING)
|
endif()
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|
||||||
if(ENABLE_PACKAGING)
|
if(ENABLE_PACKAGING)
|
||||||
add_dependencies(check flowgraph_test gnss_block_test
|
add_dependencies(check flowgraph_test gnss_block_test
|
||||||
gnuradio_block_test acq_test trk_test matio_test)
|
gnuradio_block_test acq_test trk_test matio_test)
|
||||||
else(ENABLE_PACKAGING)
|
else()
|
||||||
add_dependencies(check control_thread_test flowgraph_test gnss_block_test
|
add_dependencies(check control_thread_test flowgraph_test gnss_block_test
|
||||||
gnuradio_block_test acq_test trk_test matio_test)
|
gnuradio_block_test acq_test trk_test matio_test)
|
||||||
endif(ENABLE_PACKAGING)
|
endif()
|
||||||
|
@ -23,22 +23,29 @@ set(SYSTEM_TESTING_LIB_SOURCES
|
|||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIRS}
|
||||||
${GLOG_INCLUDE_DIRS}
|
${GLOG_INCLUDE_DIRS}
|
||||||
${GFlags_INCLUDE_DIRS}
|
${GFlags_INCLUDE_DIRS}
|
||||||
${MATIO_INCLUDE_DIRS}
|
${MATIO_INCLUDE_DIRS}
|
||||||
${ARMADILLO_INCLUDE_DIRS}
|
${ARMADILLO_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
file(GLOB SYSTEM_TESTING_LIB_HEADERS "*.h")
|
file(GLOB SYSTEM_TESTING_LIB_HEADERS "*.h")
|
||||||
list(SORT SYSTEM_TESTING_LIB_HEADERS)
|
list(SORT SYSTEM_TESTING_LIB_HEADERS)
|
||||||
add_library(system_testing_lib ${SYSTEM_TESTING_LIB_SOURCES} ${SYSTEM_TESTING_LIB_HEADERS})
|
|
||||||
|
add_library(system_testing_lib
|
||||||
|
${SYSTEM_TESTING_LIB_SOURCES}
|
||||||
|
${SYSTEM_TESTING_LIB_HEADERS}
|
||||||
|
)
|
||||||
|
|
||||||
source_group(Headers FILES ${SYSTEM_TESTING_LIB_HEADERS})
|
source_group(Headers FILES ${SYSTEM_TESTING_LIB_HEADERS})
|
||||||
|
|
||||||
if(NOT MATIO_FOUND)
|
if(NOT MATIO_FOUND)
|
||||||
add_dependencies(system_testing_lib armadillo-${armadillo_RELEASE} matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
add_dependencies(system_testing_lib
|
||||||
else(NOT MATIO_FOUND)
|
armadillo-${armadillo_RELEASE}
|
||||||
add_dependencies(system_testing_lib armadillo-${armadillo_RELEASE})
|
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
||||||
endif(NOT MATIO_FOUND)
|
)
|
||||||
|
else()
|
||||||
|
add_dependencies(system_testing_lib armadillo-${armadillo_RELEASE})
|
||||||
|
endif()
|
||||||
|
@ -28,22 +28,29 @@ set(SIGNAL_PROCESSING_TESTING_LIB_SOURCES
|
|||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIRS}
|
||||||
${GLOG_INCLUDE_DIRS}
|
${GLOG_INCLUDE_DIRS}
|
||||||
${GFlags_INCLUDE_DIRS}
|
${GFlags_INCLUDE_DIRS}
|
||||||
${MATIO_INCLUDE_DIRS}
|
${MATIO_INCLUDE_DIRS}
|
||||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
file(GLOB SIGNAL_PROCESSING_TESTING_LIB_HEADERS "*.h")
|
file(GLOB SIGNAL_PROCESSING_TESTING_LIB_HEADERS "*.h")
|
||||||
list(SORT SIGNAL_PROCESSING_TESTING_LIB_HEADERS)
|
list(SORT SIGNAL_PROCESSING_TESTING_LIB_HEADERS)
|
||||||
add_library(signal_processing_testing_lib ${SIGNAL_PROCESSING_TESTING_LIB_SOURCES} ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
|
|
||||||
|
add_library(signal_processing_testing_lib
|
||||||
|
${SIGNAL_PROCESSING_TESTING_LIB_SOURCES}
|
||||||
|
${SIGNAL_PROCESSING_TESTING_LIB_HEADERS}
|
||||||
|
)
|
||||||
|
|
||||||
source_group(Headers FILES ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
|
source_group(Headers FILES ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
|
||||||
|
|
||||||
if(NOT MATIO_FOUND)
|
if(NOT MATIO_FOUND)
|
||||||
add_dependencies(signal_processing_testing_lib matio-${GNSSSDR_MATIO_LOCAL_VERSION} glog-${glog_RELEASE})
|
add_dependencies(signal_processing_testing_lib
|
||||||
else(NOT MATIO_FOUND)
|
matio-${GNSSSDR_MATIO_LOCAL_VERSION} glog-${glog_RELEASE}
|
||||||
add_dependencies(signal_processing_testing_lib glog-${glog_RELEASE})
|
)
|
||||||
endif(NOT MATIO_FOUND)
|
else()
|
||||||
|
add_dependencies(signal_processing_testing_lib glog-${glog_RELEASE})
|
||||||
|
endif()
|
||||||
|
@ -215,7 +215,7 @@ TEST_F(Galileo_FNAV_INAV_test, ValidationOfResults)
|
|||||||
{
|
{
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0);
|
||||||
|
start = std::chrono::system_clock::now();
|
||||||
int repetitions = 10;
|
int repetitions = 10;
|
||||||
// FNAV FULLY ENCODED FRAME
|
// FNAV FULLY ENCODED FRAME
|
||||||
double FNAV_frame[488] = {-1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
double FNAV_frame[488] = {-1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
@ -282,7 +282,7 @@ TEST_F(Galileo_FNAV_INAV_test, ValidationOfResults)
|
|||||||
EXPECT_EQ(decode_INAV_word(&INAV_frame_odd[0], 240), true);
|
EXPECT_EQ(decode_INAV_word(&INAV_frame_odd[0], 240), true);
|
||||||
}
|
}
|
||||||
}) << "Exception during INAV frame decoding";
|
}) << "Exception during INAV frame decoding";
|
||||||
|
end = std::chrono::system_clock::now();
|
||||||
|
elapsed_seconds = end - start;
|
||||||
std::cout << "Galileo FNAV/INAV Test completed in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Galileo FNAV/INAV Test completed in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -20,4 +20,4 @@ add_subdirectory(front-end-cal)
|
|||||||
|
|
||||||
if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||||
add_subdirectory(rinex2assist)
|
add_subdirectory(rinex2assist)
|
||||||
endif(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
endif()
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
||||||
endif(OPENSSL_FOUND)
|
endif()
|
||||||
|
|
||||||
set(FRONT_END_CAL_SOURCES front_end_cal.cc)
|
set(FRONT_END_CAL_SOURCES front_end_cal.cc)
|
||||||
set(FRONT_END_CAL_HEADERS front_end_cal.h)
|
set(FRONT_END_CAL_HEADERS front_end_cal.h)
|
||||||
@ -112,6 +112,5 @@ find_program(GZIP gzip
|
|||||||
if(NOT GZIP_NOTFOUND)
|
if(NOT GZIP_NOTFOUND)
|
||||||
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/docs/manpage/front-end-cal-manpage
|
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/docs/manpage/front-end-cal-manpage
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/front-end-cal.1.gz")
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/front-end-cal.1.gz")
|
||||||
|
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/front-end-cal.1.gz DESTINATION share/man/man1)
|
install(FILES ${CMAKE_BINARY_DIR}/front-end-cal.1.gz DESTINATION share/man/man1)
|
||||||
endif(NOT GZIP_NOTFOUND)
|
endif()
|
||||||
|
@ -22,10 +22,12 @@ if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
|||||||
string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||||
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
|
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||||
set(GPSTK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include)
|
set(GPSTK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include)
|
||||||
endif(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
endif()
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GPSTK_INCLUDE_DIR}/gpstk)
|
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GPSTK_INCLUDE_DIR}/gpstk)
|
||||||
|
|
||||||
|
find_package(Boost COMPONENTS iostreams serialization REQUIRED)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||||
${GFlags_INCLUDE_DIRS}
|
${GFlags_INCLUDE_DIRS}
|
||||||
@ -48,11 +50,11 @@ target_link_libraries(rinex2assist
|
|||||||
|
|
||||||
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
||||||
add_dependencies(rinex2assist gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
|
add_dependencies(rinex2assist gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
|
||||||
endif(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
endif()
|
||||||
|
|
||||||
add_custom_command(TARGET rinex2assist POST_BUILD
|
add_custom_command(TARGET rinex2assist POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:rinex2assist>
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:rinex2assist>
|
||||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:rinex2assist>
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:rinex2assist>
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS rinex2assist
|
install(TARGETS rinex2assist
|
||||||
|
52
src/utils/rinex2assist/README.md
Normal file
52
src/utils/rinex2assist/README.md
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
Rinex2assist
|
||||||
|
------------
|
||||||
|
|
||||||
|
This program reads data from RINEX navigation files and generates XML files that can be read by GNSS-SDR as Assisted GNSS data. The usage is as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rinex2assist /path/to/RINEX_nav_file
|
||||||
|
```
|
||||||
|
|
||||||
|
The argument is mandatory (the name of the RINEX navigation file). The name `gps_ephemeris.xml` is given to the output if GPS NAV data is fould. If the RINEX file contains Galileo data, the corresponding `gal_ephemeris.xml` file will be generated. The program is also able to extract parameters of the UTC and the Ionospheric models from the RINEX header, if available. They will be called `gps_utc_model.xml`, `gps_iono.xml`, `gal_utc_model.xml` and `gal_iono.xml`.
|
||||||
|
|
||||||
|
There are some servers available for downloading RINEX navigation files. For instance:
|
||||||
|
* NASA: [ftp://cddis.gsfc.nasa.gov/pub/gnss/data/hourly/](ftp://gssc.esa.int/gnss/data/hourly/)
|
||||||
|
* ESA: [ftp://gssc.esa.int/gnss/data/hourly/](ftp://gssc.esa.int/gnss/data/hourly/)
|
||||||
|
|
||||||
|
Just make sure to pick up a [station near you](http://gpspp.sakura.ne.jp/gmap/igsnet.htm).
|
||||||
|
|
||||||
|
The program accepts either versions 2.xx or 3.xx for the RINEX navigation data file, as well as compressed files (ending in `.gz`).
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rinex2assist EBRE00ESP_R_20183290400_01H_GN.rnx.gz
|
||||||
|
Generated file: gps_ephemeris.xml
|
||||||
|
Generated file: gps_utc_model.xml
|
||||||
|
Generated file: gps_iono.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
and
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rinex2assist EBRE00ESP_R_20183290000_01H_EN.rnx.gz
|
||||||
|
Generated file: gal_ephemeris.xml
|
||||||
|
Generated file: gal_utc_model.xml
|
||||||
|
Generated file: gal_iono.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
An example of GNSS-SDR configuration using ephemeris, UTC and ionospheric model parameters for GPS L1 and Galileo signals is shown below:
|
||||||
|
|
||||||
|
```
|
||||||
|
GNSS-SDR.AGNSS_XML_enabled=true
|
||||||
|
GNSS-SDR.AGNSS_ref_location=41.39,2.31
|
||||||
|
GNSS-SDR.AGNSS_gps_ephemeris_xml=gps_ephemeris.xml
|
||||||
|
GNSS-SDR.AGNSS_gps_iono_xml=gps_iono.xml
|
||||||
|
GNSS-SDR.AGNSS_gps_utc_model_xml=gps_utc_model.xml
|
||||||
|
GNSS-SDR.AGNSS_gal_ephemeris_xml=gal_ephemeris.xml
|
||||||
|
GNSS-SDR.AGNSS_gal_iono_xml=gal_iono.xml
|
||||||
|
GNSS-SDR.AGNSS_gal_utc_model_xml=gal_utc_model.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
More info about the usage of AGNSS data [here](https://gnss-sdr.org/docs/sp-blocks/global-parameters/#assisted-gnss-with-xml-files).
|
@ -42,6 +42,9 @@
|
|||||||
#include <gpstk/Rinex3NavStream.hpp>
|
#include <gpstk/Rinex3NavStream.hpp>
|
||||||
#include <boost/archive/xml_oarchive.hpp>
|
#include <boost/archive/xml_oarchive.hpp>
|
||||||
#include <boost/serialization/map.hpp>
|
#include <boost/serialization/map.hpp>
|
||||||
|
#include <boost/iostreams/filtering_streambuf.hpp>
|
||||||
|
#include <boost/iostreams/copy.hpp>
|
||||||
|
#include <boost/iostreams/filter/gzip.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
@ -70,6 +73,33 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
std::string xml_filename;
|
std::string xml_filename;
|
||||||
|
|
||||||
|
// Uncompress if RINEX file is gzipped
|
||||||
|
std::string rinex_filename(argv[1]);
|
||||||
|
std::size_t found = rinex_filename.find_last_of(".");
|
||||||
|
if (found != std::string::npos)
|
||||||
|
{
|
||||||
|
if ((rinex_filename.substr(found + 1, found + 3).compare("gz") == 0))
|
||||||
|
{
|
||||||
|
std::cerr << "Hello" << std::endl;
|
||||||
|
std::ifstream file(rinex_filename, std::ios_base::in | std::ios_base::binary);
|
||||||
|
boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
in.push(boost::iostreams::gzip_decompressor());
|
||||||
|
}
|
||||||
|
catch (const boost::exception& e)
|
||||||
|
{
|
||||||
|
std::cerr << "Could not decompress file " << rinex_filename << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
in.push(file);
|
||||||
|
std::string rinex_filename_unzipped = rinex_filename.substr(0, found);
|
||||||
|
std::ofstream output_file(rinex_filename_unzipped.c_str(), std::ios_base::out | std::ios_base::binary);
|
||||||
|
boost::iostreams::copy(in, output_file);
|
||||||
|
rinex_filename = rinex_filename_unzipped;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::map<int, Gps_Ephemeris> eph_map;
|
std::map<int, Gps_Ephemeris> eph_map;
|
||||||
std::map<int, Galileo_Ephemeris> eph_gal_map;
|
std::map<int, Galileo_Ephemeris> eph_gal_map;
|
||||||
|
|
||||||
@ -83,7 +113,7 @@ int main(int argc, char** argv)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Read nav file
|
// Read nav file
|
||||||
gpstk::Rinex3NavStream rnffs(argv[1]); // Open navigation data file
|
gpstk::Rinex3NavStream rnffs(rinex_filename.c_str()); // Open navigation data file
|
||||||
gpstk::Rinex3NavData rne;
|
gpstk::Rinex3NavData rne;
|
||||||
gpstk::Rinex3NavHeader hdr;
|
gpstk::Rinex3NavHeader hdr;
|
||||||
|
|
||||||
@ -205,6 +235,7 @@ int main(int argc, char** argv)
|
|||||||
eph.i_0_2 = rne.i0;
|
eph.i_0_2 = rne.i0;
|
||||||
eph.omega_2 = rne.w;
|
eph.omega_2 = rne.w;
|
||||||
eph.OMEGA_dot_3 = rne.OMEGAdot;
|
eph.OMEGA_dot_3 = rne.OMEGAdot;
|
||||||
|
eph.delta_n_3 = rne.dn;
|
||||||
eph.iDot_2 = rne.idot;
|
eph.iDot_2 = rne.idot;
|
||||||
eph.C_uc_3 = rne.Cuc;
|
eph.C_uc_3 = rne.Cuc;
|
||||||
eph.C_us_3 = rne.Cus;
|
eph.C_us_3 = rne.Cus;
|
||||||
|
Loading…
Reference in New Issue
Block a user