mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Merge branch 'acebrianjuan-monitor_block_decimator' into next
This commit is contained in:
commit
bf10e960f2
@ -1,6 +1,9 @@
|
||||
/*!
|
||||
* \file gnss_synchro_monitor.cc
|
||||
* \brief Interface of a Position Velocity and Time computation block
|
||||
* \brief Implementation of a receiver monitoring block which allows sending
|
||||
* a data stream with the receiver internal parameters (Gnss_Synchro objects)
|
||||
* to local or remote clients over UDP.
|
||||
*
|
||||
* \author Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
@ -61,6 +64,8 @@ gnss_synchro_monitor::gnss_synchro_monitor(unsigned int n_channels,
|
||||
d_nchannels = n_channels;
|
||||
|
||||
udp_sink_ptr = std::unique_ptr<Gnss_Synchro_Udp_Sink>(new Gnss_Synchro_Udp_Sink(udp_addresses, udp_port));
|
||||
|
||||
count = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -75,17 +80,16 @@ int gnss_synchro_monitor::work(int noutput_items, gr_vector_const_void_star& inp
|
||||
const Gnss_Synchro** in = reinterpret_cast<const Gnss_Synchro**>(&input_items[0]); // Get the input buffer pointer
|
||||
for (int epoch = 0; epoch < noutput_items; epoch++)
|
||||
{
|
||||
// ############ 1. READ PSEUDORANGES ####
|
||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
count++;
|
||||
if (count >= d_output_rate_ms)
|
||||
{
|
||||
//if (in[i][epoch].Flag_valid_pseudorange)
|
||||
// {
|
||||
// }
|
||||
//todo: send the gnss_synchro objects
|
||||
|
||||
std::vector<Gnss_Synchro> stocks;
|
||||
stocks.push_back(in[i][epoch]);
|
||||
udp_sink_ptr->write_gnss_synchro(stocks);
|
||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
{
|
||||
std::vector<Gnss_Synchro> stocks;
|
||||
stocks.push_back(in[i][epoch]);
|
||||
udp_sink_ptr->write_gnss_synchro(stocks);
|
||||
}
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
return noutput_items;
|
||||
|
@ -1,6 +1,9 @@
|
||||
/*!
|
||||
* \file gnss_synchro_monitor.h
|
||||
* \brief Interface of a Position Velocity and Time computation block
|
||||
* \brief Interface of a receiver monitoring block which allows sending
|
||||
* a data stream with the receiver internal parameters (Gnss_Synchro objects)
|
||||
* to local or remote clients over UDP.
|
||||
*
|
||||
* \author Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
@ -65,6 +68,8 @@ private:
|
||||
|
||||
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
|
||||
|
||||
int count;
|
||||
|
||||
|
||||
public:
|
||||
gnss_synchro_monitor(unsigned int nchannels,
|
||||
|
Loading…
Reference in New Issue
Block a user