1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-14 05:44:56 +00:00

Remove old code from acquisition adapters

This commit is contained in:
Carles Fernandez 2019-11-24 11:33:32 +01:00
parent a6300b7ccb
commit f2a537e403
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
20 changed files with 11 additions and 344 deletions

View File

@ -37,7 +37,6 @@
#include "beidou_b1i_signal_processing.h" #include "beidou_b1i_signal_processing.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
@ -103,18 +102,7 @@ void BeidouB1iPcpsAcquisition::stop_acquisition()
void BeidouB1iPcpsAcquisition::set_threshold(float threshold) void BeidouB1iPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + ".pfa", 0.0);
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -185,23 +173,6 @@ void BeidouB1iPcpsAcquisition::set_state(int state)
} }
float BeidouB1iPcpsAcquisition::calculate_threshold(float pfa)
{
// Calculate the threshold
uint32_t frequency_bins = 0;
frequency_bins = (2 * doppler_max_ + doppler_step_) / doppler_step_;
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
uint32_t ncells = vector_length_ * frequency_bins;
double exponent = 1 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void BeidouB1iPcpsAcquisition::connect(gr::top_block_sptr top_block) void BeidouB1iPcpsAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_ == "gr_complex") if (item_type_ == "gr_complex")

View File

@ -183,7 +183,6 @@ private:
unsigned int num_codes_; unsigned int num_codes_;
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_BEIDOU_B1I_PCPS_ACQUISITION_H_ */ #endif /* GNSS_SDR_BEIDOU_B1I_PCPS_ACQUISITION_H_ */

View File

@ -35,7 +35,6 @@
#include "beidou_b3i_signal_processing.h" #include "beidou_b3i_signal_processing.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <algorithm> #include <algorithm>
@ -101,22 +100,7 @@ void BeidouB3iPcpsAcquisition::stop_acquisition()
void BeidouB3iPcpsAcquisition::set_threshold(float threshold) void BeidouB3iPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
if (pfa == 0.0)
{
pfa = configuration_->property(role_ + ".pfa", 0.0);
}
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -186,23 +170,6 @@ void BeidouB3iPcpsAcquisition::set_state(int state)
} }
float BeidouB3iPcpsAcquisition::calculate_threshold(float pfa)
{
// Calculate the threshold
unsigned int frequency_bins = 0;
frequency_bins = (2 * doppler_max_ + doppler_step_) / doppler_step_;
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
double exponent = 1.0 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void BeidouB3iPcpsAcquisition::connect(gr::top_block_sptr top_block) void BeidouB3iPcpsAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_ == "gr_complex") if (item_type_ == "gr_complex")

View File

@ -182,7 +182,6 @@ private:
unsigned int num_codes_; unsigned int num_codes_;
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_BEIDOU_B3I_PCPS_ACQUISITION_H_ */ #endif /* GNSS_SDR_BEIDOU_B3I_PCPS_ACQUISITION_H_ */

View File

@ -103,23 +103,7 @@ void GalileoE1PcpsAmbiguousAcquisition::stop_acquisition()
void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold) void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
if (pfa == 0.0)
{
pfa = configuration_->property(role_ + ".pfa", 0.0);
}
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -231,27 +215,6 @@ void GalileoE1PcpsAmbiguousAcquisition::set_state(int state)
} }
float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa)
{
unsigned int frequency_bins = 0;
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
{
frequency_bins++;
}
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
double exponent = 1 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block) void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_ == "gr_complex") if (item_type_ == "gr_complex")

View File

@ -188,7 +188,6 @@ private:
std::string role_; std::string role_;
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_ */ #endif /* GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_ */

View File

