Skip to content

Commit

Permalink
- Update raw u-blox conversion to include L5 signals
Browse files Browse the repository at this point in the history
- Update user manual
- Minor cleanup to PPP residuals code
- Update version to b34b
  • Loading branch information
rtklibexplorer committed Apr 22, 2021
1 parent a5b8a54 commit 4c71ea0
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 23 deletions.
2 changes: 1 addition & 1 deletion app/winapp/install_winapp.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ cd ..
cd rtklaunch
call install.bat
cd ..
#xcopy ..\..\dll ..\..\..\RTKLIB_bin\bin
::xcopy ..\..\dll ..\..\..\RTKLIB_bin\bin
Binary file modified doc/doc/manual.docx
Binary file not shown.
Binary file modified doc/manual_demo5.pdf
Binary file not shown.
40 changes: 21 additions & 19 deletions src/ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ static int ppp_res(int post, const obsd_t *obs, int n, const double *rs,
double ve[MAXOBS*2*NFREQ]={0},vmax=0;
char str[32];
int ne=0,obsi[MAXOBS*2*NFREQ]={0},frqi[MAXOBS*2*NFREQ],maxobs,maxfrq,rej;
int i,j,k,sat,sys,nv=0,nx=rtk->nx,stat=1;
int i,j,k,sat,sys,nv=0,nx=rtk->nx,nf = NF(opt),stat=1,frq,code;

time2str(obs[0].time,str,2);

Expand Down Expand Up @@ -967,17 +967,19 @@ static int ppp_res(int post, const obsd_t *obs, int n, const double *rs,

/* stack phase and code residuals {L1,P1,L2,P2,...} */
for (j=0;j<2*NF(opt);j++) {

dcb=bias=0.0;
code=j%2; /* 0=phase, 1=code */
frq=j/2;

if (opt->ionoopt==IONOOPT_IFLC) {
if ((y=j%2==0?Lc:Pc)==0.0) continue;
if ((y=code==0?Lc:Pc)==0.0) continue;
}
else {
if ((y=j%2==0?L[j/2]:P[j/2])==0.0) continue;
if ((y=code==0?L[frq]:P[frq])==0.0) continue;

if ((freq=sat2freq(sat,obs[i].code[j/2],nav))==0.0) continue;
C=SQR(FREQL1/freq)*ionmapf(pos,azel+i*2)*(j%2==0?-1.0:1.0);
if ((freq=sat2freq(sat,obs[i].code[frq],nav))==0.0) continue;
C=SQR(FREQL1/freq)*ionmapf(pos,azel+i*2)*(code==0?-1.0:1.0);
}
for (k=0;k<nx;k++) H[k+nx*nv]=k<3?-e[k]:0.0;

Expand All @@ -1001,41 +1003,41 @@ static int ppp_res(int post, const obsd_t *obs, int n, const double *rs,
if (rtk->x[II(sat,opt)]==0.0) continue;
H[II(sat,opt)+nx*nv]=C;
}
if (j/2==2&&j%2==1) { /* L5-receiver-dcb */
if (frq==2&&code==1) { /* L5-receiver-dcb */
dcb+=rtk->x[ID(opt)];
H[ID(opt)+nx*nv]=1.0;
}
if (j%2==0) { /* phase bias */
if ((bias=x[IB(sat,j/2,opt)])==0.0) continue;
H[IB(sat,j/2,opt)+nx*nv]=1.0;
if (code==0) { /* phase bias */
if ((bias=x[IB(sat,frq,opt)])==0.0) continue;
H[IB(sat,frq,opt)+nx*nv]=1.0;
}
/* residual */
v[nv]=y-(r+cdtr-CLIGHT*dts[i*2]+dtrp+C*dion+dcb+bias);

if (j%2==0) rtk->ssat[sat-1].resc[j/2]=v[nv];
else rtk->ssat[sat-1].resp[j/2]=v[nv];
if (code==0) rtk->ssat[sat-1].resc[frq]=v[nv]; /* carrier phase */
else rtk->ssat[sat-1].resp[frq]=v[nv]; /* pseudorange */

/* variance */
var[nv]=varerr(obs[i].sat,sys,azel[1+i*2],
SNR_UNIT*rtk->ssat[sat-1].snr_rover[j/2],
j/2,j%2,opt)+vart+SQR(C)*vari+var_rs[i];
if (sys==SYS_GLO&&j%2==1) var[nv]+=VAR_GLO_IFB;
SNR_UNIT*rtk->ssat[sat-1].snr_rover[frq],
frq,code,opt)+vart+SQR(C)*vari+var_rs[i];
if (sys==SYS_GLO&&code==1) var[nv]+=VAR_GLO_IFB;

trace(3,"%s sat=%2d %s%d res=%9.4f sig=%9.4f el=%4.1f\n",str,sat,
j%2?"P":"L",j/2+1,v[nv],sqrt(var[nv]),azel[1+i*2]*R2D);
code?"P":"L",frq+1,v[nv],sqrt(var[nv]),azel[1+i*2]*R2D);

/* reject satellite by pre-fit residuals */
if (!post&&opt->maxinno>0.0&&fabs(v[nv])>opt->maxinno) {
trace(2,"outlier (%d) rejected %s sat=%2d %s%d res=%9.4f el=%4.1f\n",
post,str,sat,j%2?"P":"L",j/2+1,v[nv],azel[1+i*2]*R2D);
exc[i]=1; rtk->ssat[sat-1].rejc[j%2]++;
post,str,sat,code?"P":"L",frq+1,v[nv],azel[1+i*2]*R2D);
exc[i]=1; rtk->ssat[sat-1].rejc[frq]++;
continue;
}
/* record large post-fit residuals */
if (post&&fabs(v[nv])>sqrt(var[nv])*THRES_REJECT) {
obsi[ne]=i; frqi[ne]=j; ve[ne]=v[nv]; ne++;
}
if (j%2==0) rtk->ssat[sat-1].vsat[j/2]=1;
if (code==0) rtk->ssat[sat-1].vsat[frq]=1;
nv++;
}
}
Expand Down
18 changes: 16 additions & 2 deletions src/rcv/ublox.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ static int ubx_sig(int sys, int sigid)
if (sigid == 0) return CODE_L1C; /* L1C/A */
if (sigid==3) return CODE_L2L; /* L2CL */
if (sigid==4) return CODE_L2S; /* L2CM */
if (sigid==6) return CODE_L5I; /* L5I */
if (sigid==7) return CODE_L5Q; /* L5Q */
}
else if (sys == SYS_GLO) {
if (sigid == 0) return CODE_L1C; /* G1C/A (GLO L1 OF) */
Expand All @@ -186,20 +188,25 @@ static int ubx_sig(int sys, int sigid)
else if (sys == SYS_GAL) {
if (sigid==0) return CODE_L1C; /* E1C */
if (sigid==1) return CODE_L1B; /* E1B */
if (sigid==3) return CODE_L5I; /* E5aI */
if (sigid==4) return CODE_L5Q; /* E5aQ */
if (sigid==5) return CODE_L7I; /* E5bI */
if (sigid==6) return CODE_L7Q; /* E5bQ */
}
else if (sys == SYS_QZS) {
if (sigid == 0) return CODE_L1C; /* L1C/A */
if (sigid==0) return CODE_L1C; /* L1C/A */
if (sigid==1) return CODE_L1Z; /* L1S */
if (sigid==4) return CODE_L2S; /* L2CM */
if (sigid==5) return CODE_L2L; /* L2CL */
if (sigid==8) return CODE_L5I; /* L5I */
if (sigid==9) return CODE_L5Q; /* L5Q */
}
else if (sys == SYS_CMP) {
if (sigid==0) return CODE_L2I; /* B1I D1 */
if (sigid==1) return CODE_L2I; /* B1I D2 */
if (sigid == 2) return CODE_L7I; /* B2I D1 */
if (sigid == 3) return CODE_L7I; /* B2I D2 */
if (sigid == 7) return CODE_L5X; /* B2a */
}
else if (sys == SYS_SBS) {
if (sigid==0) return CODE_L1C; /* L1C/A */
Expand All @@ -213,6 +220,8 @@ static int ubx_sig_combined(int sys, int sigid)
if (sigid == 0) return CODE_L1C; /* L1C/A */
if (sigid==3) return CODE_L2X; /* L2CL */
if (sigid==4) return CODE_L2X; /* L2CM */
if (sigid==6) return CODE_L5X; /* L5I */
if (sigid==7) return CODE_L5X; /* L5Q */
}
else if (sys == SYS_GLO) {
if (sigid == 0) return CODE_L1C; /* G1C/A (GLO L1 OF) */
Expand All @@ -221,20 +230,25 @@ static int ubx_sig_combined(int sys, int sigid)
else if (sys == SYS_GAL) {
if (sigid==0) return CODE_L1X; /* E1C */
if (sigid==1) return CODE_L1X; /* E1B */
if (sigid==3) return CODE_L5X; /* E5aI */
if (sigid==4) return CODE_L5X; /* E5aQ */
if (sigid==5) return CODE_L7X; /* E5bI */
if (sigid==6) return CODE_L7X; /* E5bQ */
}
}
else if (sys == SYS_QZS) {
if (sigid == 0) return CODE_L1C; /* L1C/A */
if (sigid==1) return CODE_L1C; /* L1S */
if (sigid==4) return CODE_L2X; /* L2CM */
if (sigid==5) return CODE_L2X; /* L2CL */
if (sigid==8) return CODE_L5X; /* L5I */
if (sigid==9) return CODE_L5X; /* L5Q */
}
else if (sys == SYS_CMP) {
if (sigid==0) return CODE_L2I; /* B1I D1 */
if (sigid==1) return CODE_L2I; /* B1I D2 */
if (sigid == 2) return CODE_L7I; /* B2I D1 */
if (sigid == 3) return CODE_L7I; /* B2I D2 */
if (sigid == 7) return CODE_L5X; /* B2a */
}
else if (sys == SYS_SBS) {
if (sigid==0) return CODE_L1C; /* L1C/A */
Expand Down
2 changes: 1 addition & 1 deletion src/rtklib.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extern "C" {

#define VER_RTKLIB "demo5" /* library version */

#define PATCH_LEVEL "b34a" /* patch level */
#define PATCH_LEVEL "b34b" /* patch level */

#define COPYRIGHT_RTKLIB \
"Copyright (C) 2007-2020 T.Takasu\nAll rights reserved."
Expand Down

0 comments on commit 4c71ea0

Please sign in to comment.