mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-07-07 12:14:20 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fpga
This commit is contained in:
commit
f9c8786420
|
@ -372,14 +372,13 @@ void hybrid_observables_cc::find_interp_elements(const unsigned int &ch, const d
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void hybrid_observables_cc::forecast(int noutput_items __attribute__((unused)),
|
void hybrid_observables_cc::forecast(int noutput_items, gr_vector_int &ninput_items_required)
|
||||||
gr_vector_int &ninput_items_required)
|
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||||
{
|
{
|
||||||
ninput_items_required[i] = 0;
|
ninput_items_required[i] = 0;
|
||||||
}
|
}
|
||||||
ninput_items_required[d_nchannels] = 1;
|
ninput_items_required[d_nchannels] = noutput_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -459,22 +458,25 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||||
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
unsigned int returned_elements = 0;
|
||||||
int total_input_items = 0;
|
int total_input_items = 0;
|
||||||
for (i = 0; i < d_nchannels; i++)
|
for (i = 0; i < d_nchannels; i++)
|
||||||
{
|
{
|
||||||
total_input_items += ninput_items[i];
|
total_input_items += ninput_items[i];
|
||||||
}
|
}
|
||||||
consume(d_nchannels, 1);
|
for (int epoch = 0; epoch < ninput_items[d_nchannels]; epoch++)
|
||||||
|
{
|
||||||
T_rx_s += T_rx_step_s;
|
T_rx_s += T_rx_step_s;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
if ((total_input_items == 0) and (d_num_valid_channels == 0))
|
if ((total_input_items == 0) and (d_num_valid_channels == 0))
|
||||||
{
|
{
|
||||||
return 0;
|
consume(d_nchannels, epoch + 1);
|
||||||
|
return returned_elements;
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
if (total_input_items > 0)
|
if (total_input_items > 0 and epoch == 0)
|
||||||
{
|
{
|
||||||
for (i = 0; i < d_nchannels; i++)
|
for (i = 0; i < d_nchannels; i++)
|
||||||
{
|
{
|
||||||
|
@ -516,7 +518,8 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||||
// Check if there is any valid channel after reading the new incoming Gnss_Synchro data
|
// Check if there is any valid channel after reading the new incoming Gnss_Synchro data
|
||||||
if (d_num_valid_channels == 0)
|
if (d_num_valid_channels == 0)
|
||||||
{
|
{
|
||||||
return 0;
|
consume(d_nchannels, epoch + 1);
|
||||||
|
return returned_elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < d_nchannels; i++) //Discard observables with T_rx higher than the threshold
|
for (i = 0; i < d_nchannels; i++) //Discard observables with T_rx higher than the threshold
|
||||||
|
@ -536,7 +539,8 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||||
double T_rx_s_out = T_rx_s - d_latency;
|
double T_rx_s_out = T_rx_s - d_latency;
|
||||||
if ((d_num_valid_channels == 0) or (T_rx_s_out < 0.0))
|
if ((d_num_valid_channels == 0) or (T_rx_s_out < 0.0))
|
||||||
{
|
{
|
||||||
return 0;
|
consume(d_nchannels, epoch + 1);
|
||||||
|
return returned_elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Gnss_Synchro> epoch_data;
|
std::vector<Gnss_Synchro> epoch_data;
|
||||||
|
@ -558,7 +562,8 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||||
d_num_valid_channels = valid_channels.count();
|
d_num_valid_channels = valid_channels.count();
|
||||||
if (d_num_valid_channels == 0)
|
if (d_num_valid_channels == 0)
|
||||||
{
|
{
|
||||||
return 0;
|
consume(d_nchannels, epoch + 1);
|
||||||
|
return returned_elements;
|
||||||
}
|
}
|
||||||
correct_TOW_and_compute_prange(epoch_data);
|
correct_TOW_and_compute_prange(epoch_data);
|
||||||
std::vector<Gnss_Synchro>::iterator it = epoch_data.begin();
|
std::vector<Gnss_Synchro>::iterator it = epoch_data.begin();
|
||||||
|
@ -606,5 +611,8 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||||
d_dump = false;
|
d_dump = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
returned_elements++;
|
||||||
|
}
|
||||||
|
consume(d_nchannels, ninput_items[d_nchannels]);
|
||||||
|
return returned_elements;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user