mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-19 12:30:35 +00:00
Fix existing conf files using threshold instead of pfa
This commit is contained in:
parent
0cd60b5fa1
commit
134ddd8561
@ -46,8 +46,8 @@ Acq_Conf::Acq_Conf()
|
|||||||
doppler_min = -5000;
|
doppler_min = -5000;
|
||||||
num_doppler_bins_step2 = 4U;
|
num_doppler_bins_step2 = 4U;
|
||||||
doppler_step2 = 125.0;
|
doppler_step2 = 125.0;
|
||||||
pfa = 0.001;
|
pfa = 0.0;
|
||||||
pfa2 = 0.001;
|
pfa2 = 0.0;
|
||||||
fs_in = 4000000;
|
fs_in = 4000000;
|
||||||
samples_per_ms = 0.0;
|
samples_per_ms = 0.0;
|
||||||
samples_per_code = 0.0;
|
samples_per_code = 0.0;
|
||||||
@ -67,6 +67,7 @@ Acq_Conf::Acq_Conf()
|
|||||||
resampler_latency_samples = 0U;
|
resampler_latency_samples = 0U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Acq_Conf::SetFromConfiguration(ConfigurationInterface *configuration,
|
void Acq_Conf::SetFromConfiguration(ConfigurationInterface *configuration,
|
||||||
const std::string &role, double chip_rate, double opt_freq)
|
const std::string &role, double chip_rate, double opt_freq)
|
||||||
{
|
{
|
||||||
@ -120,9 +121,16 @@ void Acq_Conf::SetFromConfiguration(ConfigurationInterface *configuration,
|
|||||||
make_2_steps = configuration->property(role + ".make_two_steps", make_2_steps);
|
make_2_steps = configuration->property(role + ".make_two_steps", make_2_steps);
|
||||||
blocking_on_standby = configuration->property(role + ".blocking_on_standby", blocking_on_standby);
|
blocking_on_standby = configuration->property(role + ".blocking_on_standby", blocking_on_standby);
|
||||||
|
|
||||||
|
if (pfa <= 0.0)
|
||||||
|
{
|
||||||
|
// if pfa is not set, we use the first_vs_second_peak_statistic metric
|
||||||
|
use_CFAR_algorithm_flag = false;
|
||||||
|
}
|
||||||
|
|
||||||
SetDerivedParams();
|
SetDerivedParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Acq_Conf::ConfigureAutomaticResampler(double opt_freq)
|
void Acq_Conf::ConfigureAutomaticResampler(double opt_freq)
|
||||||
{
|
{
|
||||||
if (use_automatic_resampler)
|
if (use_automatic_resampler)
|
||||||
@ -143,6 +151,7 @@ void Acq_Conf::ConfigureAutomaticResampler(double opt_freq)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Acq_Conf::SetDerivedParams()
|
void Acq_Conf::SetDerivedParams()
|
||||||
{
|
{
|
||||||
samples_per_ms = static_cast<float>(resampled_fs) * 0.001;
|
samples_per_ms = static_cast<float>(resampled_fs) * 0.001;
|
||||||
|
@ -193,8 +193,11 @@ int PositionSystemTest::configure_receiver()
|
|||||||
const int number_of_channels = 11;
|
const int number_of_channels = 11;
|
||||||
const int in_acquisition = 1;
|
const int in_acquisition = 1;
|
||||||
|
|
||||||
|
const float threshold = 2.5;
|
||||||
const float doppler_max = 5000.0;
|
const float doppler_max = 5000.0;
|
||||||
const float doppler_step = 250.0;
|
const float doppler_step = 250.0;
|
||||||
|
const float pfa = 0.0;
|
||||||
|
const float pfa_second_step = 0.0;
|
||||||
const int max_dwells = 10;
|
const int max_dwells = 10;
|
||||||
const int tong_init_val = 2;
|
const int tong_init_val = 2;
|
||||||
const int tong_max_val = 10;
|
const int tong_max_val = 10;
|
||||||
@ -277,9 +280,9 @@ int PositionSystemTest::configure_receiver()
|
|||||||
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||||
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition_1C.coherent_integration_time_ms", std::to_string(coherent_integration_time_ms));
|
config->set_property("Acquisition_1C.coherent_integration_time_ms", std::to_string(coherent_integration_time_ms));
|
||||||
//config->set_property("Acquisition_1C.use_CFAR_algorithm", "false");
|
config->set_property("Acquisition_1C.threshold", std::to_string(threshold));
|
||||||
//config->set_property("Acquisition_1C.pfa", std::to_string(0.001));
|
config->set_property("Acquisition_1C.pfa", std::to_string(pfa));
|
||||||
//config->set_property("Acquisition_1C.pfa2", std::to_string(0.001));
|
config->set_property("Acquisition_1C.pfa_second_step", std::to_string(pfa_second_step));
|
||||||
config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max));
|
config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max));
|
||||||
config->set_property("Acquisition_1C.doppler_step", std::to_string(doppler_step));
|
config->set_property("Acquisition_1C.doppler_step", std::to_string(doppler_step));
|
||||||
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user