mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Correct interpolation indexes
This commit is contained in:
parent
281687615a
commit
5da7a83eeb
@ -498,15 +498,15 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
|||||||
unsigned int index_closest = find_closest(*it);
|
unsigned int index_closest = find_closest(*it);
|
||||||
unsigned int index1;
|
unsigned int index1;
|
||||||
unsigned int index2;
|
unsigned int index2;
|
||||||
if(index_closest == (it->size() - 1))
|
if(index_closest > 0)
|
||||||
{
|
{
|
||||||
index1 = index_closest - 1;
|
index1 = index_closest - 1;
|
||||||
index2 = index_closest;
|
index2 = index_closest;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
index1 = index_closest;
|
index1 = 0;
|
||||||
index2 = index_closest + 1;
|
index2 = 1;
|
||||||
}
|
}
|
||||||
Gnss_Synchro interpolated_gnss_synchro = it->at(index1);
|
Gnss_Synchro interpolated_gnss_synchro = it->at(index1);
|
||||||
std::pair<Gnss_Synchro, Gnss_Synchro> gnss_pair(it->at(index2), it->at(index1));
|
std::pair<Gnss_Synchro, Gnss_Synchro> gnss_pair(it->at(index2), it->at(index1));
|
||||||
|
Loading…
Reference in New Issue
Block a user