1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-25 20:47:39 +00:00

Merge branch 'next' into fix_observables

This commit is contained in:
Antonio Ramos
2018-02-26 10:12:47 +01:00
340 changed files with 1525 additions and 1352 deletions

View File

@@ -31,9 +31,7 @@
#include "complex_float_to_complex_byte.h"
#include <gnuradio/io_signature.h>
#include <volk/volk.h>
#include "volk_gnsssdr/volk_gnsssdr.h"
#include <volk_gnsssdr/volk_gnsssdr.h>
complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte()
@@ -47,7 +45,7 @@ complex_float_to_complex_byte::complex_float_to_complex_byte() : sync_block("com
gr::io_signature::make (1, 1, sizeof(gr_complex)),
gr::io_signature::make (1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex<signed char>
{
const int alignment_multiple = volk_get_alignment() / sizeof(lv_8sc_t);
const int alignment_multiple = volk_gnsssdr_get_alignment() / sizeof(lv_8sc_t);
set_alignment(std::max(1, alignment_multiple));
}

View File

@@ -31,9 +31,9 @@
*/
#include "galileo_e1_signal_processing.h"
#include <string>
#include "Galileo_E1.h"
#include "gnss_signal_processing.h"
#include <string>
void galileo_e1_code_gen_int(int* _dest, char _Signal[3], signed int _prn)

View File

@@ -32,9 +32,9 @@
*/
#include "galileo_e5_signal_processing.h"
#include <gnuradio/math.h>
#include "Galileo_E5a.h"
#include "gnss_signal_processing.h"
#include <gnuradio/gr_complex.h>

View File

@@ -29,33 +29,35 @@
*/
#include <gnss_sdr_flags.h>
#include "gnss_sdr_flags.h"
#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

View File

@@ -31,11 +31,11 @@
*/
#include "gnss_sdr_valve.h"
#include <algorithm> // for min
#include <cstring> // for memcpy
#include <gnuradio/io_signature.h>
#include "control_message_factory.h"
#include <glog/logging.h>
#include <gnuradio/io_signature.h>
#include <algorithm> // for min
#include <cstring> // for memcpy
gnss_sdr_valve::gnss_sdr_valve (size_t sizeof_stream_item,
unsigned long long nitems,

View File

@@ -32,8 +32,8 @@
*/
#include "gnss_signal_processing.h"
#include <gnuradio/fxpt_nco.h>
#include "GPS_L1_CA.h"
#include <gnuradio/fxpt_nco.h>
auto auxCeil2 = [](float x){ return static_cast<int>(static_cast<long>((x)+1)); };

View File

@@ -30,10 +30,10 @@
* -------------------------------------------------------------------------
*/
#include <gps_l2c_signal.h>
#include "gps_l2c_signal.h"
#include "GPS_L2C.h"
#include <cstdint>
#include <cmath>
#include "GPS_L2C.h"
int32_t gps_l2c_m_shift(int32_t x)

View File

@@ -30,12 +30,12 @@
* -------------------------------------------------------------------------
*/
#include <iostream>
#include <deque>
#include <cmath>
#include <cinttypes>
#include <complex>
#include "gps_l5_signal.h"
#include "GPS_L5.h"
#include <cinttypes>
#include <cmath>
#include <complex>
#include <deque>
std::deque<bool> l5i_xa_shift(std::deque<bool> xa)

View File

@@ -31,11 +31,10 @@
*/
#include "pass_through.h"
#include <iostream>
#include <complex>
#include "configuration_interface.h"
#include <glog/logging.h>
#include <volk/volk.h>
#include "configuration_interface.h"
#include <complex>
using google::LogMessage;

View File

@@ -33,13 +33,13 @@
#ifndef GNSS_SDR_PASS_THROUGH_H_
#define GNSS_SDR_PASS_THROUGH_H_
#include <string>
#include <gnuradio/hier_block2.h>
#include <gnuradio/blocks/copy.h>
#include "gnss_block_interface.h"
#include "conjugate_cc.h"
#include "conjugate_sc.h"
#include "conjugate_ic.h"
#include "gnss_block_interface.h"
#include <gnuradio/hier_block2.h>
#include <gnuradio/blocks/copy.h>
#include <string>
class ConfigurationInterface;

View File

@@ -53,6 +53,9 @@
#ifndef GNSS_SDR_RTKLIB_H_
#define GNSS_SDR_RTKLIB_H_
#include "MATH_CONSTANTS.h"
#include "gnss_frequencies.h"
#include "gnss_obs_codes.h"
#include <pthread.h>
#include <netinet/in.h>
#include <cctype>
@@ -60,9 +63,6 @@
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include "MATH_CONSTANTS.h"
#include "gnss_frequencies.h"
#include "gnss_obs_codes.h"
/* macros --------------------------------------------------------------------*/

View File

@@ -20,10 +20,11 @@
#include <config.h>
#endif
#include <volk_gnsssdr/constants.h>
#include "volk_gnsssdr/volk_gnsssdr.h"
#include <iostream>
#include "volk_gnsssdr_option_helpers.h"
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_get_alignment, volk_gnsssdr_get_machine
#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t
#include <volk_gnsssdr/constants.h> // for volk_gnsssdr_available_machines, volk_gnsssdr_c_compiler ...
#include <iostream> // for operator<<, endl, cout, ostream
#include <string> // for string
void print_alignment()
{

View File

@@ -17,8 +17,14 @@
*/
#include "volk_gnsssdr_option_helpers.h"
#include <climits> // IWYU pragma: keep
#include <cstdlib> // IWYU pragma: keep
#include <cstring> // IWYU pragma: keep
#include <exception> // for exception
#include <iostream> // for operator<<, endl, basic_ostream, cout, ostream
#include <utility> // for pair
#include <iostream>
/*
* Option type

View File

@@ -19,9 +19,13 @@
#ifndef VOLK_VOLK_OPTION_HELPERS_H
#define VOLK_VOLK_OPTION_HELPERS_H
#include <climits>
#include <cstring>
#include <map>
#include <string>
#include <vector>
typedef enum
{
VOID_CALLBACK,

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
/* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* This file is part of GNSS-SDR.
*
@@ -16,19 +16,24 @@
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
*/
#include "qa_utils.h"
#include "kernel_tests.h"
#include "volk_gnsssdr_option_helpers.h"
#include "kernel_tests.h" // for init_test_list
#include "qa_utils.h" // for volk_gnsssdr_test_results_t
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t
#include "volk_gnsssdr_profile.h"
#include "volk_gnsssdr/volk_gnsssdr_prefs.h" // for volk_gnsssdr_get_config_path
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<
#include <boost/filesystem/path_traits.hpp> // for filesystem
#include <sys/stat.h> // for stat
#include <cstddef> // for size_t
#include <iostream> // for operator<<, basic_ostream
#include <fstream> // IWYU pragma: keep
#include <map> // for map, map<>::iterator
#include <utility> // for pair
#include <vector> // for vector, vector<>::const_..
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <volk_gnsssdr/volk_gnsssdr_prefs.h>
#include <vector>
#include <boost/filesystem.hpp>
#include <iostream>
#include <fstream>
#include <sys/stat.h>
namespace fs = boost::filesystem;
@@ -222,7 +227,7 @@ void write_results(const std::vector<volk_gnsssdr_test_results_t> *results, bool
const fs::path config_path(path);
// Until we can update the config on a kernel by kernel basis
// do not overwrite volk_gnsssdr_config when using a regex.
if (not fs::exists(config_path.branch_path()))
if (! fs::exists(config_path.branch_path()))
{
std::cout << "Creating " << config_path.branch_path() << " ..." << std::endl;
fs::create_directories(config_path.branch_path());

View File

@@ -27,6 +27,12 @@
* -------------------------------------------------------------------------
*/
#include <cstdbool> // for bool
#include <iosfwd> // for ofstream
#include <string> // for string
#include <vector> // for vector
class volk_test_results_t;
void read_results(std::vector<volk_gnsssdr_test_results_t> *results);

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
/* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* This file is part of GNSS-SDR.
*
@@ -17,13 +17,25 @@
*/
#include "qa_utils.h"
#include <chrono>
#include <random>
#include <boost/foreach.hpp>
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
#include <volk_gnsssdr/volk_gnsssdr_cpu.h>
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t
#include "volk_gnsssdr/volk_gnsssdr_malloc.h" // for volk_gnsssdr_free, volk_gnsssdr_malloc
#include <boost/foreach.hpp> // for auto_any_base
#include <boost/lexical_cast.hpp> // for lexical_cast
#include <boost/token_functions.hpp> // for char_separator
#include <boost/token_iterator.hpp> // for token_iterator
#include <boost/tokenizer.hpp> // for tokenizer
#include <cassert> // for assert
#include <chrono> // for system_clock, duration,...
#include <cmath> // for sqrt, fabs, abs
#include <cstdint> // for uint16_t, uint64_t,int16_t, int32_t
#include <cstring> // for memcpy, memset
#include <fstream> // for operator<<
#include <iostream> // for cout, cerr
#include <limits> // for numeric_limits
#include <map> // for map
#include <random> // for random_device, default_random_engine, uniform_real_distribution
#include <vector> // for vector
float uniform() {
std::random_device r;

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
/* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* This file is part of GNSS-SDR.
*
@@ -23,13 +23,14 @@
#define _DARWIN_C_SOURCE
#endif
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <volk_gnsssdr/volk_gnsssdr_common.h>
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t
#include <cstdbool> // for bool, false
#include <cstdlib> // for NULL
#include <map> // for map
#include <string> // for string, basic_string
#include <vector> // for vector
/************************************************
* VOLK QA type definitions *

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* This file is part of GNSS-SDR.
*
@@ -18,15 +18,16 @@
*/
#include "qa_utils.h"
#include "kernel_tests.h"
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <vector>
#include <utility>
#include <iostream>
#include <fstream>
#include "kernel_tests.h" // for init_test_list
#include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
#include <cstdbool> // for bool, false, true
#include <iostream> // for operator<<, basic_ostream, endl, char...
#include <fstream> // IWYU pragma: keep
#include <map> // for map, map<>::iterator, _Rb_tree_iterator
#include <string> // for string, operator<<
#include <utility> // for pair
#include <vector> // for vector
void print_qa_xml(std::vector<volk_gnsssdr_test_results_t> results, unsigned int nfails);