Skip to content

Commit

Permalink
rtklib 2.4.2 p8
Browse files Browse the repository at this point in the history
  • Loading branch information
tomojitakasu committed Jun 29, 2014
1 parent 1a0c91e commit 0acd857
Show file tree
Hide file tree
Showing 28 changed files with 904 additions and 136 deletions.
4 changes: 2 additions & 2 deletions app/rtkpost/postmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,8 @@ int __fastcall TMainForm::ExecProc(void)
if (InputFile3->Text!="") {
strcpy(infile[n++],InputFile3_Text.c_str());
}
else if ((prcopt.navsys&SYS_GPS)&&!ObsToNav(InputFile1_Text.c_str(),infile[n++])) {
showmsg("error: no gps navigation data");
else if (!ObsToNav(InputFile1_Text.c_str(),infile[n++])) {
showmsg("error: no navigation data");
return 0;
}
if (InputFile4_Text!="") {
Expand Down
Binary file modified bin/convbin.exe
Binary file not shown.
Binary file modified bin/pos2kml.exe
Binary file not shown.
Binary file modified bin/rnx2rtkp.exe
Binary file not shown.
Binary file modified bin/rtkconv.exe
Binary file not shown.
Binary file modified bin/rtkget.exe
Binary file not shown.
Binary file modified bin/rtklaunch.exe
Binary file not shown.
Binary file modified bin/rtknavi.exe
Binary file not shown.
Binary file modified bin/rtknavi_mkl.exe
Binary file not shown.
Binary file modified bin/rtkplot.exe
Binary file not shown.
Binary file modified bin/rtkpost.exe
Binary file not shown.
Binary file modified bin/rtkpost_mkl.exe
Binary file not shown.
Binary file modified bin/srctblbrows.exe
Binary file not shown.
Binary file modified bin/strsvr.exe
Binary file not shown.
6 changes: 4 additions & 2 deletions data/TLE_GNSS_SATNO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
# 2013/01/06 1.3 switch R08 satellite from 743 to 701
# 2013/02/23 1.4 switch R08 satellite from 701 to 743
# 2014/04/09 1.5 switch G27,G30,R02
# 2014/06/10 1.5 switch G06, decommission G09
#
G32 20959U 90103A # GPS BIIA-10 (PRN 32)
G26 22014U 92039A # GPS BIIA-14 (PRN 26)
#G27 22108U 92058A # GPS BIIA-15 (PRN 27)
G09 22700U 93042A # GPS BIIA-21 (PRN 09)
#G09 22700U 93042A # GPS BIIA-21 (PRN 09)
#G30 22779U 93054A # GPS BIIA-22 (PRN 30)
G04 22877U 93068A # GPS BIIA-23 (PRN 04)
G06 23027U 94016A # GPS BIIA-24 (PRN 06)
#G06 23027U 94016A # GPS BIIA-24 (PRN 06)
G03 23833U 96019A # GPS BIIA-25 (PRN 03)
G10 23953U 96041A # GPS BIIA-26 (PRN 10)
G13 24876U 97035A # GPS BIIR-2 (PRN 13)
Expand Down Expand Up @@ -45,6 +46,7 @@ G01 37753U 11036A # GPS BIIF-2 (PRN 01)
G24 38833U 12053A # GPS BIIF-3 (PRN 24)
G27 39166U 13023A # GPS BIIF-4 (PRN 27)
G30 39533U 14008A # GPS BIIF-5 (PRN 30)
G06 39741U 14026A # GPS BIIF-6 (PRN 06)

#R08 28509U 04053B # COSMOS 2413 (712)
#R17 28915U 05050A # COSMOS 2419 (714)
Expand Down
16 changes: 16 additions & 0 deletions data/ubx_m8n_bds_raw_1hz.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!UBX CFG-GNSS 0 32 32 1 6 16 16 0 0
!UBX CFG-GNSS 0 32 32 1 3 16 16 0 1
!UBX CFG-MSG 3 16 0 0 0 1 0 0
!UBX CFG-MSG 3 15 0 0 0 1 0 0
!UBX CFG-MSG 1 32 0 0 0 1 0 0

@
!UBX CFG-MSG 3 16 0 0 0 0 0 0
!UBX CFG-MSG 3 15 0 0 0 0 0 0
!UBX CFG-MSG 1 32 0 0 0 0 0 0
Expand Down
16 changes: 16 additions & 0 deletions data/ubx_m8n_glo_raw_1hz.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!UBX CFG-GNSS 0 32 32 1 3 16 16 0 0
!UBX CFG-GNSS 0 32 32 1 6 16 16 0 1
!UBX CFG-MSG 3 16 0 0 0 1 0 0
!UBX CFG-MSG 3 15 0 0 0 1 0 0
!UBX CFG-MSG 1 32 0 0 0 1 0 0

@
!UBX CFG-MSG 3 16 0 0 0 0 0 0
!UBX CFG-MSG 3 15 0 0 0 0 0 0
!UBX CFG-MSG 1 32 0 0 0 0 0 0
Expand Down
2 changes: 1 addition & 1 deletion src/convrnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ static void set_obstype(int format, rnxopt_t *opt)
};
/* supported codes by others */
const unsigned char codes_other[6][8]={
{CODE_L1C},{CODE_L1C},{0},{0},{CODE_L1C}
{CODE_L1C},{CODE_L1C},{CODE_L1C},{CODE_L1C},{CODE_L1C},{CODE_L1I}
};
const unsigned char *codes;
int i;
Expand Down
13 changes: 7 additions & 6 deletions src/postpos.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*------------------------------------------------------------------------------
* postpos.c : post-processing positioning
*
* Copyright (C) 2007-2013 by T.TAKASU, All rights reserved.
* Copyright (C) 2007-2014 by T.TAKASU, All rights reserved.
*
* version : $Revision: 1.1 $ $Date: 2008/07/17 21:48:06 $
* history : 2007/05/08 1.0 new
Expand All @@ -24,6 +24,7 @@
* 2011/09/15 1.11 add function reading stec file
* 2012/02/01 1.12 support keyword expansion of rtcm ssr corrections
* 2013/03/11 1.13 add function reading otl and erp data
* 2014/06/29 1.14 fix problem on overflow of # of satellites
*-----------------------------------------------------------------------------*/
#include "rtklib.h"

Expand Down Expand Up @@ -207,8 +208,8 @@ static int inputobs(obsd_t *obs, int solq, const prcopt_t *popt)
if (timediff(obss.data[i].time,obss.data[iobsu].time)>DTTOL) break;
}
nr=nextobsf(&obss,&iobsr,2);
for (i=0;i<nu&&n<MAXOBS;i++) obs[n++]=obss.data[iobsu+i];
for (i=0;i<nr&&n<MAXOBS;i++) obs[n++]=obss.data[iobsr+i];
for (i=0;i<nu&&n<MAXOBS*2;i++) obs[n++]=obss.data[iobsu+i];
for (i=0;i<nr&&n<MAXOBS*2;i++) obs[n++]=obss.data[iobsr+i];
iobsu+=nu;

