1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-12 13:23:09 +00:00

Extend acquisition performance test to other implementations. set_state(int state) is now amandatory member for acquisition adapters

This commit is contained in:
Carles Fernandez
2018-07-04 13:05:44 +02:00
parent 16d9e25137
commit 3f0a7ef4fa
23 changed files with 99 additions and 43 deletions

View File

@@ -32,12 +32,11 @@
#ifndef GNSS_SDR_GALILEO_E1_PCPS_8MS_AMBIGUOUS_ACQUISITION_H_
#define GNSS_SDR_GALILEO_E1_PCPS_8MS_AMBIGUOUS_ACQUISITION_H_
#include <string>
#include <gnuradio/blocks/stream_to_vector.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "galileo_pcps_8ms_acquisition_cc.h"
#include <gnuradio/blocks/stream_to_vector.h>
#include <string>
class ConfigurationInterface;
@@ -123,6 +122,7 @@ public:
* \brief Restart acquisition algorithm
*/
void reset() override;
void set_state(int state) override{};
private:
ConfigurationInterface* configuration_;

View File

@@ -130,7 +130,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -32,12 +32,11 @@
#ifndef GNSS_SDR_GALILEO_E1_PCPS_CCCWSR_AMBIGUOUS_ACQUISITION_H_
#define GNSS_SDR_GALILEO_E1_PCPS_CCCWSR_AMBIGUOUS_ACQUISITION_H_
#include <string>
#include <gnuradio/blocks/stream_to_vector.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_cccwsr_acquisition_cc.h"
#include <gnuradio/blocks/stream_to_vector.h>
#include <string>
class ConfigurationInterface;
@@ -124,7 +123,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -32,11 +32,11 @@
#ifndef GNSS_SDR_GALILEO_E1_PCPS_QUICKSYNC_AMBIGUOUS_ACQUISITION_H_
#define GNSS_SDR_GALILEO_E1_PCPS_QUICKSYNC_AMBIGUOUS_ACQUISITION_H_
#include <string>
#include <gnuradio/blocks/stream_to_vector.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_quicksync_acquisition_cc.h"
#include <gnuradio/blocks/stream_to_vector.h>
#include <string>
class ConfigurationInterface;
@@ -127,7 +127,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -32,12 +32,11 @@
#ifndef GNSS_SDR_GALILEO_E1_PCPS_TONG_AMBIGUOUS_ACQUISITION_H_
#define GNSS_SDR_GALILEO_E1_PCPS_TONG_AMBIGUOUS_ACQUISITION_H_
#include <string>
#include <gnuradio/blocks/stream_to_vector.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_tong_acquisition_cc.h"
#include <gnuradio/blocks/stream_to_vector.h>
#include <string>
class ConfigurationInterface;
@@ -127,7 +126,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -38,10 +38,10 @@
#ifndef GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_H_
#define GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_H_
#include <string>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "galileo_e5a_noncoherent_iq_acquisition_caf_cc.h"
#include <string>
class ConfigurationInterface;
@@ -129,7 +129,7 @@ public:
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -121,7 +121,7 @@ public:
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
void set_state(int state) override;
private:
float calculate_threshold(float pfa);

View File

@@ -130,7 +130,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -129,7 +129,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -134,7 +134,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -33,11 +33,11 @@
*/
#include "gps_l1_ca_pcps_acquisition_fine_doppler.h"
#include <glog/logging.h>
#include "gps_sdr_signal_processing.h"
#include "GPS_L1_CA.h"
#include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include <glog/logging.h>
using google::LogMessage;
@@ -161,6 +161,12 @@ void GpsL1CaPcpsAcquisitionFineDoppler::reset()
}
void GpsL1CaPcpsAcquisitionFineDoppler::set_state(int state)
{
acquisition_cc_->set_state(state);
}
void GpsL1CaPcpsAcquisitionFineDoppler::connect(boost::shared_ptr<gr::top_block> top_block)
{
if (top_block)

View File

@@ -34,11 +34,10 @@
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FINE_DOPPLER_H_
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FINE_DOPPLER_H_
#include <string>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_acquisition_fine_doppler_cc.h"
#include <string>
class ConfigurationInterface;
@@ -122,6 +121,11 @@ public:
*/
void reset() override;
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state) override;
private:
pcps_acquisition_fine_doppler_cc_sptr acquisition_cc_;
size_t item_size_;

View File

@@ -132,7 +132,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -34,11 +34,10 @@
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_ASSISTED_ACQUISITION_H_
#define GNSS_SDR_GPS_L1_CA_PCPS_ASSISTED_ACQUISITION_H_
#include <string>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_assisted_acquisition_cc.h"
#include <string>
class ConfigurationInterface;
@@ -121,6 +120,7 @@ public:
* \brief Restart acquisition algorithm
*/
void reset() override;
void set_state(int state) override{};
private:
pcps_assisted_acquisition_cc_sptr acquisition_cc_;

View File

@@ -32,12 +32,11 @@
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_OPENCL_ACQUISITION_H_
#define GNSS_SDR_GPS_L1_CA_PCPS_OPENCL_ACQUISITION_H_
#include <string>
#include <gnuradio/blocks/stream_to_vector.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_opencl_acquisition_cc.h"
#include <gnuradio/blocks/stream_to_vector.h>
#include <string>
class ConfigurationInterface;
@@ -123,6 +122,7 @@ public:
* \brief Restart acquisition algorithm
*/
void reset() override;
void set_state(int state) override{};
private:
ConfigurationInterface* configuration_;

View File

@@ -33,13 +33,12 @@
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_
#define GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_
#include <string>
#include <gnuradio/blocks/stream_to_vector.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_quicksync_acquisition_cc.h"
#include "configuration_interface.h"
#include <gnuradio/blocks/stream_to_vector.h>
#include <string>
class ConfigurationInterface;
@@ -129,7 +128,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -32,12 +32,12 @@
#ifndef GNSS_SDR_GPS_L1_CA_TONG_ACQUISITION_H_
#define GNSS_SDR_GPS_L1_CA_TONG_ACQUISITION_H_
#include <string>
#include <gnuradio/blocks/stream_to_vector.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_tong_acquisition_cc.h"
#include "configuration_interface.h"
#include <gnuradio/blocks/stream_to_vector.h>
#include <string>
class ConfigurationInterface;
@@ -127,7 +127,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -132,7 +132,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -132,7 +132,7 @@ public:
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state);
void set_state(int state) override;
private:
ConfigurationInterface* configuration_;

View File

@@ -424,6 +424,30 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star
}
void pcps_acquisition_fine_doppler_cc::set_state(int state)
{
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
d_state = state;
if (d_state == 1)
{
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;
d_gnss_synchro->Acq_samplestamp_samples = 0;
d_well_count = 0;
d_input_power = 0.0;
d_test_statistics = 0.0;
d_active = true;
}
else if (d_state == 0)
{
}
else
{
LOG(ERROR) << "State can only be set to 0 or 1";
}
}
int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items __attribute__((unused)))

View File

@@ -214,6 +214,13 @@ public:
*/
void set_doppler_step(unsigned int doppler_step);
/*!
* \brief If set to 1, ensures that acquisition starts at the
* first available sample.
* \param state - int=1 forces start of acquisition
*/
void set_state(int state);
/*!
* \brief Parallel Code Phase Search Acquisition signal processing.
*/