diff --git a/README.md b/README.md
index 9a14d8343..f15352cb1 100644
--- a/README.md
+++ b/README.md
@@ -368,7 +368,55 @@ $ sudo make install
(in order to disable the `Osmosdr_Signal_Source` compilation, you can pass `DENABLE_OSMOSDR=OFF` to cmake and build GNSS-SDR again).
+###### Build FMCOMMS2 based SDR Hardware support (OPTIONAL):
+Install [libiio] (https://github.com/analogdevicesinc/libiio.git
+), [libad9361] (clone https://github.com/analogdevicesinc/libad9361-iio.git) and [gr-iio] (clone https://github.com/analogdevicesinc/gr-iio.git) gnuradio block (based on https://www.plutosdr.com/viewtopic.php?t=5):
+
+~~~~~~
+$ git clone https://github.com/analogdevicesinc/libiio.git
+$ cd libiio
+$ mkdir build
+$ cd build
+$ cmake ..
+$ make
+$ sudo make install
+$ sudo ldconfig
+$ git clone https://github.com/analogdevicesinc/libad9361-iio.git
+$ cd libad9361-iio
+$ mkdir build
+$ cd build
+$ cmake ..
+$ make
+$ sudo make install
+$ sudo ldconfig
+$ git clone https://github.com/analogdevicesinc/gr-iio.git
+$ 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
+$ cd build
+$ cmake ..
+$ make
+$ sudo make install
+$ sudo ldconfig
+~~~~~~
+
+Then configure the gnss-sdr to build the `Fmcomms2_Signal_Source`:
+~~~~~~
+$ cmake -DENABLE_FMCOMMS2=ON ../
+$ make
+$ sudo make install
+~~~~~~
###### Build OpenCL support (OPTIONAL):
diff --git a/conf/gnss-sdr_GPS_L1_fmcomms2_realtime.conf b/conf/gnss-sdr_GPS_L1_fmcomms2_realtime.conf
new file mode 100644
index 000000000..aecfad5cd
--- /dev/null
+++ b/conf/gnss-sdr_GPS_L1_fmcomms2_realtime.conf
@@ -0,0 +1,145 @@
+; You can define your own receiver and invoke it by doing
+; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
+;
+
+[GNSS-SDR]
+
+;######### GLOBAL OPTIONS ##################
+;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
+;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE
+; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
+GNSS-SDR.internal_fs_hz=2000000
+
+
+;######### SUPL RRLP GPS assistance configuration #####
+; Check http://www.mcc-mnc.com/
+; On Android: https://play.google.com/store/apps/details?id=net.its_here.cellidinfo&hl=en
+GNSS-SDR.SUPL_gps_enabled=false
+GNSS-SDR.SUPL_read_gps_assistance_xml=false
+GNSS-SDR.SUPL_gps_ephemeris_server=supl.google.com
+GNSS-SDR.SUPL_gps_ephemeris_port=7275
+GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
+GNSS-SDR.SUPL_gps_acquisition_port=7275
+GNSS-SDR.SUPL_MCC=244
+GNSS-SDR.SUPL_MNS=5
+GNSS-SDR.SUPL_LAC=0x59e2
+GNSS-SDR.SUPL_CI=0x31b0
+
+;######### SIGNAL_SOURCE CONFIG ############
+SignalSource.implementation=Fmcomms2_Signal_Source
+;SignalSource.filename=/media/DATALOGGER_/signals/RTL-SDR/geo/pmt4.dat
+SignalSource.item_type=gr_complex
+SignalSource.device_address=10.42.0.196
+SignalSource.sampling_frequency=2000000
+SignalSource.freq=1575420000
+SignalSource.bandwidth=2000000
+SignalSource.decimation=0
+SignalSource.rx1_enable=true
+SignalSource.gain_mode_rx1=manual
+SignalSource.rf_port_select=A_BALANCED
+SignalSource.gain_rx1=64
+SignalSource.samples=0
+SignalSource.repeat=false
+SignalSource.dump=false
+SignalSource.dump_filename=../data/signal_source.dat
+SignalSource.enable_throttle_control=false
+
+;######### SIGNAL_CONDITIONER CONFIG ############
+SignalConditioner.implementation=Signal_Conditioner
+
+;######### DATA_TYPE_ADAPTER CONFIG ############
+DataTypeAdapter.implementation=Pass_Through
+
+;######### INPUT_FILTER CONFIG ############
+InputFilter.implementation=Freq_Xlating_Fir_Filter
+InputFilter.dump=false
+InputFilter.dump_filename=../data/input_filter.dat
+InputFilter.input_item_type=gr_complex
+InputFilter.output_item_type=gr_complex
+InputFilter.taps_item_type=float
+InputFilter.number_of_taps=5
+InputFilter.number_of_bands=2
+InputFilter.band1_begin=0.0
+InputFilter.band1_end=0.45
+InputFilter.band2_begin=0.55
+InputFilter.band2_end=1.0
+InputFilter.ampl1_begin=1.0
+InputFilter.ampl1_end=1.0
+InputFilter.ampl2_begin=0.0
+InputFilter.ampl2_end=0.0
+InputFilter.band1_error=1.0
+InputFilter.band2_error=1.0
+InputFilter.filter_type=bandpass
+InputFilter.grid_density=16
+InputFilter.sampling_frequency=2000000
+InputFilter.IF=0; IF deviation due to front-end LO inaccuracies [Hz]
+
+;######### RESAMPLER CONFIG ############
+;## Resamples the input data.
+;# DISABLED IN THE RTL-SDR REALTIME
+;#implementation: Use [Pass_Through] or [Direct_Resampler]
+;#[Pass_Through] disables this block
+Resampler.implementation=Pass_Through
+
+;######### CHANNELS GLOBAL CONFIG ############
+Channels_1C.count=5
+Channels.in_acquisition=1
+Channel.signal=1C
+
+
+;######### ACQUISITION GLOBAL CONFIG ############
+Acquisition_1C.dump=false
+Acquisition_1C.dump_filename=./acq_dump.dat
+Acquisition_1C.item_type=gr_complex
+Acquisition_1C.if=0
+Acquisition_1C.sampled_ms=1
+Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler
+Acquisition_1C.threshold=0.015
+;Acquisition_1C.pfa=0.0001
+Acquisition_1C.doppler_max=10000
+Acquisition_1C.doppler_min=-10000
+Acquisition_1C.doppler_step=500
+Acquisition_1C.max_dwells=15
+
+
+;######### TRACKING GLOBAL CONFIG ############
+Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
+Tracking_1C.item_type=gr_complex
+Tracking_1C.if=0
+Tracking_1C.dump=false
+Tracking_1C.dump_filename=./tracking_ch_
+Tracking_1C.pll_bw_hz=40.0;
+Tracking_1C.dll_bw_hz=2.0;
+Tracking_1C.order=3;
+Tracking_1C.early_late_space_chips=0.5;
+
+;######### TELEMETRY DECODER GPS CONFIG ############
+TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
+TelemetryDecoder_1C.dump=false
+TelemetryDecoder_1C.decimation_factor=1;
+
+;######### OBSERVABLES CONFIG ############
+Observables.implementation=GPS_L1_CA_Observables
+Observables.dump=false
+Observables.dump_filename=./observables.dat
+
+
+;######### PVT CONFIG ############
+;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version.
+PVT.implementation=GPS_L1_CA_PVT
+
+;#averaging_depth: Number of PVT observations in the moving average algorithm
+PVT.averaging_depth=10
+
+;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false]
+PVT.flag_averaging=true
+PVT.output_rate_ms=100
+PVT.display_rate_ms=500
+PVT.dump_filename=./PVT
+PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
+PVT.flag_nmea_tty_port=false;
+PVT.nmea_dump_devname=/dev/pts/4
+PVT.dump=false
+PVT.flag_rtcm_server=false
+PVT.flag_rtcm_tty_port=false
+PVT.rtcm_dump_devname=/dev/pts/1
diff --git a/conf/gnss-sdr_GPS_L1_plutosdr_realtime.conf b/conf/gnss-sdr_GPS_L1_plutosdr_realtime.conf
new file mode 100644
index 000000000..5c6f4fdd6
--- /dev/null
+++ b/conf/gnss-sdr_GPS_L1_plutosdr_realtime.conf
@@ -0,0 +1,89 @@
+; You can define your own receiver and invoke it by doing
+; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
+;
+
+[GNSS-SDR]
+
+;######### GLOBAL OPTIONS ##################
+;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
+;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE
+; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
+GNSS-SDR.internal_fs_hz=2000000
+
+
+;######### SUPL RRLP GPS assistance configuration #####
+; Check http://www.mcc-mnc.com/
+; On Android: https://play.google.com/store/apps/details?id=net.its_here.cellidinfo&hl=en
+GNSS-SDR.SUPL_gps_enabled=false
+GNSS-SDR.SUPL_read_gps_assistance_xml=false
+GNSS-SDR.SUPL_gps_ephemeris_server=supl.google.com
+GNSS-SDR.SUPL_gps_ephemeris_port=7275
+GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
+GNSS-SDR.SUPL_gps_acquisition_port=7275
+GNSS-SDR.SUPL_MCC=244
+GNSS-SDR.SUPL_MNS=5
+GNSS-SDR.SUPL_LAC=0x59e2
+GNSS-SDR.SUPL_CI=0x31b0
+
+;######### SIGNAL_SOURCE CONFIG ############
+SignalSource.implementation=Plutosdr_Signal_Source
+;SignalSource.filename=/media/DATALOGGER_/signals/RTL-SDR/geo/pmt4.dat
+SignalSource.item_type=gr_complex
+SignalSource.device_address=192.168.2.1
+SignalSource.sampling_frequency=3000000
+SignalSource.freq=1575420000
+SignalSource.bandwidth=2600000
+SignalSource.decimation=0
+SignalSource.gain_mode=manual
+SignalSource.gain=30
+SignalSource.samples=0
+SignalSource.buffer_size=65000
+SignalSource.repeat=false
+SignalSource.dump=false
+SignalSource.dump_filename=./capture.dat
+SignalSource.enable_throttle_control=false
+
+;######### SIGNAL_CONDITIONER CONFIG ############
+SignalConditioner.implementation=Signal_Conditioner
+InputFilter.implementation=Pass_Through
+InputFilter.item_type=gr_complex
+Resampler.implementation=Direct_Resampler
+Resampler.sample_freq_in=4000000
+Resampler.sample_freq_out=2000000
+Resampler.item_type=gr_complex
+
+
+;######### DATA_TYPE_ADAPTER CONFIG ############
+DataTypeAdapter.implementation=Pass_Through
+DataTypeAdapter.item_type=gr_complex
+
+;######### CHANNELS GLOBAL CONFIG ############
+Channels_1C.count=6
+Channels.in_acquisition=1
+Channel.signal=1C
+
+;######### ACQUISITION GLOBAL CONFIG ############
+Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
+Acquisition_1C.item_type=gr_complex
+Acquisition_1C.threshold=0.008
+Acquisition_1C.doppler_max=10000
+Acquisition_1C.doppler_step=250
+
+;######### TRACKING GLOBAL CONFIG ############
+Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
+Tracking_1C.item_type=gr_complex
+Tracking_1C.pll_bw_hz=40.0;
+Tracking_1C.dll_bw_hz=4.0;
+
+;######### TELEMETRY DECODER GPS CONFIG ############
+TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
+
+;######### OBSERVABLES CONFIG ############
+Observables.implementation=GPS_L1_CA_Observables
+
+;######### PVT CONFIG ############
+PVT.implementation=GPS_L1_CA_PVT
+PVT.averaging_depth=100
+PVT.flag_averaging=true
+PVT.output_rate_ms=10
+PVT.display_rate_ms=500
diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt
index 388b2ed59..2cc169ed9 100644
--- a/src/algorithms/signal_source/adapters/CMakeLists.txt
+++ b/src/algorithms/signal_source/adapters/CMakeLists.txt
@@ -21,6 +21,34 @@ list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
# Optional drivers
+if(ENABLE_PLUTOSDR)
+ ##############################################
+ # ADALM-PLUTO (Analog Devices Inc.)
+ ##############################################
+ find_package(iio REQUIRED)
+ 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")
+ endif(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)
+endif(ENABLE_PLUTOSDR)
+
+if(ENABLE_FMCOMMS2)
+ ###############################################
+ # FMCOMMS2 based SDR Hardware
+ ###############################################
+ find_package(iio REQUIRED)
+ 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")
+ endif(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(ENABLE_FMCOMMS2)
+
if(ENABLE_GN3S)
##############################################
# GN3S (USB dongle)
diff --git a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc
new file mode 100644
index 000000000..a77215327
--- /dev/null
+++ b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc
@@ -0,0 +1,178 @@
+/*!
+ * \filei fmcomms2_signal_source.cc
+ * \brief signal source for sdr hardware from analog devices based on
+ * fmcomms2 evaluation board.
+ * \author Rodrigo Muñoz, 2017, rmunozl(at)inacap.cl
+ *
+ * -------------------------------------------------------------------------
+ *
+ * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
+ *
+ * GNSS-SDR is a software defined Global Navigation
+ * Satellite Systems receiver
+ *
+ * This file is part of GNSS-SDR.
+ *
+ * GNSS-SDR is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GNSS-SDR is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNSS-SDR. If not, see .
+ *
+ * -------------------------------------------------------------------------
+ */
+
+#include "fmcomms2_signal_source.h"
+#include
+#include
+#include
+#include
+#include
+#include "configuration_interface.h"
+#include "gnss_sdr_valve.h"
+#include "GPS_L1_CA.h"
+
+using google::LogMessage;
+
+Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration,
+ std::string role, unsigned int in_stream, unsigned int out_stream,
+ boost::shared_ptr queue) :
+ role_(role), in_stream_(in_stream), out_stream_(out_stream),
+ queue_(queue)
+{
+ std::string default_item_type="gr_complex";
+ std::string default_dump_file="./data/signal_source.dat";
+ uri_= configuration->property(role+".device_address",std::string("192.168.2.1"));
+ freq_= configuration->property(role+".freq",GPS_L1_FREQ_HZ);
+ sample_rate_=configuration->property(role+".sampling_frequency",2600000);
+ bandwidth_= configuration->property(role+".bandwidth",2000000);
+ rx1_en_=configuration->property(role+".rx1_enable",true);
+ rx2_en_=configuration->property(role+".rx2_enable",false);
+ buffer_size_=configuration->property(role+".buffer_size",0xA0000);
+ decimation_=configuration->property(role+".decimation",1);
+ quadrature_=configuration->property(role+".quadrature",true);
+ rf_dc_=configuration->property(role+".rf_dc",true);
+ bb_dc_=configuration->property(role+".bb_dc",true);
+ gain_mode_rx1_=configuration->property(role+".gain_mode_rx1",std::string("manual"));
+ gain_mode_rx2_=configuration->property(role+".gain_mode_rx2",std::string("manual"));
+ rf_gain_rx1_=configuration->property(role+".gain_rx1",64.0);
+ rf_gain_rx2_=configuration->property(role+".gain_rx2",64.0);
+ rf_port_select_=configuration->property(role+".rf_port_select",std::string("A_BALANCED"));
+ filter_file_=configuration->property(role+".filter_file",std::string(""));
+ filter_auto_=configuration->property(role+".filter_auto",true);
+ item_type_=configuration->property(role+".item_type",default_item_type);
+ samples_=configuration->property(role+".samples",0);
+ dump_=configuration->property(role+".dump",false);
+ dump_filename_=configuration->property(role+".dump_filename",default_dump_file);
+
+ item_size_=sizeof(gr_complex);
+
+ std::cout<<"device address: "<unique_id() << ")";
+ }
+
+ if (dump_)
+ {
+ DLOG(INFO) << "Dumping output into file " << dump_filename_;
+ file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
+ DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
+ }
+}
+
+Fmcomms2SignalSource::~Fmcomms2SignalSource()
+{
+}
+
+void Fmcomms2SignalSource::connect(gr::top_block_sptr top_block)
+{
+ if (samples_ != 0)
+ {
+ top_block->connect(fmcomms2_source_f32c_, 0, valve_, 0);
+ DLOG(INFO) << "connected fmcomms2 source to valve";
+ if (dump_)
+ {
+ top_block->connect(valve_, 0, file_sink_, 0);
+ DLOG(INFO) << "connected valve to file sink";
+ }
+ }
+ else
+ {
+ if (dump_)
+ {
+
+ top_block->connect(fmcomms2_source_f32c_ , 0, file_sink_, 0);
+ DLOG(INFO) << "connected fmcomms2 source to file sink";
+ }
+ }
+}
+
+
+void Fmcomms2SignalSource::disconnect(gr::top_block_sptr top_block)
+{
+ if (samples_ != 0)
+ {
+ top_block->disconnect(fmcomms2_source_f32c_, 0, valve_, 0);
+ if (dump_)
+ {
+ top_block->disconnect(valve_, 0, file_sink_, 0);
+ }
+ }
+ else
+ {
+ if (dump_)
+ {
+ top_block->disconnect(fmcomms2_source_f32c_, 0, file_sink_, 0);
+ }
+ }
+}
+
+
+gr::basic_block_sptr Fmcomms2SignalSource::get_left_block()
+{
+ LOG(WARNING) << "Trying to get signal source left block.";
+ return gr::basic_block_sptr();
+}
+
+
+gr::basic_block_sptr Fmcomms2SignalSource::get_right_block()
+{
+ if (samples_ != 0)
+ {
+ return valve_;
+ }
+ else
+ {
+ return (fmcomms2_source_f32c_);
+ }
+}
diff --git a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h
new file mode 100644
index 000000000..c9b690cdd
--- /dev/null
+++ b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h
@@ -0,0 +1,115 @@
+/*!
+ * \file fmcomms2_signal_source.h
+ * \brief Interface to use SDR hardware based in FMCOMMS2 driver from analog
+ * devices, for example FMCOMMS4 and ADALM-PLUTO (PlutoSdr)
+ * \author Rodrigo Muñoz, 2017. rmunozl(at)inacap.cl
+ *
+ * This class represent a fmcomms2 signal source. It use the gr_iio block
+ * -------------------------------------------------------------------------
+ *
+ * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
+ *
+ * GNSS-SDR is a software defined Global Navigation
+ * Satellite Systems receiver
+ *
+ * This file is part of GNSS-SDR.
+ *
+ * GNSS-SDR is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GNSS-SDR is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNSS-SDR. If not, see .
+ *
+ * -------------------------------------------------------------------------
+ */
+
+#ifndef GNSS_SDR_FMCOMMS2_SIGNAL_SOURCE_H_
+#define GNSS_SDR_FMCOMMS2_SIGNAL_SOURCE_H_
+
+#include
+#include
+#include
+#include
+#include
+#include "gnss_block_interface.h"
+
+class ConfigurationInterface;
+
+class Fmcomms2SignalSource: public GNSSBlockInterface
+{
+public:
+ Fmcomms2SignalSource(ConfigurationInterface* configuration,
+ std::string role, unsigned int in_stream,
+ unsigned int out_stream, boost::shared_ptr queue);
+
+ virtual ~Fmcomms2SignalSource();
+
+ std::string role()
+ {
+ return role_;
+ }
+
+ /*!
+ * \brief Returns "fmcomms2_Signal_Source"
+ */
+ std::string implementation()
+ {
+ return "Fmcomms2_Signal_Source";
+ }
+ size_t item_size()
+ {
+ return item_size_;
+ }
+
+ void connect(gr::top_block_sptr top_block);
+ void disconnect(gr::top_block_sptr top_block);
+ gr::basic_block_sptr get_left_block();
+ gr::basic_block_sptr get_right_block();
+
+private:
+ std::string role_;
+
+ // Front-end settings
+ std::string uri_;//device direction
+ unsigned long freq_; //frequency of local oscilator
+ unsigned long sample_rate_;
+ unsigned long bandwidth_;
+ unsigned long buffer_size_; //reception buffer
+ unsigned int decimation_;
+ bool rx1_en_;
+ bool rx2_en_;
+ bool quadrature_;
+ bool rf_dc_;
+ bool bb_dc_;
+ std::string gain_mode_rx1_;
+ std::string gain_mode_rx2_;
+ double rf_gain_rx1_;
+ double rf_gain_rx2_;
+ std::string rf_port_select_;
+ std::string filter_file_;
+ bool filter_auto_;
+
+ unsigned int in_stream_;
+ unsigned int out_stream_;
+
+ std::string item_type_;
+ size_t item_size_;
+ long samples_;
+ bool dump_;
+ std::string dump_filename_;
+
+ gr::iio::fmcomms2_source_f32c::sptr fmcomms2_source_f32c_;
+
+ boost::shared_ptr valve_;
+ gr::blocks::file_sink::sptr file_sink_;
+ boost::shared_ptr queue_;
+};
+
+#endif /*GNSS_SDR_FMCOMMS2_SIGNAL_SOURCE_H_*/
diff --git a/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc b/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc
new file mode 100644
index 000000000..45e0f3deb
--- /dev/null
+++ b/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc
@@ -0,0 +1,138 @@
+#include "plutosdr_signal_source.h"
+#include
+#include
+#include
+#include
+#include "configuration_interface.h"
+#include "gnss_sdr_valve.h"
+#include "GPS_L1_CA.h"
+
+
+using google::LogMessage;
+
+
+PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration,
+ std::string role, unsigned int in_stream, unsigned int out_stream,
+ boost::shared_ptr queue) :
+ role_(role), in_stream_(in_stream), out_stream_(out_stream),
+ queue_(queue)
+{
+ std::string default_item_type="gr_complex";
+ std::string default_dump_file="./data/signal_source.dat";
+ uri_ = configuration->property(role+".device_address",std::string("192.168.2.1"));
+ freq_= configuration->property(role+".freq",GPS_L1_FREQ_HZ);
+ sample_rate_=configuration->property(role+".sampling_frequency",3000000);
+ bandwidth_ = configuration->property(role+".bandwidth",2000000);
+ buffer_size_=configuration->property(role+".buffer_size",0xA0000);
+ decimation_=configuration->property(role+".decimation",1);
+ quadrature_=configuration->property(role+".quadrature",true);
+ rf_dc_ =configuration->property(role+".rf_dc",true);
+ bb_dc_ =configuration->property(role+".bb_dc",true);
+ gain_mode_=configuration->property(role+".gain_mode",std::string("manual"));
+ rf_gain_=configuration->property(role+".gain",50.0);
+ filter_file_=configuration->property(role+".filter_file",std::string(""));
+ filter_auto_=configuration->property(role+".filter_auto",true);
+
+ item_type_=configuration->property(role+".item_type",default_item_type);
+ samples_=configuration->property(role+".samples",0);
+ dump_=configuration->property(role+".dump",false);
+ dump_filename_=configuration->property(role+".dump_filename",default_dump_file);
+
+ if(item_type_.compare("gr_complex") != 0)
+ {
+ std::cout<<"bad item_type!!"<unique_id() << ")";
+ }
+
+ if (dump_)
+ {
+ DLOG(INFO) << "Dumping output into file " << dump_filename_;
+ file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
+ DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
+ }
+}
+
+PlutosdrSignalSource::~PlutosdrSignalSource()
+{}
+
+void PlutosdrSignalSource::connect(gr::top_block_sptr top_block)
+{
+ if (samples_ != 0)
+ {
+ top_block->connect(plutosdr_source_, 0, valve_, 0);
+ DLOG(INFO) << "connected plutosdr source to valve";
+ if (dump_)
+ {
+ top_block->connect(valve_, 0, file_sink_, 0);
+ DLOG(INFO) << "connected valve to file sink";
+ }
+ }
+ else
+ {
+ if (dump_)
+ {
+ top_block->connect(plutosdr_source_, 0, file_sink_, 0);
+ DLOG(INFO) << "connected plutosdr source to file sink";
+ }
+ }
+}
+
+
+void PlutosdrSignalSource::disconnect(gr::top_block_sptr top_block)
+{
+ if (samples_ != 0)
+ {
+ top_block->disconnect(plutosdr_source_, 0, valve_, 0);
+ if (dump_)
+ {
+ top_block->disconnect(valve_, 0, file_sink_, 0);
+ }
+ }
+ else
+ {
+ if (dump_)
+ {
+ top_block->disconnect(plutosdr_source_, 0, file_sink_, 0);
+ }
+ }
+}
+
+
+gr::basic_block_sptr PlutosdrSignalSource::get_left_block()
+{
+ LOG(WARNING) << "Trying to get signal source left block.";
+ return gr::basic_block_sptr();
+}
+
+
+gr::basic_block_sptr PlutosdrSignalSource::get_right_block()
+{
+ if (samples_ != 0)
+ {
+ return valve_;
+ }
+ else
+ {
+ return plutosdr_source_;
+ }
+}
diff --git a/src/algorithms/signal_source/adapters/plutosdr_signal_source.h b/src/algorithms/signal_source/adapters/plutosdr_signal_source.h
new file mode 100644
index 000000000..eadee361d
--- /dev/null
+++ b/src/algorithms/signal_source/adapters/plutosdr_signal_source.h
@@ -0,0 +1,81 @@
+
+#ifndef GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H_
+#define GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H_
+
+#include
+#include
+#include
+#include
+#include
+#include "gnss_block_interface.h"
+
+class ConfigurationInterface;
+
+/*!
+ */
+class PlutosdrSignalSource: public GNSSBlockInterface
+{
+public:
+ PlutosdrSignalSource(ConfigurationInterface* configuration,
+ std::string role, unsigned int in_stream,
+ unsigned int out_stream, boost::shared_ptr queue);
+
+ virtual ~PlutosdrSignalSource();
+
+ std::string role()
+ {
+ return role_;
+ }
+
+ /*!
+ * \brief Returns "Plutosdr_Signal_Source"
+ */
+ std::string implementation()
+ {
+ return "Plutosdr_Signal_Source";
+ }
+ size_t item_size()
+ {
+ return item_size_;
+ }
+
+ void connect(gr::top_block_sptr top_block);
+ void disconnect(gr::top_block_sptr top_block);
+ gr::basic_block_sptr get_left_block();
+ gr::basic_block_sptr get_right_block();
+
+private:
+ std::string role_;
+
+ // Front-end settings
+ std::string uri_;//device direction
+ unsigned long freq_; //frequency of local oscilator
+ unsigned long sample_rate_;
+ unsigned long bandwidth_;
+ unsigned long buffer_size_; //reception buffer
+ unsigned int decimation_;
+ bool quadrature_;
+ bool rf_dc_;
+ bool bb_dc_;
+ std::string gain_mode_;
+ double rf_gain_;
+ std::string filter_file_;
+ bool filter_auto_;
+
+ unsigned int in_stream_;
+ unsigned int out_stream_;
+
+ std::string item_type_;
+ size_t item_size_;
+ long samples_;
+ bool dump_;
+ std::string dump_filename_;
+
+ gr::iio::pluto_source::sptr plutosdr_source_;
+
+ boost::shared_ptr valve_;
+ gr::blocks::file_sink::sptr file_sink_;
+ boost::shared_ptr queue_;
+};
+
+#endif /*GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H_*/
diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt
index 7c3992785..ae6908495 100644
--- a/src/core/receiver/CMakeLists.txt
+++ b/src/core/receiver/CMakeLists.txt
@@ -124,6 +124,16 @@ 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")
diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc
index 4daad0c79..6ec273785 100644
--- a/src/core/receiver/gnss_block_factory.cc
+++ b/src/core/receiver/gnss_block_factory.cc
@@ -119,6 +119,14 @@
#include "uhd_signal_source.h"
#endif
+#if PLUTOSDR_DRIVER
+#include "plutosdr_signal_source.h"
+#endif
+
+#if FMCOMMS2_DRIVER
+#include "fmcomms2_signal_source.h"
+#endif
+
#if FLEXIBAND_DRIVER
#include "flexiband_signal_source.h"
#endif
@@ -811,6 +819,24 @@ std::unique_ptr GNSSBlockFactory::GetBlock(
}
#endif
+#if PLUTOSDR_DRIVER
+ else if (implementation.compare("Plutosdr_Signal_Source") == 0)
+ {
+ std::unique_ptr block_(new PlutosdrSignalSource(configuration.get(), role, in_streams,
+ out_streams, queue));
+ block = std::move(block_);
+ }
+#endif
+
+#if FMCOMMS2_DRIVER
+ else if (implementation.compare("Fmcomms2_Signal_Source") == 0)
+ {
+ std::unique_ptr block_(new Fmcomms2SignalSource(configuration.get(), role, in_streams,
+ out_streams, queue));
+ block = std::move(block_);
+ }
+#endif
+
#if FLEXIBAND_DRIVER
else if (implementation.compare("Flexiband_Signal_Source") == 0)
{