mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-06 01:56:25 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
23468d1b29
@ -36,8 +36,8 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs) : gr::sync_decimator("sample_counter",
|
gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs, size_t _size) : gr::sync_decimator("sample_counter",
|
||||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
gr::io_signature::make(1, 1, _size),
|
||||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||||
static_cast<unsigned int>(std::floor(_fs * 0.001)))
|
static_cast<unsigned int>(std::floor(_fs * 0.001)))
|
||||||
{
|
{
|
||||||
@ -56,9 +56,9 @@ gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs) : gr::sync_decimato
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs)
|
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, size_t _size)
|
||||||
{
|
{
|
||||||
gnss_sdr_sample_counter_sptr sample_counter_(new gnss_sdr_sample_counter(_fs));
|
gnss_sdr_sample_counter_sptr sample_counter_(new gnss_sdr_sample_counter(_fs, _size));
|
||||||
return sample_counter_;
|
return sample_counter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,12 +39,12 @@ class gnss_sdr_sample_counter;
|
|||||||
|
|
||||||
typedef boost::shared_ptr<gnss_sdr_sample_counter> gnss_sdr_sample_counter_sptr;
|
typedef boost::shared_ptr<gnss_sdr_sample_counter> gnss_sdr_sample_counter_sptr;
|
||||||
|
|
||||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs);
|
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, size_t _size);
|
||||||
|
|
||||||
class gnss_sdr_sample_counter : public gr::sync_decimator
|
class gnss_sdr_sample_counter : public gr::sync_decimator
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
gnss_sdr_sample_counter(double _fs);
|
gnss_sdr_sample_counter(double _fs, size_t _size);
|
||||||
long long int current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
long long int current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
||||||
unsigned int current_s; // Receiver time in seconds, modulo 60
|
unsigned int current_s; // Receiver time in seconds, modulo 60
|
||||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||||
@ -57,7 +57,7 @@ private:
|
|||||||
bool flag_enable_send_msg;
|
bool flag_enable_send_msg;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs);
|
friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, size_t _size);
|
||||||
int work(int noutput_items,
|
int work(int noutput_items,
|
||||||
gr_vector_const_void_star &input_items,
|
gr_vector_const_void_star &input_items,
|
||||||
gr_vector_void_star &output_items);
|
gr_vector_void_star &output_items);
|
||||||
|
@ -88,7 +88,6 @@ private:
|
|||||||
std::string role_;
|
std::string role_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
//gr_kludge_copy_sptr kludge_copy_;
|
|
||||||
gr::blocks::copy::sptr kludge_copy_;
|
gr::blocks::copy::sptr kludge_copy_;
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
conjugate_cc_sptr conjugate_cc_;
|
conjugate_cc_sptr conjugate_cc_;
|
||||||
|
@ -61,8 +61,6 @@ GNSSFlowgraph::GNSSFlowgraph(std::shared_ptr<ConfigurationInterface> configurati
|
|||||||
|
|
||||||
|
|
||||||
GNSSFlowgraph::~GNSSFlowgraph() {}
|
GNSSFlowgraph::~GNSSFlowgraph() {}
|
||||||
|
|
||||||
|
|
||||||
void GNSSFlowgraph::start()
|
void GNSSFlowgraph::start()
|
||||||
{
|
{
|
||||||
if (running_)
|
if (running_)
|
||||||
@ -257,7 +255,7 @@ void GNSSFlowgraph::connect()
|
|||||||
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl;
|
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl;
|
||||||
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
||||||
}
|
}
|
||||||
ch_out_sample_counter = gnss_sdr_make_sample_counter(fs);
|
ch_out_sample_counter = gnss_sdr_make_sample_counter(fs, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0));
|
||||||
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0);
|
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0);
|
||||||
top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); //extra port for the sample counter pulse
|
top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); //extra port for the sample counter pulse
|
||||||
}
|
}
|
||||||
|
@ -567,7 +567,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
|
|||||||
gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex = gr::blocks::interleaved_char_to_complex::make();
|
gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex = gr::blocks::interleaved_char_to_complex::make();
|
||||||
gr::blocks::null_sink::sptr sink_ch0 = gr::blocks::null_sink::make(sizeof(Gnss_Synchro));
|
gr::blocks::null_sink::sptr sink_ch0 = gr::blocks::null_sink::make(sizeof(Gnss_Synchro));
|
||||||
gr::blocks::null_sink::sptr sink_ch1 = gr::blocks::null_sink::make(sizeof(Gnss_Synchro));
|
gr::blocks::null_sink::sptr sink_ch1 = gr::blocks::null_sink::make(sizeof(Gnss_Synchro));
|
||||||
gnss_sdr_sample_counter_sptr samp_counter = gnss_sdr_make_sample_counter(static_cast<double>(baseband_sampling_freq));
|
gnss_sdr_sample_counter_sptr samp_counter = gnss_sdr_make_sample_counter(static_cast<double>(baseband_sampling_freq), sizeof(gr_complex));
|
||||||
top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0);
|
top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0);
|
||||||
top_block->connect(gr_interleaved_char_to_complex, 0, samp_counter, 0);
|
top_block->connect(gr_interleaved_char_to_complex, 0, samp_counter, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user