/* update sbas corrections */
Expand Down Expand Up @@ -264,8 +265,8 @@ static int inputobs(obsd_t *obs, int solq, const prcopt_t *popt)
if (timediff(obss.data[i].time,obss.data[iobsu].time)<-DTTOL) break;
}
nr=nextobsb(&obss,&iobsr,2);
for (i=0;i<nu&&n<MAXOBS;i++) obs[n++]=obss.data[iobsu-nu+1+i];
for (i=0;i<nr&&n<MAXOBS;i++) obs[n++]=obss.data[iobsr-nr+1+i];
for (i=0;i<nu&&n<MAXOBS*2;i++) obs[n++]=obss.data[iobsu-nu+1+i];
for (i=0;i<nr&&n<MAXOBS*2;i++) obs[n++]=obss.data[iobsr-nr+1+i];
iobsu-=nu;

/* update sbas corrections */
Expand Down Expand Up @@ -295,7 +296,7 @@ static void procpos(FILE *fp, const prcopt_t *popt, const solopt_t *sopt,
gtime_t time={0};
sol_t sol={{0}};
rtk_t rtk;
obsd_t obs[MAXOBS];
obsd_t obs[MAXOBS*2]; /* for rover and base */
double rb[3]={0};
int i,nobs,n,solstatic,pri[]={0,1,2,3,4,5,1,6};

Expand Down
76 changes: 4 additions & 72 deletions src/rcv/crescent.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* 2013/02/23 1.6 fix memory access violation problem on arm
* 2014/05/13 1.7 support bin65 and bin66
* add receiver option -TTCORR
* 2014/06/21 1.8 move decode_glostr() to rcvraw.c
*-----------------------------------------------------------------------------*/
#include "rtklib.h"

Expand Down Expand Up @@ -470,77 +471,6 @@ static int decode_cresgloraw(raw_t *raw)
raw->obs.n=n;
return 1;
}
/* get sign-magnitude bits ---------------------------------------------------*/
static double getbitg(const unsigned char *buff, int pos, int len)
{
double value=getbitu(buff,pos+1,len-1);
return getbitu(buff,pos,1)?-value:value;
}
/* decode glonass ephemeris strings ------------------------------------------*/
static int decode_glostr(raw_t *raw, int sat, int frq, geph_t *geph)
{
double tow,tod,tof,toe;
unsigned char *str;
int i=1,n1,n2,n3,n4,P,P1,P2,P3,P4,tk_h,tk_m,tk_s,tb,ln,NT,slot,M,week;

/* s1=str[0-9],s2=str[10-19],s3=str[20-29],s4=str[30-39],... */
str=raw->subfrm[sat-1];
n1 =getbitu(str,i, 4); i+= 4+2;
P1 =getbitu(str,i, 2); i+= 2;
tk_h =getbitu(str,i, 5); i+= 5;
tk_m =getbitu(str,i, 6); i+= 6;
tk_s =getbitu(str,i, 1)*30; i+= 1;
geph->vel[0]=getbitg(str,i,24)*P2_20*1E3; i+=24;
geph->acc[0]=getbitg(str,i, 5)*P2_30*1E3; i+= 5;
geph->pos[0]=getbitg(str,i,27)*P2_11*1E3; i+=27+4;
n2 =getbitu(str,i, 4); i+= 4;
geph->svh =getbitu(str,i, 3); i+= 3;
P2 =getbitu(str,i, 1); i+= 1;
tb =getbitu(str,i, 7); i+= 7+5;
geph->vel[1]=getbitg(str,i,24)*P2_20*1E3; i+=24;
geph->acc[1]=getbitg(str,i, 5)*P2_30*1E3; i+= 5;
geph->pos[1]=getbitg(str,i,27)*P2_11*1E3; i+=27+4;
n3 =getbitu(str,i, 4); i+= 4;
P3 =getbitu(str,i, 1); i+= 1;
geph->gamn =getbitg(str,i,11)*P2_40; i+=11+1;
P =getbitu(str,i, 2); i+= 2;
ln =getbitu(str,i, 1); i+= 1;
geph->vel[2]=getbitg(str,i,24)*P2_20*1E3; i+=24;
geph->acc[2]=getbitg(str,i, 5)*P2_30*1E3; i+= 5;
geph->pos[2]=getbitg(str,i,27)*P2_11*1E3; i+=27+4;
n4 =getbitu(str,i, 4); i+= 4;
geph->taun =getbitg(str,i,22)*P2_30; i+=22;
geph->dtaun =getbitg(str,i, 5)*P2_30; i+= 5;
geph->age =getbitu(str,i, 5); i+= 5+14;
P4 =getbitu(str,i, 1); i+= 1;
geph->sva =getbitu(str,i, 4); i+= 4+3;
NT =getbitu(str,i,11); i+=11;
slot =getbitu(str,i, 5); i+= 5;
M =getbitu(str,i, 2);

if (n1!=1||n2!=2||n3!=3||n4!=4) {
trace(2,"decode_glostr: str no error no=%d %d %d %d\n",n1,n2,n3,n4);
return 0;
}
if (sat!=satno(SYS_GLO,slot)) {
trace(2,"decode_glostr: slot no error sat=%2d slot=%2d\n",sat,slot);
return 0;
}
geph->sat=sat;
geph->frq=frq;
geph->iode=tb;
tow=time2gpst(gpst2utc(raw->time),&week);
tod=fmod(tow,86400.0); tow-=tod;
tof=tk_h*3600.0+tk_m*60.0+tk_s-10800.0; /* lt->utc */
if (tof<tod-43200.0) tof+=86400.0;
else if (tof>tod+43200.0) tof-=86400.0;
geph->tof=utc2gpst(gpst2time(week,tow+tof));
toe=tb*900.0-10800.0; /* lt->utc */
if (toe<tod-43200.0) toe+=86400.0;
else if (toe>tod+43200.0) toe-=86400.0;
geph->toe=utc2gpst(gpst2time(week,tow+toe)); /* utc->gpst */
return 1;
}
/* decode bin 65 glonass ephemeris -------------------------------------------*/
static int decode_cresgloeph(raw_t *raw)
{
Expand Down Expand Up @@ -572,7 +502,9 @@ static int decode_cresgloeph(raw_t *raw)
memcpy(raw->subfrm[sat-1]+10*i,str,10);
}
/* decode glonass ephemeris strings */
if (!decode_glostr(raw,sat,frq,&geph)) return -1;
geph.tof=raw->time;
if (!decode_glostr(raw->subfrm[sat-1],&geph)||geph.sat!=sat) return -1;
geph.frq=frq;

