[hamradio-commits] [gnss-sdr] 02/07: Merge branch 'next' of git+ssh://github.com/gnss-sdr/gnss-sdr into next
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Tue Apr 26 18:48:52 UTC 2016
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch next
in repository gnss-sdr.
commit 59e2e61cae1cf825d993292348ae05a7a567a820
Merge: 5492c6a ec4dd37
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Tue Apr 26 18:54:32 2016 +0200
Merge branch 'next' of git+ssh://github.com/gnss-sdr/gnss-sdr into next
README.md | 4 +-
.../gnuradio_blocks/pcps_acquisition_cc.cc | 5 +-
src/algorithms/channel/adapters/channel.cc | 12 ++---
..._e1_pcps_ambiguous_acquisition_gsoc2013_test.cc | 38 ++++++++-----
.../gps_l1_ca_pcps_acquisition_gsoc2013_test.cc | 2 +
src/tests/test_main.cc | 3 +-
src/utils/front-end-cal/main.cc | 62 ++++++++++++++++++++++
7 files changed, 101 insertions(+), 25 deletions(-)
diff --cc README.md
index 41aa474,41aa474..31610a3
--- a/README.md
+++ b/README.md
@@@ -37,13 -37,13 +37,13 @@@ $ sudo apt-get install build-essential
libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev libgtest-dev
~~~~~~
--Alternatively, and starting from Ubuntu 16.04 LTS, you can install all required dependencies by adding the line
++Alternatively, and starting from Ubuntu 16.04 LTS, you can install all the required dependencies by adding the line
~~~~~~
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
~~~~~~
--at your ```/etc/apt/sources.list``` file and doing:
++to your ```/etc/apt/sources.list``` file and doing:
~~~~~~
$ sudo apt-get update
diff --cc src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
index 091958a,091958a..65c8862
--- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
+++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
@@@ -53,12 -53,12 +53,12 @@@ pcps_acquisition_cc_sptr pcps_make_acqu
bool dump,
std::string dump_filename)
{
--
return pcps_acquisition_cc_sptr(
new pcps_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
-- samples_per_code, bit_transition_flag, use_CFAR_algorithm_flag, dump, dump_filename));
++ samples_per_code, bit_transition_flag, use_CFAR_algorithm_flag, dump, dump_filename));
}
++
pcps_acquisition_cc::pcps_acquisition_cc(
unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
@@@ -70,7 -70,7 +70,6 @@@
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms * ( bit_transition_flag ? 2 : 1 )),
gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms * ( bit_transition_flag ? 2 : 1 )) )
{
--
this->message_port_register_out(pmt::mp("events"));
d_sample_counter = 0; // SAMPLE COUNTER
diff --cc src/algorithms/channel/adapters/channel.cc
index a405a8a,a405a8a..0495d89
--- a/src/algorithms/channel/adapters/channel.cc
+++ b/src/algorithms/channel/adapters/channel.cc
@@@ -29,15 -29,15 +29,15 @@@
* -------------------------------------------------------------------------
*/
#include "channel.h"
--#include <memory>
++//#include <memory>
#include <boost/lexical_cast.hpp>
#include <glog/logging.h>
--#include "channel_interface.h"
--#include "acquisition_interface.h"
--#include "tracking_interface.h"
--#include "telemetry_decoder_interface.h"
++//#include "channel_interface.h"
++//#include "acquisition_interface.h"
++//#include "tracking_interface.h"
++//#include "telemetry_decoder_interface.h"
#include "configuration_interface.h"
--#include "channel_msg_receiver_cc.h"
++//#include "channel_msg_receiver_cc.h"
using google::LogMessage;
diff --cc src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc
index bdf5cee,bdf5cee..deca2f3
--- a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc
+++ b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc
@@@ -58,10 -58,10 +58,13 @@@ concurrent_queue<int> channel_internal_
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
class GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx;
++
typedef boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_sptr;
++
GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_sptr GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make();
++
class GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx : public gr::block
{
private:
@@@ -75,31 -75,31 +78,35 @@@ public
};
++
GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_sptr GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make()
{
return GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_sptr(new GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx());
}
++
void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pmt::pmt_t msg)
{
-- try {
-- long int message=pmt::to_long(msg);
-- rx_message=message;
-- channel_internal_queue.push(rx_message);
-- }catch(boost::bad_any_cast& e)
++ try
++ {
++ long int message = pmt::to_long(msg);
++ rx_message = message;
++ channel_internal_queue.push(rx_message);
++ }
++ catch(boost::bad_any_cast& e)
{
LOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
rx_message = 0;
}
}
++
GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx::GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx() :
gr::block("GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
{
--
this->message_port_register_in(pmt::mp("events"));
this->set_msg_handler(pmt::mp("events"), boost::bind(&GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx::msg_handler_events, this, _1));
-- rx_message=0;
++ rx_message = 0;
}
GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx::~GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx()
@@@ -122,8 -122,8 +129,7 @@@ protected
}
~GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test()
-- {
-- }
++ {}
void init();
void config_1();
@@@ -183,6 -183,6 +189,7 @@@ void GalileoE1PcpsAmbiguousAcquisitionG
Pfa_a = 0;
}
++
void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::config_1()
{
gnss_synchro.Channel_ID = 0;
@@@ -254,6 -254,6 +261,7 @@@
config->set_property("Acquisition.dump", "false");
}
++
void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::config_2()
{
gnss_synchro.Channel_ID = 0;
@@@ -343,12 -343,12 +351,14 @@@
config->set_property("Acquisition.dump", "false");
}
++
void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::start_queue()
{
stop = false;
ch_thread = boost::thread(&GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::wait_message, this);
}
++
void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::wait_message()
{
struct timeval tv;
@@@ -373,6 -373,6 +383,7 @@@
}
}
++
void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::process_message()
{
if (message == 1)
@@@ -412,6 -412,6 +423,7 @@@
}
}
++
void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::stop_queue()
{
stop = true;
@@@ -446,7 -446,7 +458,7 @@@ TEST_F(GalileoE1PcpsAmbiguousAcquisitio
boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue);
top_block->connect(source, 0, valve, 0);
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
-- top_block->msg_connect(acquisition->get_right_block(),pmt::mp("events"), msg_rx,pmt::mp("events"));
++ top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}) << "Failure connecting the blocks of acquisition test." << std::endl;
EXPECT_NO_THROW( {
@@@ -460,6 -460,6 +472,7 @@@
std::cout << "Processed " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl;
}
++
TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
{
config_1();
@@@ -470,7 -470,7 +483,6 @@@
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make();
--
ASSERT_NO_THROW( {
acquisition->set_channel(1);
}) << "Failure setting channel." << std::endl;
@@@ -504,7 -504,7 +516,7 @@@
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
signal_source->connect(top_block);
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
-- top_block->msg_connect(acquisition->get_right_block(),pmt::mp("events"), msg_rx,pmt::mp("events"));
++ top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}) << "Failure connecting the blocks of acquisition test." << std::endl;
// i = 0 --> satellite in acquisition is visible
@@@ -590,7 -590,7 +602,7 @@@ TEST_F(GalileoE1PcpsAmbiguousAcquisitio
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
signal_source->connect(top_block);
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
-- top_block->msg_connect(acquisition->get_right_block(),pmt::mp("events"), msg_rx,pmt::mp("events"));
++ top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}) << "Failure connecting the blocks of acquisition test." << std::endl;
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
diff --cc src/tests/gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc
index 9d46915,9d46915..f2d7fd7
--- a/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc
+++ b/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc
@@@ -54,6 -54,6 +54,8 @@@
#include "pass_through.h"
++concurrent_queue<int> channel_internal_queue;
++
class GpsL1CaPcpsAcquisitionGSoC2013Test: public ::testing::Test
{
protected:
diff --cc src/tests/test_main.cc
index e559668,e559668..abe014c
--- a/src/tests/test_main.cc
+++ b/src/tests/test_main.cc
@@@ -89,7 -89,7 +89,7 @@@ DECLARE_string(log_dir)
#include "gnss_block/fir_filter_test.cc"
#include "gnss_block/gps_l1_ca_pcps_acquisition_test.cc"
#include "gnss_block/gps_l2_m_pcps_acquisition_test.cc"
--//#include "gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc"
++#include "gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc"
//#include "gnss_block/gps_l1_ca_pcps_multithread_acquisition_gsoc2013_test.cc"
//#if OPENCL_BLOCKS_TEST
//#include "gnss_block/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc"
@@@ -117,6 -117,6 +117,7 @@@
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
++concurrent_queue<int> channel_internal_queue;
int main(int argc, char **argv)
{
diff --cc src/utils/front-end-cal/main.cc
index 164ee4f,dc341a8..4d8d598
--- a/src/utils/front-end-cal/main.cc
+++ b/src/utils/front-end-cal/main.cc
@@@ -100,6 -100,61 +100,63 @@@ GpsL1CaPcpsAcquisitionFineDoppler *acqu
Gnss_Synchro *gnss_synchro;
std::vector<Gnss_Synchro> gnss_sync_vector;
+
+ // ######## GNURADIO BLOCK MESSAGE RECEVER #########
+ class FrontEndCal_msg_rx;
+
+ typedef boost::shared_ptr<FrontEndCal_msg_rx> FrontEndCal_msg_rx_sptr;
+
+ FrontEndCal_msg_rx_sptr FrontEndCal_msg_rx_make();
+
++
+ class FrontEndCal_msg_rx : public gr::block
+ {
+ private:
+ friend FrontEndCal_msg_rx_sptr FrontEndCal_msg_rx_make();
+ void msg_handler_events(pmt::pmt_t msg);
+ FrontEndCal_msg_rx();
+
+ public:
+ int rx_message;
+ ~FrontEndCal_msg_rx(); //!< Default destructor
-
+ };
+
++
+ FrontEndCal_msg_rx_sptr FrontEndCal_msg_rx_make()
+ {
+ return FrontEndCal_msg_rx_sptr(new FrontEndCal_msg_rx());
+ }
+
++
+ void FrontEndCal_msg_rx::msg_handler_events(pmt::pmt_t msg)
+ {
- try {
- long int message=pmt::to_long(msg);
- rx_message=message;
- channel_internal_queue.push(rx_message);
- }catch(boost::bad_any_cast& e)
++ try
++ {
++ long int message = pmt::to_long(msg);
++ rx_message = message;
++ channel_internal_queue.push(rx_message);
++ }
++ catch(boost::bad_any_cast& e)
+ {
+ LOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
+ rx_message = 0;
+ }
+ }
+
++
+ FrontEndCal_msg_rx::FrontEndCal_msg_rx() :
+ gr::block("FrontEndCal_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
+ {
-
+ this->message_port_register_in(pmt::mp("events"));
+ this->set_msg_handler(pmt::mp("events"), boost::bind(&FrontEndCal_msg_rx::msg_handler_events, this, _1));
- rx_message=0;
++ rx_message = 0;
+ }
+
+ FrontEndCal_msg_rx::~FrontEndCal_msg_rx()
+ {}
+
-
+ // ###########################################################
+
-
void wait_message()
{
while (!stop)
@@@ -125,6 -180,6 +182,7 @@@
}
}
++
bool front_end_capture(std::shared_ptr<ConfigurationInterface> configuration)
{
gr::top_block_sptr top_block;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list