diff --git a/src/rtkpos.c b/src/rtkpos.c index f14077aaa..9acc87a7f 100644 --- a/src/rtkpos.c +++ b/src/rtkpos.c @@ -1,7 +1,7 @@ /*------------------------------------------------------------------------------ * rtkpos.c : precise positioning * -* Copyright (C) 2007-2013 by T.TAKASU, All rights reserved. +* Copyright (C) 2007-2018 by T.TAKASU, All rights reserved. * * version : $Revision: 1.1 $ $Date: 2008/07/17 21:48:06 $ * history : 2007/01/12 1.0 new @@ -34,6 +34,7 @@ * 2014/10/21 1.16 fix bug on beidou amb-res with pos2-bdsarmode=0 * 2014/11/08 1.17 fix bug on ar-degradation by unhealthy satellites * 2015/03/23 1.18 residuals referenced to reference satellite +* 2018/01/29 1.19 unfix ambiguity between gps and qzss *-----------------------------------------------------------------------------*/ #include #include "rtklib.h" @@ -1004,12 +1005,12 @@ static double gloicbcorr(int sat1, int sat2, const prcopt_t *opt, double lam1, return opt->exterr.gloicb[f]*0.01*dfreq; /* (m) */ } -/* test navi system (m=0:gps/qzs/sbs,1:glo,2:gal,3:bds) ----------------------*/ +/* test navi system (m=0:gps/sbs,1:glo,2:gal,3:bds,4:qzs) --------------------*/ static int test_sys(int sys, int m) { switch (sys) { case SYS_GPS: return m==0; - case SYS_QZS: return m==0; + case SYS_QZS: return m==4; case SYS_SBS: return m==0; case SYS_GLO: return m==1; case SYS_GAL: return m==2; @@ -1049,7 +1050,7 @@ static int ddres(rtk_t *rtk, const nav_t *nav, double dt, const double *x, tropr[i]=prectrop(rtk->sol.time,posr,1,azel+ir[i]*2,opt,x,dtdxr+i*3); } } - for (m=0;m<4;m++) /* m=0:gps/qzs/sbs,1:glo,2:gal,3:bds */ + for (m=0;m<5;m++) /* m=0:gps/sbs,1:glo,2:gal,3:bds,4:qzs */ for (f=opt->mode>PMODE_DGPS?0:nf;fopt.glomodear==0) continue; if (m==3&&rtk->opt.bdsmodear==0) continue; @@ -1297,7 +1298,7 @@ static void restamb(rtk_t *rtk, const double *bias, int nb, double *xa) for (i=0;inx;i++) xa[i]=rtk->x [i]; for (i=0;ina;i++) xa[i]=rtk->xa[i]; - for (m=0;m<4;m++) for (f=0;fssat[i].sys,m)||rtk->ssat[i].fix[f]!=2) { @@ -1324,7 +1325,7 @@ static void holdamb(rtk_t *rtk, const double *xa) v=mat(nb,1); H=zeros(nb,rtk->nx); - for (m=0;m<4;m++) for (f=0;fssat[i].sys,m)||rtk->ssat[i].fix[f]!=2||