mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Avoid signed overflow
This commit is contained in:
parent
e60a59160b
commit
7ae4a794f6
@ -1543,18 +1543,14 @@ int ddmat(rtk_t *rtk, double *D)
|
||||
nofix = (m == 1 && rtk->opt.glomodear == 0) || (m == 3 && rtk->opt.bdsmodear == 0);
|
||||
|
||||
for (f = 0, k = na;f<nf;f++, k+=MAXSAT)
|
||||
{
|
||||
if(i < k + MAXSAT)
|
||||
{
|
||||
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) ||
|
||||
!rtk->ssat[i-k].vsat[f] || !rtk->ssat[i-k].half[f])
|
||||
{
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
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);
|
||||
return nb;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user