1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-06-26 23:22:53 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into dmiralles2009-glonass_dec

This commit is contained in:
Carles Fernandez 2017-11-03 16:30:24 +01:00
commit 4f9d6afd7d
12 changed files with 146 additions and 117 deletions

View File

@ -49,7 +49,7 @@ option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Tele
option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF)
option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF)
option(ENABLE_PLUTOSDR "Enable the use of ADALM-PLUTO Evaluation Boards (Analog Devices Inc.), requires gr-iio" OFF) option(ENABLE_PLUTOSDR "Enable the use of ADALM-PLUTO Evaluation Boards (Analog Devices Inc.), requires gr-iio" OFF)
option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware" OFF) option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF)
# Performance analysis tools # Performance analysis tools
option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF) option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF)

View File

@ -373,51 +373,38 @@ $ sudo make install
Install the [libiio](https://github.com/analogdevicesinc/libiio.git) (>=v0.11), [libad9361](https://github.com/analogdevicesinc/libad9361-iio.git) (>=v0.1-1) libraries and [gr-iio](https://github.com/analogdevicesinc/gr-iio.git) (>=v0.2) gnuradio block. For example in Ubuntu 16.04 follow these instructions (based on https://github.com/blurbdust/blurbdust.github.io): Install the [libiio](https://github.com/analogdevicesinc/libiio.git) (>=v0.11), [libad9361](https://github.com/analogdevicesinc/libad9361-iio.git) (>=v0.1-1) libraries and [gr-iio](https://github.com/analogdevicesinc/gr-iio.git) (>=v0.2) gnuradio block. For example in Ubuntu 16.04 follow these instructions (based on https://github.com/blurbdust/blurbdust.github.io):
~~~~~~ ~~~~~~
$ sudo apt-get install libxml2-dev bison flex
$ git clone https://github.com/analogdevicesinc/libiio.git $ git clone https://github.com/analogdevicesinc/libiio.git
$ cd libiio $ cd libiio
$ mkdir build $ mkdir build
$ cd build $ cd build
$ cmake .. $ cmake ..
$ make $ make && sudo make install && sudo ldconfig
$ sudo make install $ cd ../..
$ sudo ldconfig
$ git clone https://github.com/analogdevicesinc/libad9361-iio.git $ git clone https://github.com/analogdevicesinc/libad9361-iio.git
$ cd libad9361-iio $ cd libad9361-iio
$ mkdir build $ mkdir build
$ cd build $ cd build
$ cmake .. $ cmake ..
$ make $ make && sudo make install && sudo ldconfig
$ sudo make install $ cd ../..
$ sudo ldconfig
$ git clone https://github.com/analogdevicesinc/gr-iio.git $ git clone https://github.com/analogdevicesinc/gr-iio.git
$ cd gr-iio $ cd gr-iio
$ mv include/gnuradio/iio include/iio
$ rm -r include/gnuradio
$ sed -i 's/gnuradio\/iio/iio/g' CMakeLists.txt
$ sed -i 's/gnuradio\/iio/iio/g' swig/*
$ sed -i 's/gnuradio\/iio/iio/g' include/iio/*
$ sed -i 's/gnuradio\/iio/iio/g' lib/*
$ sed -i 's/gnuradio\/iio/iio/g' python/iio/*
$ sed -i 's/from\ gnuradio\ import\ iio/import\ iio/g' grc/iio_pluto_sink.xml
$ sed -i 's/from\ gnuradio\ import\ iio/import\ iio/g' grc/iio_pluto_source.xml
$ sed -i 's/from\ gnuradio\ import\ iio/import\ iio/g' grc/iio_fmcomms2_sink.xml
$ sed -i 's/from\ gnuradio\ import\ iio/import\ iio/g' grc/iio_fmcomms2_source.xml
$ mkdir build $ mkdir build
$ cd build $ cd build
$ cmake .. $ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make $ make && sudo make install && sudo ldconfig
$ sudo make install $ cd ../..
$ sudo ldconfig
~~~~~~ ~~~~~~
Then configure the gnss-sdr to build the `Fmcomms2_Signal_Source` and `Plutosdr_Signal_Source`: Then configure the gnss-sdr to build the `Fmcomms2_Signal_Source` implementation:
~~~~~~ ~~~~~~
$ cmake -DENABLE_FMCOMMS2=ON ../ $ cmake -DENABLE_FMCOMMS2=ON ../
$ make $ make
$ sudo make install $ sudo make install
~~~~~~ ~~~~~~
or configure only `Plutosdr_Signal_Source`: or configure it to build `Plutosdr_Signal_Source`:
~~~~~~ ~~~~~~
$ cmake -DENABLE_PLUTOSDR=ON ../ $ cmake -DENABLE_PLUTOSDR=ON ../
$ make $ make

View File

@ -0,0 +1,29 @@
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_IIO gnuradio-iio)
FIND_PATH(
IIO_INCLUDE_DIRS
NAMES gnuradio/iio/api.h
HINTS $ENV{IIO_DIR}/include
${PC_IIO_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/local/include
/usr/include
)
FIND_LIBRARY(
IIO_LIBRARIES
NAMES gnuradio-iio
HINTS $ENV{IIO_DIR}/lib
${PC_IIO_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IIO DEFAULT_MSG IIO_LIBRARIES IIO_INCLUDE_DIRS)
MARK_AS_ADVANCED(IIO_LIBRARIES IIO_INCLUDE_DIRS)

View File

@ -182,11 +182,18 @@ Rinex_Printer::Rinex_Printer(int conf_version)
} }
if(conf_version != 0) if(conf_version != 0)
{ {
if(conf_version == 2) if(conf_version == 2)
version = 2; {
stringVersion = "2.11"; version = 2;
} stringVersion = "2.11";
}
if(conf_version == 3)
{
version = 3;
stringVersion = "3.02";
}
}
numberTypesObservations = 4; // Number of available types of observable in the system numberTypesObservations = 4; // Number of available types of observable in the system
fake_cnav_iode = 1; fake_cnav_iode = 1;

View File

@ -371,7 +371,7 @@ void decodefile(rtksvr_t *svr, int index)
nav_t nav = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, nav_t nav = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
{0, 0, (erpd_t *){0}}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0, 0, (erpd_t *){0}}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0},
{0.0}, {0.0}, {0.0}, {0.0}, 0, {{0.0},{0.0}}, {{0.0},{0.0}}, {{0.0},{0.0},{0.0}}, {0.0}, {0.0}, {0.0}, {0.0}, 0, {{0.0},{0.0}}, {{0.0},{0.0}}, {{0.0}, {0.0}, {0.0}},
{0.0}, {0.0}, {*glo_fcn}, {*pcvt0}, sbssat0, {*sbsion0}, {*dgps0}, {*ssr0}, {*lexeph0}, {0.0}, {0.0}, {*glo_fcn}, {*pcvt0}, sbssat0, {*sbsion0}, {*dgps0}, {*ssr0}, {*lexeph0},
{{0,0.0}, 0.0, {0.0}, {{0.0},{0.0}} }, pppcorr0} ; {{0,0.0}, 0.0, {0.0}, {{0.0},{0.0}} }, pppcorr0} ;

View File

@ -179,12 +179,11 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused
{ {
channel_history_ok = false; channel_history_ok = false;
} }
} }
if (channel_history_ok == true) if (channel_history_ok == true)
{ {
std::map<int,Gnss_Synchro>::iterator gnss_synchro_map_iter; std::map<int,Gnss_Synchro>::const_iterator gnss_synchro_map_iter;
std::deque<Gnss_Synchro>::iterator gnss_synchro_deque_iter; std::deque<Gnss_Synchro>::const_iterator gnss_synchro_deque_iter;
// 1. If the RX time is not set, set the Rx time // 1. If the RX time is not set, set the Rx time
if (T_rx_s == 0) if (T_rx_s == 0)
@ -196,8 +195,8 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused
gnss_synchro_map.insert(std::pair<int, Gnss_Synchro>(d_gnss_synchro_history_queue[i].front().Channel_ID, gnss_synchro_map.insert(std::pair<int, Gnss_Synchro>(d_gnss_synchro_history_queue[i].front().Channel_ID,
d_gnss_synchro_history_queue[i].front())); d_gnss_synchro_history_queue[i].front()));
} }
gnss_synchro_map_iter = min_element(gnss_synchro_map.begin(), gnss_synchro_map_iter = min_element(gnss_synchro_map.cbegin(),
gnss_synchro_map.end(), gnss_synchro_map.cend(),
Hybrid_pairCompare_gnss_synchro_sample_counter); Hybrid_pairCompare_gnss_synchro_sample_counter);
T_rx_s = static_cast<double>(gnss_synchro_map_iter->second.Tracking_sample_counter) / static_cast<double>(gnss_synchro_map_iter->second.fs); T_rx_s = static_cast<double>(gnss_synchro_map_iter->second.Tracking_sample_counter) / static_cast<double>(gnss_synchro_map_iter->second.fs);
T_rx_s = floor(T_rx_s * 1000.0) / 1000.0; // truncate to ms T_rx_s = floor(T_rx_s * 1000.0) / 1000.0; // truncate to ms
@ -210,11 +209,11 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused
// shift channels history to match the reference TOW // shift channels history to match the reference TOW
for (unsigned int i = 0; i < d_nchannels; i++) for (unsigned int i = 0; i < d_nchannels; i++)
{ {
gnss_synchro_deque_iter = std::lower_bound(d_gnss_synchro_history_queue[i].begin(), gnss_synchro_deque_iter = std::lower_bound(d_gnss_synchro_history_queue[i].cbegin(),
d_gnss_synchro_history_queue[i].end(), d_gnss_synchro_history_queue[i].cend(),
T_rx_s, T_rx_s,
Hybrid_valueCompare_gnss_synchro_receiver_time); Hybrid_valueCompare_gnss_synchro_receiver_time);
if (gnss_synchro_deque_iter != d_gnss_synchro_history_queue[i].end()) if (gnss_synchro_deque_iter != d_gnss_synchro_history_queue[i].cend())
{ {
if (gnss_synchro_deque_iter->Flag_valid_word == true) if (gnss_synchro_deque_iter->Flag_valid_word == true)
{ {
@ -226,10 +225,10 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused
{ {
// record the word structure in a map for pseudorange computation // record the word structure in a map for pseudorange computation
// save the previous observable // save the previous observable
int distance = std::distance(d_gnss_synchro_history_queue[i].begin(), gnss_synchro_deque_iter); int distance = std::distance(d_gnss_synchro_history_queue[i].cbegin(), gnss_synchro_deque_iter);
if (distance > 0) if (distance > 0)
{ {
if (d_gnss_synchro_history_queue[i].at(distance-1).Flag_valid_word) if (d_gnss_synchro_history_queue[i].at(distance - 1).Flag_valid_word)
{ {
double T_rx_channel_prev = static_cast<double>(d_gnss_synchro_history_queue[i].at(distance - 1).Tracking_sample_counter) / static_cast<double>(gnss_synchro_deque_iter->fs); double T_rx_channel_prev = static_cast<double>(d_gnss_synchro_history_queue[i].at(distance - 1).Tracking_sample_counter) / static_cast<double>(gnss_synchro_deque_iter->fs);
double delta_T_rx_s_prev = T_rx_channel_prev - T_rx_s; double delta_T_rx_s_prev = T_rx_channel_prev - T_rx_s;
@ -268,8 +267,8 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused
* common RX time algorithm * common RX time algorithm
*/ */
// what is the most recent symbol TOW in the current set? -> this will be the reference symbol // what is the most recent symbol TOW in the current set? -> this will be the reference symbol
gnss_synchro_map_iter = max_element(realigned_gnss_synchro_map.begin(), gnss_synchro_map_iter = max_element(realigned_gnss_synchro_map.cbegin(),
realigned_gnss_synchro_map.end(), realigned_gnss_synchro_map.cend(),
Hybrid_pairCompare_gnss_synchro_d_TOW); Hybrid_pairCompare_gnss_synchro_d_TOW);
double ref_fs_hz = static_cast<double>(gnss_synchro_map_iter->second.fs); double ref_fs_hz = static_cast<double>(gnss_synchro_map_iter->second.fs);
@ -292,7 +291,7 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused
double channel_T_rx_s; double channel_T_rx_s;
double channel_fs_hz; double channel_fs_hz;
double channel_TOW_s; double channel_TOW_s;
for(gnss_synchro_map_iter = realigned_gnss_synchro_map.begin(); gnss_synchro_map_iter != realigned_gnss_synchro_map.end(); gnss_synchro_map_iter++) for(gnss_synchro_map_iter = realigned_gnss_synchro_map.cbegin(); gnss_synchro_map_iter != realigned_gnss_synchro_map.cend(); gnss_synchro_map_iter++)
{ {
channel_fs_hz = static_cast<double>(gnss_synchro_map_iter->second.fs); channel_fs_hz = static_cast<double>(gnss_synchro_map_iter->second.fs);
channel_TOW_s = gnss_synchro_map_iter->second.TOW_at_current_symbol_s; channel_TOW_s = gnss_synchro_map_iter->second.TOW_at_current_symbol_s;

View File

@ -21,36 +21,41 @@ list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
# Optional drivers # Optional drivers
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
find_package(iio REQUIRED)
if(NOT IIO_FOUND)
message(STATUS "gnuradio-iio not found, its installation is required.")
message(STATUS "Please build and install the following projects:")
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
message(FATAL_ERROR "gnuradio-iio required for building gnss-sdr with this option enabled")
endif(NOT IIO_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
if(ENABLE_PLUTOSDR) if(ENABLE_PLUTOSDR)
############################################## ##############################################
# ADALM-PLUTO (Analog Devices Inc.) # ADALM-PLUTO (Analog Devices Inc.)
############################################## ##############################################
find_package(iio REQUIRED) if(IIO_FOUND)
if(NOT IIO_FOUND)
message("gnuradio-iio not found, installation is required")
message(FATAL_ERROR "gnuradio-iio required for building gnss-sdr with this option enabled")
else(NOT IIO_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
endif(NOT IIO_FOUND) endif(IIO_FOUND)
endif(ENABLE_PLUTOSDR) endif(ENABLE_PLUTOSDR)
if(ENABLE_FMCOMMS2) if(ENABLE_FMCOMMS2)
############################################### ###############################################
# FMCOMMS2 based SDR Hardware # FMCOMMS2 based SDR Hardware
############################################### ###############################################
find_package(iio REQUIRED) if(IIO_FOUND)
if(NOT IIO_FOUND) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
message("gnuradio-iio not found, installation is required") endif(IIO_FOUND)
message(FATAL_ERROR "gnuradio-iio required for building gnss-sdr with this option enabled")
else(NOT IIO_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc plutosdr_signal_source.cc)
endif(NOT IIO_FOUND)
endif(ENABLE_FMCOMMS2) endif(ENABLE_FMCOMMS2)
if(ENABLE_GN3S) if(ENABLE_GN3S)
############################################## ##############################################
# GN3S (USB dongle) # GN3S (USB dongle)
@ -134,7 +139,7 @@ set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc
gen_signal_source.cc gen_signal_source.cc
nsr_file_signal_source.cc nsr_file_signal_source.cc
spir_file_signal_source.cc spir_file_signal_source.cc
rtl_tcp_signal_source.cc rtl_tcp_signal_source.cc
${OPT_DRIVER_SOURCES} ${OPT_DRIVER_SOURCES}
) )

View File

@ -78,7 +78,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration
std::cout << "LO frequency : " << freq_ << "Hz" << std::endl; std::cout << "LO frequency : " << freq_ << "Hz" << std::endl;
std::cout << "sample rate: " << sample_rate_ << "Hz" << std::endl; std::cout << "sample rate: " << sample_rate_ << "Hz" << std::endl;
if(item_type_.compare("gr_complex")==0) if(item_type_.compare("gr_complex") == 0)
{ {
fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make( fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make(
uri_.c_str(), freq_, sample_rate_, uri_.c_str(), freq_, sample_rate_,
@ -92,7 +92,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration
} }
else else
{ {
LOG(FATAL) << "Exception: item type " << item_type_ << " not suported!"; LOG(FATAL) << "Exception: item type " << item_type_ << " not supported!";
} }
if (samples_ != 0) if (samples_ != 0)

View File

@ -1,6 +1,6 @@
/*! /*!
* \file fmcomms2_signal_source.h * \file fmcomms2_signal_source.h
* \brief Interface to use SDR hardware based in FMCOMMS2 driver from analog * \brief Interface to use SDR hardware based in FMCOMMS2 driver from analog
* devices, for example FMCOMMS4 and ADALM-PLUTO (PlutoSdr) * devices, for example FMCOMMS4 and ADALM-PLUTO (PlutoSdr)
* \author Rodrigo Muñoz, 2017. rmunozl(at)inacap.cl * \author Rodrigo Muñoz, 2017. rmunozl(at)inacap.cl
* *
@ -37,7 +37,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>
#include <gnuradio/blocks/file_sink.h> #include <gnuradio/blocks/file_sink.h>
#include <iio/fmcomms2_source.h> #include <gnuradio/iio/fmcomms2_source.h>
#include "gnss_block_interface.h" #include "gnss_block_interface.h"
class ConfigurationInterface; class ConfigurationInterface;

View File

@ -51,7 +51,7 @@ PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration
std::string default_dump_file = "./data/signal_source.dat"; std::string default_dump_file = "./data/signal_source.dat";
uri_ = configuration->property(role + ".device_address", std::string("192.168.2.1")); uri_ = configuration->property(role + ".device_address", std::string("192.168.2.1"));
freq_ = configuration->property(role + ".freq", GPS_L1_FREQ_HZ); freq_ = configuration->property(role + ".freq", GPS_L1_FREQ_HZ);
sample_rate_ configuration->property(role + ".sampling_frequency", 3000000); sample_rate_ = configuration->property(role + ".sampling_frequency", 3000000);
bandwidth_ = configuration->property(role + ".bandwidth", 2000000); bandwidth_ = configuration->property(role + ".bandwidth", 2000000);
buffer_size_ = configuration->property(role + ".buffer_size", 0xA0000); buffer_size_ = configuration->property(role + ".buffer_size", 0xA0000);
decimation_ = configuration->property(role + ".decimation", 1); decimation_ = configuration->property(role + ".decimation", 1);

View File

@ -36,7 +36,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>
#include <gnuradio/blocks/file_sink.h> #include <gnuradio/blocks/file_sink.h>
#include <iio/pluto_source.h> #include <gnuradio/iio/pluto_source.h>
#include "gnss_block_interface.h" #include "gnss_block_interface.h"
class ConfigurationInterface; class ConfigurationInterface;

View File

@ -41,6 +41,58 @@ if(ENABLE_FPGA)
endif(ENABLE_FPGA) endif(ENABLE_FPGA)
if(Boost_VERSION LESS 105000)
add_definitions(-DOLD_BOOST=1)
endif(Boost_VERSION LESS 105000)
if(OPENSSL_FOUND)
add_definitions( -DUSE_OPENSSL_FALLBACK=1 )
endif(OPENSSL_FOUND)
if(ENABLE_GN3S)
add_definitions(-DGN3S_DRIVER=1)
endif(ENABLE_GN3S)
if(ENABLE_ARRAY)
add_definitions(-DRAW_ARRAY_DRIVER=1)
endif(ENABLE_ARRAY)
if(ENABLE_FLEXIBAND)
add_definitions(-DFLEXIBAND_DRIVER=1)
endif(ENABLE_FLEXIBAND)
if(ENABLE_OSMOSDR)
if(GROSMOSDR_FOUND)
add_definitions(-DOSMOSDR_DRIVER=1)
endif(GROSMOSDR_FOUND)
endif(ENABLE_OSMOSDR)
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
add_definitions(-DUHD_DRIVER=1)
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
#Enable OpenCL if found in the system
if(OPENCL_FOUND)
message(STATUS "Adding processing blocks implemented using OpenCL" )
add_definitions(-DOPENCL_BLOCKS=1)
else(OPENCL_FOUND)
add_definitions(-DOPENCL_BLOCKS=0)
endif(OPENCL_FOUND)
#enable SDR Hardware based on fmcomms2
if(ENABLE_PLUTOSDR)
add_definitions(-DPLUTOSDR_DRIVER=1)
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
endif(ENABLE_PLUTOSDR)
if(ENABLE_FMCOMMS2)
add_definitions(-DFMCOMMS2_DRIVER=1)
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
endif(ENABLE_FMCOMMS2)
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
include_directories( include_directories(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters ${CMAKE_SOURCE_DIR}/src/core/system_parameters
@ -86,56 +138,6 @@ include_directories(
${VOLK_GNSSSDR_INCLUDE_DIRS} ${VOLK_GNSSSDR_INCLUDE_DIRS}
) )
if(Boost_VERSION LESS 105000)
add_definitions(-DOLD_BOOST=1)
endif(Boost_VERSION LESS 105000)
if(OPENSSL_FOUND)
add_definitions( -DUSE_OPENSSL_FALLBACK=1 )
endif(OPENSSL_FOUND)
if(ENABLE_GN3S)
add_definitions(-DGN3S_DRIVER=1)
endif(ENABLE_GN3S)
if(ENABLE_ARRAY)
add_definitions(-DRAW_ARRAY_DRIVER=1)
endif(ENABLE_ARRAY)
if(ENABLE_FLEXIBAND)
add_definitions(-DFLEXIBAND_DRIVER=1)
endif(ENABLE_FLEXIBAND)
if(ENABLE_OSMOSDR)
if(GROSMOSDR_FOUND)
add_definitions(-DOSMOSDR_DRIVER=1)
endif(GROSMOSDR_FOUND)
endif(ENABLE_OSMOSDR)
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
add_definitions(-DUHD_DRIVER=1)
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
#Enable OpenCL if found in the system
if(OPENCL_FOUND)
message(STATUS "Adding processing blocks implemented using OpenCL" )
add_definitions(-DOPENCL_BLOCKS=1)
else(OPENCL_FOUND)
add_definitions(-DOPENCL_BLOCKS=0)
endif(OPENCL_FOUND)
#enable SDR Hardware based on fmcomms2
if(ENABLE_PLUTOSDR)
add_definitions(-DPLUTOSDR_DRIVER=1)
endif(ENABLE_PLUTOSDR)
if(ENABLE_FMCOMMS2)
add_definitions(-DFMCOMMS2_DRIVER=1)
add_definitions(-DPLUTOSDR_DRIVER=1)
endif(ENABLE_FMCOMMS2)
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
file(GLOB GNSS_RECEIVER_HEADERS "*.h") file(GLOB GNSS_RECEIVER_HEADERS "*.h")
list(SORT GNSS_RECEIVER_HEADERS) list(SORT GNSS_RECEIVER_HEADERS)
file(GLOB GNSS_RECEIVER_INTERFACE_HEADERS "../interfaces/*.h") file(GLOB GNSS_RECEIVER_INTERFACE_HEADERS "../interfaces/*.h")