diff --git a/src/spp/dispinfo.f90 b/src/spp/dispinfo.f90 index 0ce90d9..be513da 100644 --- a/src/spp/dispinfo.f90 +++ b/src/spp/dispinfo.f90 @@ -47,7 +47,7 @@ subroutine printhelp() implicit none include 'file_para.h' integer*4 i -character(63) :: helptext(42)=(/& +character(63) :: helptext(46)=(/& " ",& "spp version 3.0, based on open-source software rtklib. ",& " Wuhan University, Oct. 2024 ",& @@ -82,6 +82,10 @@ subroutine printhelp() " -twnd [window] ",& " processing time window in seconds, for not standard or ",& " super high rate rinex obs. Default is 0.01. (Unit: second) ",& + " -sys [letters] ",& + " select constellations (RINEX letters, no spaces needed). ",& + " G=GPS R=GLONASS E=Galileo C=BeiDou J=QZSS I=NavIC S=SBAS ",& + " e.g. -sys GEC uses GPS+Galileo+BeiDou. Default GREC. ",& " ",& "Examples: ",& " spp -o kin_brux brux0010.24o brdm0010.24p ",& diff --git a/src/spp/get_spp_args.f90 b/src/spp/get_spp_args.f90 index 7704f71..e4e1061 100644 --- a/src/spp/get_spp_args.f90 +++ b/src/spp/get_spp_args.f90 @@ -12,13 +12,15 @@ subroutine get_spp_args(ts,te,ti,twnd,prcopt,rnxolist,nrnxo,rnxnlist,nrnxn,outfi ! local integer*4 :: argc, i, nfile, info, mjd_s, trnxo, trnxn + integer*4 :: js, newsys + character(1) :: ch character(1024), pointer :: argv(:) character(1024) :: buff(6), infile(MAXFILE), flntmp, flntmp2, navdir, obsdir real*8 :: es(6), ee(6) ! function integer*4,external :: ymd2mjd, getrnxtyp, flexist - logical*1,external :: IsDayRight, IsTimeRight + logical*1,external :: IsDayRight, IsTimeRight, IsSysToken type(gtime_t),external :: epoch2time ! Initialize variables @@ -79,6 +81,26 @@ subroutine get_spp_args(ts,te,ti,twnd,prcopt,rnxolist,nrnxo,rnxnlist,nrnxn,outfi elseif(argv(i)=='-elev'.and.(i+1)<=argc)then read(argv(i+1),*,iostat=info) prcopt%elmin prcopt%elmin=prcopt%elmin*D2R; i=i+1 + elseif(argv(i)=='-sys'.and.(i+1)<=argc)then + ! pick which constellations to use, e.g. -sys GEC + ! G=GPS R=GLO E=GAL C=BDS J=QZS I=IRN S=SBAS. default is GREC + newsys=SYS_NONE + do while((i+1)<=argc) + if(argv(i+1)(1:1)=='-') exit ! next option, stop + if(.not.IsSysToken(trim(argv(i+1)))) exit + do js=1,len_trim(argv(i+1)) + ch=argv(i+1)(js:js) + if(ch=='G'.or.ch=='g') newsys=or(newsys,SYS_GPS) + if(ch=='R'.or.ch=='r') newsys=or(newsys,SYS_GLO) + if(ch=='E'.or.ch=='e') newsys=or(newsys,SYS_GAL) + if(ch=='C'.or.ch=='c') newsys=or(newsys,SYS_CMP) + if(ch=='J'.or.ch=='j') newsys=or(newsys,SYS_QZS) + if(ch=='I'.or.ch=='i') newsys=or(newsys,SYS_IRN) + if(ch=='S'.or.ch=='s') newsys=or(newsys,SYS_SBS) + enddo + i=i+1 + enddo + if(newsys/=SYS_NONE) prcopt%navsys=newsys elseif(nfile