@ -34,7 +34,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "galileo_e5_signal_processing.h" #include "galileo_e5_signal_processing.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <volk_gnsssdr/volk_gnsssdr_complex.h> #include <volk_gnsssdr/volk_gnsssdr_complex.h>
#include <algorithm> #include <algorithm>
@ -103,24 +102,7 @@ void GalileoE5aPcpsAcquisition::stop_acquisition()
void GalileoE5aPcpsAcquisition::set_threshold(float threshold) void GalileoE5aPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
if (pfa == 0.0)
{
pfa = configuration_->property(role_ + ".pfa", 0.0);
}
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -211,25 +193,6 @@ void GalileoE5aPcpsAcquisition::reset()
} }
float GalileoE5aPcpsAcquisition::calculate_threshold(float pfa)
{
unsigned int frequency_bins = 0;
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
{
frequency_bins++;
}
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
double exponent = 1 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void GalileoE5aPcpsAcquisition::set_state(int state) void GalileoE5aPcpsAcquisition::set_state(int state)
{ {
acquisition_->set_state(state); acquisition_->set_state(state);

View File

@ -154,7 +154,6 @@ public:
void set_resampler_latency(uint32_t latency_samples) override; void set_resampler_latency(uint32_t latency_samples) override;
private: private:
float calculate_threshold(float pfa);
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_acquisition_sptr acquisition_; pcps_acquisition_sptr acquisition_;
Acq_Conf acq_parameters_; Acq_Conf acq_parameters_;

View File

@ -37,7 +37,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "glonass_l1_signal_processing.h" #include "glonass_l1_signal_processing.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <algorithm> #include <algorithm>
@ -104,18 +103,7 @@ void GlonassL1CaPcpsAcquisition::stop_acquisition()
void GlonassL1CaPcpsAcquisition::set_threshold(float threshold) void GlonassL1CaPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + ".pfa", 0.0);
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -187,31 +175,6 @@ void GlonassL1CaPcpsAcquisition::set_state(int state)
} }
float GlonassL1CaPcpsAcquisition::calculate_threshold(float pfa)
{
// Calculate the threshold
unsigned int frequency_bins = 0;
/*
for (int doppler = (int)(-doppler_max_); doppler <= (int)doppler_max_; doppler += doppler_step_)
{
frequency_bins++;
}
*/
frequency_bins = (2 * doppler_max_ + doppler_step_) / doppler_step_;
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
double exponent = 1 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_ == "gr_complex") if (item_type_ == "gr_complex")

View File

@ -178,7 +178,6 @@ private:
std::string role_; std::string role_;
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_GLONASS_L1_CA_PCPS_ACQUISITION_H_ */ #endif /* GNSS_SDR_GLONASS_L1_CA_PCPS_ACQUISITION_H_ */

View File

@ -36,7 +36,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "glonass_l2_signal_processing.h" #include "glonass_l2_signal_processing.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <algorithm> #include <algorithm>
@ -103,18 +102,7 @@ void GlonassL2CaPcpsAcquisition::stop_acquisition()
void GlonassL2CaPcpsAcquisition::set_threshold(float threshold) void GlonassL2CaPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + ".pfa", 0.0);
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -186,31 +174,6 @@ void GlonassL2CaPcpsAcquisition::set_state(int state)
} }
float GlonassL2CaPcpsAcquisition::calculate_threshold(float pfa)
{
// Calculate the threshold
unsigned int frequency_bins = 0;
/*
for (int doppler = (int)(-doppler_max_); doppler <= (int)doppler_max_; doppler += doppler_step_)
{
frequency_bins++;
}
*/
frequency_bins = (2 * doppler_max_ + doppler_step_) / doppler_step_;
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
double exponent = 1 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block) void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_ == "gr_complex") if (item_type_ == "gr_complex")

View File

@ -177,7 +177,6 @@ private:
std::string role_; std::string role_;
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_GLONASS_L2_CA_PCPS_ACQUISITION_H_ */ #endif /* GNSS_SDR_GLONASS_L2_CA_PCPS_ACQUISITION_H_ */

View File

@ -39,7 +39,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gsl/gsl> #include <gsl/gsl>
#include <algorithm> #include <algorithm>
@ -107,18 +106,7 @@ void GpsL1CaPcpsAcquisition::stop_acquisition()
void GpsL1CaPcpsAcquisition::set_threshold(float threshold) void GpsL1CaPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + ".pfa", 0.0);
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -202,26 +190,6 @@ void GpsL1CaPcpsAcquisition::set_state(int state)
} }
float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa)
{
// Calculate the threshold
unsigned int frequency_bins = 0;
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
{
frequency_bins++;
}
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
double exponent = 1 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_ == "gr_complex") if (item_type_ == "gr_complex")

View File

@ -190,7 +190,6 @@ private:
std::string role_; std::string role_;
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_H_ */ #endif /* GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_H_ */

View File