if (!strstr(raw->opt,"-EPHALL")) {
if (geph.iode==raw->nav.geph[prn-1].iode) return 0; /* unchanged */
Expand Down
65 changes: 58 additions & 7 deletions src/rcv/javad.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 2013/02/23 1.6 fix memory access violation problem on arm
* 2013/05/08 1.7 fix bug on week number of galileo ephemeris
* 2014/05/23 1.8 support beidou
* 2014/06/23 1.9 support [lD] for glonass raw navigation data
*-----------------------------------------------------------------------------*/
#include "rtklib.h"

Expand Down Expand Up @@ -856,7 +857,7 @@ static int decode_L2nav(unsigned char *buff, int len, int sat, raw_t *raw)
trace(2,"javad *d sat=%2d L2 CNAV preamble error preamb=%02X\n",preamb);
return -1;
}
trace(2,"L2CNAV: sat=%2d prn=%2d msgid=%2d tow=%6d alert=%d\n",sat,prn,
trace(3,"L2CNAV: sat=%2d prn=%2d msgid=%2d tow=%6d alert=%d\n",sat,prn,
msgid,tow,alert);

return 0;
Expand All @@ -883,7 +884,7 @@ static int decode_L5nav(unsigned char *buff, int len, int sat, raw_t *raw)
trace(2,"javad *d sat=%2d L5 CNAV preamble error preamb=%02X\n",preamb);
return -1;
}
trace(2,"L5CNAV: sat=%2d prn=%2d msgid=%2d tow=%6d alert=%d\n",sat,prn,
trace(3,"L5CNAV: sat=%2d prn=%2d msgid=%2d tow=%6d alert=%d\n",sat,prn,
msgid,tow,alert);

return 0;
Expand Down Expand Up @@ -971,12 +972,62 @@ static int decode_LD(raw_t *raw)

return 0;
}
/* decode [ID] glonass raw navigation data -----------------------------------*/
static int decode_ID(raw_t *raw)
/* decode [lD] glonass raw navigation data -----------------------------------*/
static int decode_lD(raw_t *raw)
{
trace(2,"javad ID not supported\n");
geph_t geph={0};
unsigned char *p=raw->buff+5;
char *msg;
int i,sat,prn,frq,time,type,len,id;

return 0;
if (!checksum(raw->buff,raw->len)) {
trace(2,"javad lD checksum error: len=%d\n",raw->len);
return -1;
}
trace(3,"decode_lD: prn=%3d\n",U1(p));

prn =U1(p); p+=1;
frq =I1(p); p+=1;
time=U4(p); p+=4;
type=U1(p); p+=1;
len =U1(p); p+=1;

if (raw->len!=14+len*4) {
trace(2,"javad lD length error: len=%d\n",raw->len);
return -1;
}
if (raw->outtype) {
msg=raw->msgtype+strlen(raw->msgtype);
sprintf(msg," prn=%2d frq=%2d time=%7d type=%d",prn,frq,time,type);
}
if (!(sat=satno(SYS_GLO,prn))) {
trace(2,"javad lD satellite error: prn=%d\n",prn);
return 0;
}
if (type!=0) {
trace(3,"javad lD type not supported: type=%d\n",type);
return 0;
}
if ((id=(U4(p)>>20)&0xF)<1) return 0;

/* get 77 bit (25x3+2) in frame without hamming and time mark */
for (i=0;i<4;i++) {
setbitu(raw->subfrm[sat-1]+(id-1)*10,i*25,i<3?25:2,
U4(p+4*i)>>(i<3?0:23));
}
if (id!=4) return 0;

/* decode glonass ephemeris strings */
geph.tof=raw->time;
if (!decode_glostr(raw->subfrm[sat-1],&geph)||geph.sat!=sat) return -1;
geph.frq=frq;

if (!strstr(raw->opt,"-EPHALL")) {
if (geph.iode==raw->nav.geph[prn-1].iode) return 0; /* unchanged */
}
raw->nav.geph[prn-1]=geph;
raw->ephsat=sat;
return 2;
}
/* decode [WD] waas raw navigation data --------------------------------------*/
static int decode_WD(raw_t *raw)
Expand Down Expand Up @@ -1567,7 +1618,7 @@ static int decode_javad(raw_t *raw)
if (!strncmp(p,"ED",2)) return decode_nd(raw,SYS_GAL); /* raw navigation data */
if (!strncmp(p,"cd",2)) return decode_nd(raw,SYS_CMP); /* raw navigation data */
if (!strncmp(p,"LD",2)) return decode_LD(raw); /* glonass raw navigation data */
if (!strncmp(p,"ID",2)) return decode_ID(raw); /* glonass raw navigation data */
if (!strncmp(p,"lD",2)) return decode_lD(raw); /* glonass raw navigation data */
if (!strncmp(p,"WD",2)) return decode_WD(raw); /* sbas raw navigation data */

if (!strncmp(p,"TC",2)) return decode_TC(raw); /* CA/L1 continuous track time */
Expand Down
2 changes: 1 addition & 1 deletion src/rcv/novatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ static int decode_bdsephemerisb(raw_t *raw)
eph.ttr=raw->time;

if (!strstr(raw->opt,"-EPHALL")) {
if (raw->nav.eph[eph.sat-1].iode==eph.iode) return 0; /* unchanged */
if (timediff(raw->nav.eph[eph.sat-1].toe,eph.toe)==0.0) return 0; /* unchanged */
}
raw->nav.eph[eph.sat-1]=eph;
raw->ephsat=eph.sat;
Expand Down
Loading

0 comments on commit 0acd857

Please sign in to comment.