mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-07 07:50:32 +00:00
Avoid signed overflow
This commit is contained in:
parent
4e49330ad4
commit
47e41d5b28
@ -1543,18 +1543,14 @@ int ddmat(rtk_t *rtk, double *D)
|
|||||||
nofix = (m == 1 && rtk->opt.glomodear == 0) || (m == 3 && rtk->opt.bdsmodear == 0);
|
nofix = (m == 1 && rtk->opt.glomodear == 0) || (m == 3 && rtk->opt.bdsmodear == 0);
|
||||||
|
|
||||||
for (f = 0, k = na;f<nf;f++, k+=MAXSAT)
|
for (f = 0, k = na;f<nf;f++, k+=MAXSAT)
|
||||||
|
{
|
||||||
|
if(i < k + MAXSAT)
|
||||||
{
|
{
|
||||||
for (i = k;i<k+MAXSAT;i++)
|
for (i = k;i<k+MAXSAT;i++)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if (rtk->x[i] == 0.0||!test_sys(rtk->ssat[i-k].sys,m)||
|
|
||||||
!rtk->ssat[i-k].vsat[f])
|
|
||||||
{
|
|
||||||
#else
|
|
||||||
if (rtk->x[i] == 0.0 || !test_sys(rtk->ssat[i-k].sys, m) ||
|
if (rtk->x[i] == 0.0 || !test_sys(rtk->ssat[i-k].sys, m) ||
|
||||||
!rtk->ssat[i-k].vsat[f] || !rtk->ssat[i-k].half[f])
|
!rtk->ssat[i-k].vsat[f] || !rtk->ssat[i-k].half[f])
|
||||||
{
|
{
|
||||||
#endif
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (rtk->ssat[i-k].lock[f]>0 && !(rtk->ssat[i-k].slip[f]&2) &&
|
if (rtk->ssat[i-k].lock[f]>0 && !(rtk->ssat[i-k].slip[f]&2) &&
|
||||||
@ -1585,6 +1581,7 @@ int ddmat(rtk_t *rtk, double *D)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
trace(5, "D=\n"); tracemat(5, D, nx, na+nb, 2, 0);
|
trace(5, "D=\n"); tracemat(5, D, nx, na+nb, 2, 0);
|
||||||
return nb;
|
return nb;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user