@ -37,7 +37,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "gps_l2c_signal.h" #include "gps_l2c_signal.h"
#include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <algorithm> #include <algorithm>
@ -103,22 +102,7 @@ void GpsL2MPcpsAcquisition::stop_acquisition()
void GpsL2MPcpsAcquisition::set_threshold(float threshold) void GpsL2MPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
if (pfa == 0.0)
{
pfa = configuration_->property(role_ + ".pfa", 0.0);
}
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -205,26 +189,6 @@ void GpsL2MPcpsAcquisition::set_state(int state)
} }
float GpsL2MPcpsAcquisition::calculate_threshold(float pfa)
{
// Calculate the threshold
unsigned int frequency_bins = 0;
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
{
frequency_bins++;
}
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
double exponent = 1.0 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block) void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_ == "gr_complex") if (item_type_ == "gr_complex")

View File

@ -188,7 +188,6 @@ private:
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
unsigned int num_codes_; unsigned int num_codes_;
float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_H_ */ #endif /* GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_H_ */

View File

@ -37,7 +37,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "gps_l5_signal.h" #include "gps_l5_signal.h"
#include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <algorithm> #include <algorithm>
@ -105,22 +104,7 @@ void GpsL5iPcpsAcquisition::stop_acquisition()
void GpsL5iPcpsAcquisition::set_threshold(float threshold) void GpsL5iPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
if (pfa == 0.0)
{
pfa = configuration_->property(role_ + ".pfa", 0.0);
}
if (pfa == 0.0)
{
threshold_ = threshold; threshold_ = threshold;
}
else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_->set_threshold(threshold_); acquisition_->set_threshold(threshold_);
} }
@ -207,26 +191,6 @@ void GpsL5iPcpsAcquisition::set_state(int state)
} }
float GpsL5iPcpsAcquisition::calculate_threshold(float pfa)
{
// Calculate the threshold
unsigned int frequency_bins = 0;
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
{
frequency_bins++;
}
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
double exponent = 1.0 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
boost::math::exponential_distribution<double> mydist(lambda);
auto threshold = static_cast<float>(quantile(mydist, val));
return threshold;
}
void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block) void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_ == "gr_complex") if (item_type_ == "gr_complex")

View File

@ -188,7 +188,6 @@ private:
unsigned int num_codes_; unsigned int num_codes_;
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_H_ */ #endif /* GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_H_ */

View File

@ -665,14 +665,6 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
lk.unlock(); lk.unlock();
//if (d_use_CFAR_algorithm_flag or acq_parameters.bit_transition_flag)
//{
//// Compute the input signal power estimation
//volk_32fc_magnitude_squared_32f(d_tmp_buffer.data(), in, d_fft_size);
//volk_32f_accumulator_s32f(&d_input_power, d_tmp_buffer.data(), d_fft_size);
//d_input_power /= static_cast<float>(d_fft_size);
//}
// Doppler frequency grid loop // Doppler frequency grid loop
if (!d_step_two) if (!d_step_two)
{ {
@ -930,7 +922,7 @@ void pcps_acquisition::calculate_threshold()
int num_bins = effective_fft_size * num_doppler_bins; int num_bins = effective_fft_size * num_doppler_bins;
d_threshold = 2.0 * boost::math::gamma_p_inv(2 * acq_parameters.max_dwells, std::pow(1.0 - pfa, 1.0 / static_cast<double>(num_bins))); d_threshold = 2.0 * boost::math::gamma_p_inv(2.0 * acq_parameters.max_dwells, std::pow(1.0 - pfa, 1.0 / static_cast<float>(num_bins)));
} }
@ -977,8 +969,6 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
d_gnss_synchro->Acq_samplestamp_samples = 0ULL; d_gnss_synchro->Acq_samplestamp_samples = 0ULL;
d_gnss_synchro->Acq_doppler_step = 0U; d_gnss_synchro->Acq_doppler_step = 0U;
d_mag = 0.0; d_mag = 0.0;
d_input_power = 0.0;
d_test_statistics = 0.0;
d_state = 1; d_state = 1;
d_buffer_count = 0U; d_buffer_count = 0U;
if (!acq_parameters.blocking_on_standby) if (!acq_parameters.blocking_on_standby)

View File

@ -44,7 +44,7 @@ Acq_Conf::Acq_Conf()
chips_per_second = 1023000; chips_per_second = 1023000;
doppler_max = 5000; doppler_max = 5000;
doppler_min = -5000; doppler_min = -5000;
doppler_step = 0.0; doppler_step = 250.0;
num_doppler_bins_step2 = 4U; num_doppler_bins_step2 = 4U;
doppler_step2 = 125.0; doppler_step2 = 125.0;
pfa = 0.0; pfa = 0.0;