1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00

Increase buffer size

This commit is contained in:
Antonio Ramos 2018-04-11 12:49:22 +02:00
parent 01d41e2f07
commit 385055e884
2 changed files with 5 additions and 32 deletions

View File

@ -63,10 +63,11 @@ hybrid_observables_cc::hybrid_observables_cc(unsigned int nchannels_in,
d_dump_filename = dump_filename; d_dump_filename = dump_filename;
T_rx_s = 0.0; T_rx_s = 0.0;
T_rx_step_s = 0.001; // 1 ms T_rx_step_s = 0.001; // 1 ms
max_delta = 0.15; // 150 ms max_delta = 2.5; // 2.5 s
d_latency = 0.08; // 80 ms
valid_channels.resize(d_nchannels, false); valid_channels.resize(d_nchannels, false);
d_num_valid_channels = 0; d_num_valid_channels = 0;
d_gnss_synchro_history = new Gnss_circular_deque<Gnss_Synchro>(1000, d_nchannels); d_gnss_synchro_history = new Gnss_circular_deque<Gnss_Synchro>(static_cast<unsigned int>(max_delta * 1000.0), d_nchannels);
// ############# ENABLE DATA FILE LOG ################# // ############# ENABLE DATA FILE LOG #################
if (d_dump) if (d_dump)
@ -322,35 +323,6 @@ bool hybrid_observables_cc::interpolate_data(Gnss_Synchro &out, const unsigned i
out.TOW_at_current_symbol_s = d_gnss_synchro_history->at(ch, ind.first).TOW_at_current_symbol_s + (d_gnss_synchro_history->at(ch, ind.second).TOW_at_current_symbol_s - d_gnss_synchro_history->at(ch, ind.first).TOW_at_current_symbol_s) * (ti - d_gnss_synchro_history->at(ch, ind.first).RX_time) / (d_gnss_synchro_history->at(ch, ind.second).RX_time - d_gnss_synchro_history->at(ch, ind.first).RX_time); out.TOW_at_current_symbol_s = d_gnss_synchro_history->at(ch, ind.first).TOW_at_current_symbol_s + (d_gnss_synchro_history->at(ch, ind.second).TOW_at_current_symbol_s - d_gnss_synchro_history->at(ch, ind.first).TOW_at_current_symbol_s) * (ti - d_gnss_synchro_history->at(ch, ind.first).RX_time) / (d_gnss_synchro_history->at(ch, ind.second).RX_time - d_gnss_synchro_history->at(ch, ind.first).RX_time);
return true; return true;
/*
arma::vec t = arma::vec(d_gnss_synchro_history.size(ch));
arma::vec dop = t;
arma::vec cph = t;
arma::vec tow = t;
arma::vec tiv = arma::vec(1);
arma::vec result;
tiv(0) = ti;
unsigned int aux = 0;
for (it = data.begin(); it != data.end(); it++)
{
t(aux) = it->RX_time;
dop(aux) = it->Carrier_Doppler_hz;
cph(aux) = it->Carrier_phase_rads;
tow(aux) = it->TOW_at_current_symbol_s;
aux++;
}
arma::interp1(t, dop, tiv, result);
out.Carrier_Doppler_hz = result(0);
arma::interp1(t, cph, tiv, result);
out.Carrier_phase_rads = result(0);
arma::interp1(t, tow, tiv, result);
out.TOW_at_current_symbol_s = result(0);
return result.is_finite();
*/
} }
@ -562,7 +534,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
// Check if there is any valid channel after computing the time distance between the Gnss_Synchro data and the receiver time // Check if there is any valid channel after computing the time distance between the Gnss_Synchro data and the receiver time
d_num_valid_channels = valid_channels.count(); d_num_valid_channels = valid_channels.count();
double T_rx_s_out = T_rx_s - (max_delta / 2.0); 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; return 0;

View File

@ -78,6 +78,7 @@ private:
double T_rx_s; double T_rx_s;
double T_rx_step_s; double T_rx_step_s;
double max_delta; double max_delta;
double d_latency;
bool d_dump; bool d_dump;
unsigned int d_nchannels; unsigned int d_nchannels;
unsigned int d_num_valid_channels; unsigned int d_num_valid_channels;