mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-19 00:04:58 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fpga
This commit is contained in:
commit
557d25d3ea
@ -115,9 +115,6 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
|||||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||||
|
|
||||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
|
||||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
|
||||||
|
|
||||||
if (item_type_.compare("cbyte") == 0)
|
if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||||
@ -278,18 +275,19 @@ void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
// Since a byte-based acq implementation is not available,
|
||||||
|
// we just convert cshorts to gr_complex
|
||||||
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->connect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -302,20 +300,17 @@ void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
// Since a byte-based acq implementation is not available,
|
|
||||||
// we just convert cshorts to gr_complex
|
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->disconnect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -328,11 +323,11 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block()
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "pcps_acquisition.h"
|
#include "pcps_acquisition.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -135,7 +134,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_sptr acquisition_;
|
pcps_acquisition_sptr acquisition_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
|
@ -111,7 +111,6 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
|||||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||||
|
|
||||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
threshold_ = 0.0;
|
threshold_ = 0.0;
|
||||||
doppler_step_ = 0;
|
doppler_step_ = 0;
|
||||||
@ -259,15 +258,15 @@ void GalileoE5aPcpsAcquisition::set_state(int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block __attribute__((unused)))
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -276,15 +275,15 @@ void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
void GalileoE5aPcpsAcquisition::disconnect(gr::top_block_sptr top_block __attribute__((unused)))
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -295,7 +294,7 @@ void GalileoE5aPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
|
|
||||||
gr::basic_block_sptr GalileoE5aPcpsAcquisition::get_left_block()
|
gr::basic_block_sptr GalileoE5aPcpsAcquisition::get_left_block()
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#include "acquisition_interface.h"
|
#include "acquisition_interface.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "pcps_acquisition.h"
|
#include "pcps_acquisition.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
@ -129,7 +128,6 @@ private:
|
|||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
|
|
||||||
pcps_acquisition_sptr acquisition_;
|
pcps_acquisition_sptr acquisition_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
|
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
|
|
||||||
|
@ -110,9 +110,6 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
|||||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||||
|
|
||||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
|
||||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
|
||||||
|
|
||||||
if (item_type_.compare("cbyte") == 0)
|
if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||||
@ -262,18 +259,17 @@ void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->connect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -286,11 +282,11 @@ void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
@ -298,8 +294,7 @@ void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
// we just convert cshorts to gr_complex
|
// we just convert cshorts to gr_complex
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->disconnect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -312,11 +307,11 @@ gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_left_block()
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "pcps_acquisition.h"
|
#include "pcps_acquisition.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -135,7 +134,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_sptr acquisition_;
|
pcps_acquisition_sptr acquisition_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
|
@ -109,9 +109,6 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
|||||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||||
|
|
||||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
|
||||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
|
||||||
|
|
||||||
if (item_type_.compare("cbyte") == 0)
|
if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||||
@ -261,18 +258,19 @@ void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
// Since a byte-based acq implementation is not available,
|
||||||
|
// we just convert cshorts to gr_complex
|
||||||
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->connect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -285,20 +283,17 @@ void GlonassL2CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
// Since a byte-based acq implementation is not available,
|
|
||||||
// we just convert cshorts to gr_complex
|
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->disconnect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -311,11 +306,11 @@ gr::basic_block_sptr GlonassL2CaPcpsAcquisition::get_left_block()
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "pcps_acquisition.h"
|
#include "pcps_acquisition.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -134,7 +133,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_sptr acquisition_;
|
pcps_acquisition_sptr acquisition_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
|
@ -105,9 +105,6 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
|||||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||||
|
|
||||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
|
||||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
|
||||||
|
|
||||||
if (item_type_.compare("cbyte") == 0)
|
if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||||
@ -194,7 +191,6 @@ signed int GpsL1CaPcpsAcquisition::mag()
|
|||||||
void GpsL1CaPcpsAcquisition::init()
|
void GpsL1CaPcpsAcquisition::init()
|
||||||
{
|
{
|
||||||
acquisition_->init();
|
acquisition_->init();
|
||||||
//set_local_code();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -251,18 +247,19 @@ void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
// Since a byte-based acq implementation is not available,
|
||||||
|
// we just convert cshorts to gr_complex
|
||||||
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->connect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -275,20 +272,17 @@ void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
// Since a byte-based acq implementation is not available,
|
|
||||||
// we just convert cshorts to gr_complex
|
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->disconnect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -301,11 +295,11 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block()
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "pcps_acquisition.h"
|
#include "pcps_acquisition.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -139,7 +138,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_sptr acquisition_;
|
pcps_acquisition_sptr acquisition_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
|
@ -112,9 +112,6 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
|||||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||||
|
|
||||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
|
||||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
|
||||||
|
|
||||||
if (item_type_.compare("cbyte") == 0)
|
if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||||
@ -264,18 +261,19 @@ void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
// Since a byte-based acq implementation is not available,
|
||||||
|
// we just convert cshorts to gr_complex
|
||||||
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->connect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -288,20 +286,17 @@ void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
// Since a byte-based acq implementation is not available,
|
|
||||||
// we just convert cshorts to gr_complex
|
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->disconnect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -314,11 +309,11 @@ gr::basic_block_sptr GpsL2MPcpsAcquisition::get_left_block()
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "pcps_acquisition.h"
|
#include "pcps_acquisition.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -137,7 +136,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_sptr acquisition_;
|
pcps_acquisition_sptr acquisition_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
|
@ -103,8 +103,6 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
|||||||
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false);
|
||||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
|
||||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
|
||||||
|
|
||||||
if (item_type_.compare("cbyte") == 0)
|
if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
@ -251,18 +249,19 @@ void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to connect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
// Since a byte-based acq implementation is not available,
|
||||||
|
// we just convert cshorts to gr_complex
|
||||||
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->connect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -275,20 +274,17 @@ void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
// nothing to disconnect
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
// Since a byte-based acq implementation is not available,
|
|
||||||
// we just convert cshorts to gr_complex
|
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||||
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||||
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
top_block->disconnect(float_to_complex_, 0, acquisition_, 0);
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -301,11 +297,11 @@ gr::basic_block_sptr GpsL5iPcpsAcquisition::get_left_block()
|
|||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
return stream_to_vector_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "pcps_acquisition.h"
|
#include "pcps_acquisition.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -137,7 +136,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_sptr acquisition_;
|
pcps_acquisition_sptr acquisition_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
|
@ -52,7 +52,7 @@ pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_)
|
|||||||
|
|
||||||
|
|
||||||
pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acquisition",
|
pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acquisition",
|
||||||
gr::io_signature::make(1, 1, conf_.it_size * std::floor(conf_.sampled_ms * conf_.samples_per_ms) * (conf_.bit_transition_flag ? 2 : 1)),
|
gr::io_signature::make(1, 1, conf_.it_size),
|
||||||
gr::io_signature::make(0, 0, conf_.it_size))
|
gr::io_signature::make(0, 0, conf_.it_size))
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
this->message_port_register_out(pmt::mp("events"));
|
||||||
@ -73,7 +73,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
|
|||||||
{
|
{
|
||||||
d_fft_size = d_consumed_samples * 2;
|
d_fft_size = d_consumed_samples * 2;
|
||||||
}
|
}
|
||||||
//d_fft_size = next power of two? ////
|
// d_fft_size = next power of two? ////
|
||||||
d_mag = 0;
|
d_mag = 0;
|
||||||
d_input_power = 0.0;
|
d_input_power = 0.0;
|
||||||
d_num_doppler_bins = 0;
|
d_num_doppler_bins = 0;
|
||||||
@ -137,6 +137,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
|
|||||||
d_dump_number = 0;
|
d_dump_number = 0;
|
||||||
d_dump_channel = acq_parameters.dump_channel;
|
d_dump_channel = acq_parameters.dump_channel;
|
||||||
d_samplesPerChip = acq_parameters.samples_per_chip;
|
d_samplesPerChip = acq_parameters.samples_per_chip;
|
||||||
|
d_buffer_count = 0;
|
||||||
// todo: CFAR statistic not available for non-coherent integration
|
// todo: CFAR statistic not available for non-coherent integration
|
||||||
if (acq_parameters.max_dwells == 1)
|
if (acq_parameters.max_dwells == 1)
|
||||||
{
|
{
|
||||||
@ -347,8 +348,8 @@ void pcps_acquisition::set_state(int state)
|
|||||||
|
|
||||||
void pcps_acquisition::send_positive_acquisition()
|
void pcps_acquisition::send_positive_acquisition()
|
||||||
{
|
{
|
||||||
// 6.1- Declare positive acquisition using a message port
|
// Declare positive acquisition using a message port
|
||||||
//0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
// 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||||
DLOG(INFO) << "positive acquisition"
|
DLOG(INFO) << "positive acquisition"
|
||||||
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||||
<< ", sample_stamp " << d_sample_counter
|
<< ", sample_stamp " << d_sample_counter
|
||||||
@ -365,8 +366,8 @@ void pcps_acquisition::send_positive_acquisition()
|
|||||||
|
|
||||||
void pcps_acquisition::send_negative_acquisition()
|
void pcps_acquisition::send_negative_acquisition()
|
||||||
{
|
{
|
||||||
// 6.2- Declare negative acquisition using a message port
|
// Declare negative acquisition using a message port
|
||||||
//0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
// 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||||
DLOG(INFO) << "negative acquisition"
|
DLOG(INFO) << "negative acquisition"
|
||||||
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||||
<< ", sample_stamp " << d_sample_counter
|
<< ", sample_stamp " << d_sample_counter
|
||||||
@ -564,7 +565,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
|||||||
{
|
{
|
||||||
gr::thread::scoped_lock lk(d_setlock);
|
gr::thread::scoped_lock lk(d_setlock);
|
||||||
|
|
||||||
// initialize acquisition algorithm
|
// Initialize acquisition algorithm
|
||||||
int doppler = 0;
|
int doppler = 0;
|
||||||
uint32_t indext = 0;
|
uint32_t indext = 0;
|
||||||
int effective_fft_size = (acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size);
|
int effective_fft_size = (acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size);
|
||||||
@ -658,7 +659,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
|||||||
{
|
{
|
||||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in, d_grid_doppler_wipeoffs_step_two[doppler_index], d_fft_size);
|
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in, d_grid_doppler_wipeoffs_step_two[doppler_index], d_fft_size);
|
||||||
|
|
||||||
// 3- Perform the FFT-based convolution (parallel time search)
|
// Perform the FFT-based convolution (parallel time search)
|
||||||
// Compute the FFT of the carrier wiped--off incoming signal
|
// Compute the FFT of the carrier wiped--off incoming signal
|
||||||
d_fft_if->execute();
|
d_fft_if->execute();
|
||||||
|
|
||||||
@ -803,7 +804,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
|||||||
{
|
{
|
||||||
if (!acq_parameters.blocking_on_standby)
|
if (!acq_parameters.blocking_on_standby)
|
||||||
{
|
{
|
||||||
d_sample_counter += d_consumed_samples * ninput_items[0];
|
d_sample_counter += ninput_items[0];
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
}
|
}
|
||||||
if (d_step_two)
|
if (d_step_two)
|
||||||
@ -820,7 +821,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
//restart acquisition variables
|
// Restart acquisition variables
|
||||||
d_gnss_synchro->Acq_delay_samples = 0.0;
|
d_gnss_synchro->Acq_delay_samples = 0.0;
|
||||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||||
@ -828,25 +829,58 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
|||||||
d_input_power = 0.0;
|
d_input_power = 0.0;
|
||||||
d_test_statistics = 0.0;
|
d_test_statistics = 0.0;
|
||||||
d_state = 1;
|
d_state = 1;
|
||||||
|
d_buffer_count = 0;
|
||||||
if (!acq_parameters.blocking_on_standby)
|
if (!acq_parameters.blocking_on_standby)
|
||||||
{
|
{
|
||||||
d_sample_counter += d_consumed_samples * ninput_items[0]; // sample counter
|
d_sample_counter += ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
// Copy the data to the core and let it know that new data is available
|
unsigned int buff_increment;
|
||||||
if (d_cshort)
|
if (d_cshort)
|
||||||
{
|
{
|
||||||
memcpy(d_data_buffer_sc, input_items[0], d_consumed_samples * sizeof(lv_16sc_t));
|
const lv_16sc_t* in = reinterpret_cast<const lv_16sc_t*>(input_items[0]); // Get the input samples pointer
|
||||||
|
if ((ninput_items[0] + d_buffer_count) <= d_consumed_samples)
|
||||||
|
{
|
||||||
|
buff_increment = ninput_items[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buff_increment = d_consumed_samples - d_buffer_count;
|
||||||
|
}
|
||||||
|
memcpy(&d_data_buffer_sc[d_buffer_count], in, sizeof(lv_16sc_t) * buff_increment);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy(d_data_buffer, input_items[0], d_consumed_samples * sizeof(gr_complex));
|
const gr_complex* in = reinterpret_cast<const gr_complex*>(input_items[0]); // Get the input samples pointer
|
||||||
|
if ((ninput_items[0] + d_buffer_count) <= d_consumed_samples)
|
||||||
|
{
|
||||||
|
buff_increment = ninput_items[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buff_increment = d_consumed_samples - d_buffer_count;
|
||||||
|
}
|
||||||
|
memcpy(&d_data_buffer[d_buffer_count], in, sizeof(gr_complex) * buff_increment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If buffer will be full in next iteration
|
||||||
|
if (d_buffer_count >= d_consumed_samples)
|
||||||
|
{
|
||||||
|
d_state = 2;
|
||||||
|
}
|
||||||
|
d_buffer_count += buff_increment;
|
||||||
|
d_sample_counter += buff_increment;
|
||||||
|
consume_each(buff_increment);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
// Copy the data to the core and let it know that new data is available
|
||||||
if (acq_parameters.blocking)
|
if (acq_parameters.blocking)
|
||||||
{
|
{
|
||||||
lk.unlock();
|
lk.unlock();
|
||||||
@ -857,8 +891,8 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
|||||||
gr::thread::thread d_worker(&pcps_acquisition::acquisition_core, this, d_sample_counter);
|
gr::thread::thread d_worker(&pcps_acquisition::acquisition_core, this, d_sample_counter);
|
||||||
d_worker_active = true;
|
d_worker_active = true;
|
||||||
}
|
}
|
||||||
d_sample_counter += d_consumed_samples;
|
consume_each(0);
|
||||||
consume_each(1);
|
d_buffer_count = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,6 +135,7 @@ private:
|
|||||||
arma::fmat grid_;
|
arma::fmat grid_;
|
||||||
long int d_dump_number;
|
long int d_dump_number;
|
||||||
unsigned int d_dump_channel;
|
unsigned int d_dump_channel;
|
||||||
|
unsigned int d_buffer_count;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~pcps_acquisition();
|
~pcps_acquisition();
|
||||||
|
@ -129,8 +129,8 @@ static inline void volk_gnsssdr_32f_xn_fast_resampler_32f_xn_a_sse3(float** resu
|
|||||||
const __m128i zeros = _mm_setzero_si128();
|
const __m128i zeros = _mm_setzero_si128();
|
||||||
const __m128 code_length_chips_reg_f = _mm_set_ps1((float)code_length_chips);
|
const __m128 code_length_chips_reg_f = _mm_set_ps1((float)code_length_chips);
|
||||||
const __m128i code_length_chips_reg_i = _mm_set1_epi32((int)code_length_chips);
|
const __m128i code_length_chips_reg_i = _mm_set1_epi32((int)code_length_chips);
|
||||||
__m128i local_code_chip_index_reg, aux_i, negatives;
|
__m128i local_code_chip_index_reg, aux_i, negatives, i;
|
||||||
__m128 aux, aux2, aux3, indexnn, shifts_chips_reg, i, fi, igx, j, c, cTrunc, base;
|
__m128 aux, aux2, aux3, indexnn, shifts_chips_reg, fi, igx, j, c, cTrunc, base;
|
||||||
__m128 indexn = _mm_set_ps(3.0f, 2.0f, 1.0f, 0.0f);
|
__m128 indexn = _mm_set_ps(3.0f, 2.0f, 1.0f, 0.0f);
|
||||||
|
|
||||||
shifts_chips_reg = _mm_set_ps1((float)shifts_chips[0]);
|
shifts_chips_reg = _mm_set_ps1((float)shifts_chips[0]);
|
||||||
@ -214,8 +214,8 @@ static inline void volk_gnsssdr_32f_xn_fast_resampler_32f_xn_u_sse3(float** resu
|
|||||||
const __m128i zeros = _mm_setzero_si128();
|
const __m128i zeros = _mm_setzero_si128();
|
||||||
const __m128 code_length_chips_reg_f = _mm_set_ps1((float)code_length_chips);
|
const __m128 code_length_chips_reg_f = _mm_set_ps1((float)code_length_chips);
|
||||||
const __m128i code_length_chips_reg_i = _mm_set1_epi32((int)code_length_chips);
|
const __m128i code_length_chips_reg_i = _mm_set1_epi32((int)code_length_chips);
|
||||||
__m128i local_code_chip_index_reg, aux_i, negatives;
|
__m128i local_code_chip_index_reg, aux_i, negatives, i;
|
||||||
__m128 aux, aux2, aux3, indexnn, shifts_chips_reg, i, fi, igx, j, c, cTrunc, base;
|
__m128 aux, aux2, aux3, indexnn, shifts_chips_reg, fi, igx, j, c, cTrunc, base;
|
||||||
__m128 indexn = _mm_set_ps(3.0f, 2.0f, 1.0f, 0.0f);
|
__m128 indexn = _mm_set_ps(3.0f, 2.0f, 1.0f, 0.0f);
|
||||||
|
|
||||||
shifts_chips_reg = _mm_set_ps1((float)shifts_chips[0]);
|
shifts_chips_reg = _mm_set_ps1((float)shifts_chips[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user