1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 20:50:33 +00:00

Add doppler_step flag

This commit is contained in:
Carles Fernandez 2018-02-25 01:00:17 +01:00
parent 12f61c6d19
commit eb0b01d0aa
3 changed files with 40 additions and 26 deletions

View File

@ -33,6 +33,7 @@
#include <boost/lexical_cast.hpp>
#include <glog/logging.h>
#include "configuration_interface.h"
#include "gnss_sdr_flags.h"
using google::LogMessage;
@ -74,8 +75,9 @@ Channel::Channel(ConfigurationInterface *configuration, unsigned int channel,
// IMPORTANT: Do not change the order between set_doppler_step and set_threshold
unsigned int doppler_step = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".doppler_step" ,0);
if(doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_+".doppler_step", 500);
unsigned int doppler_step = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".doppler_step", 0);
if(doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_ + ".doppler_step", 500);
if(FLAGS_doppler_step != 0) doppler_step = static_cast<unsigned int>(FLAGS_doppler_step);
DLOG(INFO) << "Channel "<< channel_ << " Doppler_step = " << doppler_step;
acq_->set_doppler_step(doppler_step);

View File

@ -33,29 +33,31 @@
#include <cstdint>
#include <iostream>
DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)");
DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file).");
DEFINE_string(s, "-",
"If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source)");
"If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source).");
DEFINE_string(signal_source, "-",
"If defined, path to the file containing the signal samples (overrides the configuration file)");
"If defined, path to the file containing the signal samples (overrides the configuration file).");
DEFINE_int32(doppler_max, 0, "If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)");
DEFINE_int32(doppler_max, 0, "If defined, sets the maximum Doppler value in the search grid, in Hz (overrides the configuration file).");
DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation");
DEFINE_int32(doppler_step, 0, "If defined, sets the frequency step in the search grid, in Hz (overrides the configuration file).");
DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)");
DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation.");
DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite");
DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz).");
DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)");
DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite.");
DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)");
DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad).");
DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)");
DEFINE_string(RINEX_version, "-", "If defined, specifies the RINEX version (2.11 or 3.02). Overrides the configuration file.");
DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)");
DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file).");
DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file).");
#if GFLAGS_GREATER_2_0
@ -68,6 +70,14 @@ static bool ValidateDopplerMax(const char* flagname, int32_t value)
return false;
}
static bool ValidateDopplerStep(const char* flagname, int32_t value)
{
if (value >= 0 && value < 10000) // value is ok
return true;
std::cout << "Invalid value for " << flagname << ": " << value << std::endl;
return false;
}
static bool ValidateCn0Samples(const char* flagname, int32_t value)
{
if (value > 0 && value < 10000) // value is ok
@ -118,6 +128,7 @@ static bool ValidatePllBw(const char* flagname, double value)
DEFINE_validator(doppler_max, &ValidateDopplerMax);
DEFINE_validator(doppler_step, &ValidateDopplerStep);
DEFINE_validator(cn0_samples, &ValidateCn0Samples);
DEFINE_validator(cn0_min, &ValidateCn0Min);
DEFINE_validator(max_lock_fail, &ValidateMaxLockFail);

View File

@ -34,28 +34,29 @@
#include <gflags/gflags.h>
DECLARE_string(c); //<! Path to the configuration file
DECLARE_string(config_file); //<! Path to the configuration file
DECLARE_string(c); //<! Path to the configuration file.
DECLARE_string(config_file); //<! Path to the configuration file.
DECLARE_string(log_dir); //<! Path to the folder in which logging will be stored
DECLARE_string(log_dir); //<! Path to the folder in which logging will be stored.
// Declare flags for signal sources
DECLARE_string(s); //<! Path to the file containing the signal samples
DECLARE_string(signal_source); //<! Path to the file containing the signal samples
DECLARE_string(s); //<! Path to the file containing the signal samples.
DECLARE_string(signal_source); //<! Path to the file containing the signal samples.
// Declare flags for acquisition blocks
DECLARE_int32(doppler_max); //<!If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)
DECLARE_int32(doppler_max); //<! If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file).
DECLARE_int32(doppler_step); //<! If defined, sets the frequency step in the search grid, in Hz, in Hz (overrides the configuration file).
// Declare flags for tracking blocks
DECLARE_int32(cn0_samples); //<! Number of correlator outputs used for CN0 estimation
DECLARE_int32(cn0_min); //<! Minimum valid CN0 (in dB-Hz)
DECLARE_int32(max_lock_fail); //<! Number number of lock failures before dropping satellite
DECLARE_double(carrier_lock_th); //<! Carrier lock threshold (in rad)
DECLARE_double(dll_bw_hz); //<! Bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)
DECLARE_double(pll_bw_hz); //<! Bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)
DECLARE_int32(cn0_samples); //<! Number of correlator outputs used for CN0 estimation.
DECLARE_int32(cn0_min); //<! Minimum valid CN0 (in dB-Hz).
DECLARE_int32(max_lock_fail); //<! Number number of lock failures before dropping satellite.
DECLARE_double(carrier_lock_th); //<! Carrier lock threshold (in rad).
DECLARE_double(dll_bw_hz); //<! Bandwidth of the DLL low pass filter, in Hz (overrides the configuration file).
DECLARE_double(pll_bw_hz); //<! Bandwidth of the PLL low pass filter, in Hz (overrides the configuration file).
// Declare flags for PVT
DECLARE_string(RINEX_version); //<! RINEX version
DECLARE_string(RINEX_version); //<! If defined, specifies the RINEX version (2.11 or 3.02). Overrides the configuration file.
#endif