1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-15 22:34:58 +00:00

Fix: Vtl_engine bug

This commit is contained in:
M.A.Gomez 2023-03-14 23:53:34 +00:00
parent 7a271afd45
commit 8760858fb0

View File

@ -2972,20 +2972,24 @@ double Vtl_Engine::AccLkTable(double t_disparo)
{24.94, 11.28449294},
{24.95, 11.28147034},
{24.96, 11.2787369},
{24.97,11.27663828},};
{24.97, 11.27663828},
};
arma::uvec index_E = find(LkTable <= t_disparo, 1, "last");
if (index_E(0)<(LkTable.n_rows-1)){
if (index_E(0) < (LkTable.n_rows - 1))
{
double tdisparo1 = LkTable(index_E(0), 0);
double tdisparo2 = LkTable(index_E(0) + 1, 0);
double Acc1 = LkTable(index_E(0), 1);
double Acc2 = LkTable(index_E(0) + 1, 1);
Acc = (t_disparo - tdisparo1) * (Acc2 - Acc1) / (tdisparo2 - tdisparo1) + Acc1;
}else{
E=0;
}
else
{
Acc = 9.81;
}
return Acc;