diff --git a/src/algorithms/signal_generator/adapters/signal_generator.cc b/src/algorithms/signal_generator/adapters/signal_generator.cc index affa75705..e6fffa3e1 100644 --- a/src/algorithms/signal_generator/adapters/signal_generator.cc +++ b/src/algorithms/signal_generator/adapters/signal_generator.cc @@ -36,6 +36,7 @@ #include "Galileo_E1.h" #include "GPS_L1_CA.h" #include "Galileo_E5a.h" +#include "Glonass_L1_CA.h" using google::LogMessage; @@ -102,6 +103,11 @@ SignalGenerator::SignalGenerator(ConfigurationInterface* configuration, vector_length = round((float)fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); } + else if (std::find(system.begin(), system.end(), "R") != system.end()) + { + vector_length = round((float)fs_in + / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)); + } if (item_type_.compare("gr_complex") == 0) { diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc index c9a3576fc..5f1b5b0ae 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc +++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc @@ -294,8 +294,8 @@ int signal_generator_c::general_work (int noutput_items __attribute__((unused)), unsigned int out_idx = 0; unsigned int i = 0; unsigned int k = 0; - // the intermediate frequency must set by the user - unsigned int freq = 9540000; + // the intermediate frequency must be set by the user + unsigned int freq = 4e6; for (out_idx = 0; out_idx < vector_length_; out_idx++) {