diff --git a/src/algorithms/libs/rtklib/rtklib_rtkpos.cc b/src/algorithms/libs/rtklib/rtklib_rtkpos.cc index 850fa37ae..6af5e200d 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtkpos.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtkpos.cc @@ -1544,49 +1544,46 @@ int ddmat(rtk_t *rtk, double *D) for (f = 0, k = na;fx[i] == 0.0||!test_sys(rtk->ssat[i-k].sys,m)|| - !rtk->ssat[i-k].vsat[f]) + for (i = k;ix[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]) - { -#endif - continue; + { + continue; + } + if (rtk->ssat[i-k].lock[f]>0 && !(rtk->ssat[i-k].slip[f]&2) && + rtk->ssat[i-k].azel[1] >= rtk->opt.elmaskar && !nofix) + { + rtk->ssat[i-k].fix[f] = 2; /* fix */ + break; + } + else rtk->ssat[i-k].fix[f] = 1; } - if (rtk->ssat[i-k].lock[f]>0 && !(rtk->ssat[i-k].slip[f]&2) && - rtk->ssat[i-k].azel[1] >= rtk->opt.elmaskar && !nofix) + for (j = k;jssat[i-k].fix[f] = 2; /* fix */ - break; + if (i == j || rtk->x[j] == 0.0 || !test_sys(rtk->ssat[j-k].sys, m) || + !rtk->ssat[j-k].vsat[f]) + { + continue; + } + if (rtk->ssat[j-k].lock[f]>0 && !(rtk->ssat[j-k].slip[f]&2) && + rtk->ssat[i-k].vsat[f] && + rtk->ssat[j-k].azel[1] >= rtk->opt.elmaskar && !nofix) + { + D[i+(na+nb)*nx] = 1.0; + D[j+(na+nb)*nx] = -1.0; + nb++; + rtk->ssat[j-k].fix[f] = 2; /* fix */ + } + else rtk->ssat[j-k].fix[f] = 1; } - else rtk->ssat[i-k].fix[f] = 1; - } - for (j = k;jx[j] == 0.0 || !test_sys(rtk->ssat[j-k].sys, m) || - !rtk->ssat[j-k].vsat[f]) - { - continue; - } - if (rtk->ssat[j-k].lock[f]>0 && !(rtk->ssat[j-k].slip[f]&2) && - rtk->ssat[i-k].vsat[f] && - rtk->ssat[j-k].azel[1] >= rtk->opt.elmaskar && !nofix) - { - D[i+(na+nb)*nx] = 1.0; - D[j+(na+nb)*nx] = -1.0; - nb++; - rtk->ssat[j-k].fix[f] = 2; /* fix */ - } - else rtk->ssat[j-k].fix[f] = 1; } } } - trace(5, "D=\n"); tracemat(5, D, nx, na+nb, 2, 0); - return nb; + trace(5, "D=\n"); tracemat(5, D, nx, na+nb, 2, 0); + return nb; }