#!/bin/csh -bf # # gp.CommandLine # # Script examines arguments to gp.driver command line. # Stops if they fail checks. # # 1995/10/10 whp: Created # # Modifications: # 1996/01/21 whp Added SaveRemoteOnly switch. # 1996/01/22 whp Removed SaveRemoteOnly switch; # Decided to use a separate program. # 1996/04/26 jls Added BiasCutoff switch. # 1997/01/14 jls Added OrbitType switch. # 1997/10/28 whp Added UseTrackStas switch. # 1997/12/16 whp Reorganized order of arguments; # Eliminated test on existence of SaveObsDate file; # Added -q option to look for existing qm files # in archive. # 1998/02/12 whp Added UseTropGrad switch. # 1998/02/17 whp Fixed bug that caused -nt option to swallow # the next option. # 1998/04/08 jls Added point positioning switch. # 1998/04/24 whp Added verbose switch. # 1998/04/24 whp Changed default edit limit to 6. # 1998/10/09 jls Added save switch. # 2001/06/08 whp Made -tg and -point the default options with a warning. # Read default flags from ProcessFlags file, # if one exists. Otherwise set to defaults. # ----------------------------------------- echo "Command line arguments: $argv" if ( -e ProcessFlags) then set BiasCutoff = `grep BiasCutoff ProcessFlags | awk '{print $2}'` set CleanUp = `grep CleanUp ProcessFlags | awk '{print $2}'` set Develop = `grep Develop ProcessFlags | awk '{print $2}'` set EditLimit = `grep EditLimit ProcessFlags | awk '{print $2}'` set ExistingData = `grep ExistingData ProcessFlags | awk '{print $2}'` set FiducialsFixed = `grep FiducialsFixed ProcessFlags | awk '{print $2}'` set Interval = `grep Interval ProcessFlags | awk '{print $2}'` set OrbitType = `grep OrbitType ProcessFlags | awk '{print $2}'` set OutliersOnly = `grep OutliersOnly ProcessFlags | awk '{print $2}'` set PointPosition = `grep PointPosition ProcessFlags | awk '{print $2}'` set Rerun = `grep Rerun ProcessFlags | awk '{print $2}'` set SolveLimit = `grep SolveLimit ProcessFlags | awk '{print $2}'` set StopOnErrors = `grep StopOnErrors ProcessFlags | awk '{print $2}'` set TDP = `grep TDP ProcessFlags | awk '{print $2}'` set UseExistQMs = `grep UseExistQMs ProcessFlags | awk '{print $2}'` set UseTrackStas = `grep UseTrackStas ProcessFlags | awk '{print $2}'` set UseTropGrad = `grep UseTropGrad ProcessFlags | awk '{print $2}'` set Verbose = `grep Verbose ProcessFlags | awk '{print $2}'` set Save = `grep Save ProcessFlags | awk '{print $2}'` # Note: IncRefSta is included for backward compatibility. # ------------------------------------------------------- if ($UseTrackStas == "") then set UseTrackStas = `grep IncRefSta ProcessFlags | awk '{print $2}'` endif if ($UseTropGrad == "") then set UseTropGrad = "no" endif else set BiasCutoff = 200.0 set CleanUp = 0 set Develop = 0 set ExistingData = 0 set EditLimit = 6 set FiducialsFixed = 0 set Interval = 300 set OrbitType = F set OutliersOnly = 0 set PointPosition = "yes" set Rerun = 0 set SolveLimit = 5 set StopOnErrors = "no" set TDP = "ignore" set UseExistQMs = yes set UseTrackStas = yes set UseTropGrad = "yes" set Verbose = "no" set Save = "no" endif set Date = "none" # Loop on all the command line arguments. # -------------------------------------- set k = 1 while ($k <= $#argv) switch ($argv[$k]) case -bc: @ k++ set BiasCutoff = $argv[$k] @ k++ breaksw case -c: set CleanUp = 1 @ k++ breaksw case -d: @ k++ set Date = $argv[$k] @ k++ breaksw case -dev: set Develop = 1 @ k++ breaksw case -e: set ExistingData = 1 @ k++ breaksw case -el: @ k++ set EditLimit = $argv[$k] @ k++ breaksw case -ff: set FiducialsFixed = 1 @ k++ breaksw case -i: @ k++ set Interval = $argv[$k] @ k++ breaksw case -nopoint: set PointPosition = "no" @ k++ breaksw case -nt: set UseTrackStas = no @ k++ breaksw case -notg: set UseTropGrad = "no" @ k++ breaksw case -ol: set OutliersOnly = 1 set SolveLimit = 1 @ k++ breaksw case -ot: @ k++ set OrbitType = $argv[$k] @ k++ breaksw case -point: echo "Warning: Point positioning is now the default" echo "Use -nopoint to turn it off" @ k++ breaksw case -q: set UseExistQMs = "no" @ k++ breaksw case -r: set Rerun = 1 @ k++ breaksw case -sl: @ k++ set SolveLimit = $argv[$k] @ k++ breaksw case -st: @ k++ set StopOnErrors = "yes" @ k++ breaksw case -TDP: @ k++ switch ($argv[$k]) case c: set TDP = "create" breaksw case u: set TDP = "use" breaksw case i: set TDP = "ignore" breaksw case o: set TDP = "other" breaksw default: set TDP = "ignore" breaksw endsw @ k++ breaksw case -tg: echo "Warning: Tropospheric gradient is used by default" echo "Use -notg to turn it off" @ k++ breaksw case -v: set Verbose = "yes" @ k++ breaksw case -save: set Save = "yes" @ k++ breaksw case help: case -help: case -H: case -h: @ k++ more << EOF ------------------------------------------------------ Usage: gp.[queue|driver|CommandLine] [-bc xxx.x] [-c] [-d yyyymmdd] [-dev] \ [-e] [-el nn] [-ff] [-i sss] [-nt] \ [-ot F|P] [-q] [-r] [-sl nn] \ [-TDP c|u|a|i|o[-ol] [-st] [-tg] [-point] [-v] [-save] -bc Sets a length after which gipsy will no longer attempt to fix phase ambiguities. Default value is 200 km. You may wish to make this value shorter if you are working with codeless receivers. -c Remove unwanted output; copy some files to attic. compress directory (Not currently implemented). -d yyyymmdd Date to be processed (required unless a SaveObsDate file exists) -dev Turn on development features. -e Assumes remote data exists in working directory; and that local and remote data are already in jpl naming convention (Not implemented). Note: -e starts with .rnx files in local directory -q starts with .qm files in archive -r starts with .qm files in local directory -el Set number of iterations to use in Edit processing loop. 0 turns it off. Default is $EditLimit. -ff Fiducials Fixed: Including this flag will constrain coordinates of "track" stations to 0.1 mm. Default is all stations 0.1 km. -i sss Desired interval in seconds between epochs Defaults to 300 secs for new run. Ignored if -rerun is included. -nopoint Turn off point positioning. -notg Turn off tropospheric gradients. -nt Omit tracking stations when transforming non-fiducial solution into a reference frame. yes => use fiducials (default) no => omit fiducials -ol Process through Postfit, generate outlier list, then stop. Note: This option sets SolveLimit to 1. -ot Flag indicating the type of orbit to be used in processing. Flag should be "F" to indicate precise IGS orbits, "P" to indicate JPL predicted orbits, or "B" to indicate broadcast orbits (not yet implemented). -point Do "point positioning" using JPL orbits and clock files. Default is "yes". This option invokes xt-gipsy and uses all gipsy 8a defaults. Use -nopoint to turn it off. -q Ignore qm files in archive. Without -q option, software uses any existing qm files it finds. With -q option, program recleans the rinex files. -r Delete everything in working directory except qm files and orbit files and start from these. Note: -e starts with .rnx files in local directory -q starts with .qm files in archive -r starts with .qm files in local directory -sl Set number of iterations to use in Solve processing loop. 0 turns off PrePre, Pre, Filter and Postbreak processing. Default is $SolveLimit. Setting limit to 1 turns off just postbreak. -st Stop if there are errors for a single station. Normally, point positioning keeps going to next station. -TDP c|u|i -TDP c create a new TDPTABLE (in smapper) -TDP u - use an existing TDPTABLE (in qregres) -TDP a - use a special template for wash_nml (to pick out only very large outliers) -TDP i - ignore TDPTABLE (i-option is equivalent to omitting -TDP) -tg Use tropospheric gradient model Default is "yes". This flag is unnecessary. -v Verbose output Default is "no". This flag switches to "yes". -save Save all log and output files along with working directory. Default is "no". This flag switches to "yes". Example 1: qp.xxx -d 941117 -i 300 Data will be processed for date 94/11/17, and the data will be decimated to one point every 300 seconds. Example 2: qp.xxx -r Skip the data cleaning (ninja) and start with existing qm files. Example 3: qp.xxx -e Skip the data downloading and renaming and start with existing jpl-named rinex files. Example 4: qp.xxx -d 950522 -TDP c qp.xxx -r -TDP u First create a TDPTABLE in smapper then rerun using TDPTABLE in qregres. Example 5: qp.xxx -r -bc 50 Skip the data cleaning (ninja) and start with existing qm files. Also, do not attempt to fix ambiguities on lines longer than 50km. Current values of unspecified options are read from ProcessFlags file if it exists. -------------------------------------------------------------------- EOF exit 1 breaksw default: echo "Unrecognized argument $argv[$k]" more << EOF Usage: -->gp.[queue|driver|CommandLine] [-bc xxx.x] [-c] [-d yyyymmdd] [-dev] [-e] [-el nn] [-ff] [-h|-H|-help] [-i sss] [-nt] [-ol] [-ot F|P] [-q] [-r] [-sl nn] [-TDP c|u|a|i|o] [-tg] [-point] For more information type "qp.xxx help" EOF exit 1 breaksw endsw end # while loop over command line arguments # Save current values of switches in ProcessFlags # ----------------------------------------------- echo "ProcessFlags" > ProcessFlags echo "1 = true or do it" >> ProcessFlags echo "0 = false or don't use" >> ProcessFlags echo "----------------------" >> ProcessFlags echo "BiasCutoff $BiasCutoff" >> ProcessFlags echo "CleanUp $CleanUp" >> ProcessFlags echo "Develop $Develop" >> ProcessFlags echo "EditLimit $EditLimit" >> ProcessFlags echo "ExistingData $ExistingData" >> ProcessFlags echo "FiducialsFixed $FiducialsFixed" >> ProcessFlags echo "Interval $Interval" >> ProcessFlags echo "OrbitType $OrbitType" >> ProcessFlags echo "OutliersOnly $OutliersOnly" >> ProcessFlags echo "PointPosition $PointPosition" >> ProcessFlags echo "Rerun $Rerun" >> ProcessFlags echo "SolveLimit $SolveLimit" >> ProcessFlags echo "StopOnErrors $StopOnErrors" >> ProcessFlags echo "TDP $TDP" >> ProcessFlags echo "UseExistQMs $UseExistQMs" >> ProcessFlags echo "UseTrackStas $UseTrackStas" >> ProcessFlags echo "UseTropGrad $UseTropGrad" >> ProcessFlags echo "Verbose $Verbose" >> ProcessFlags echo "Save $Save" >> ProcessFlags # Check for various ways to establish observation date. # Highest priority given to -d option. If it was not # specified, look for SaveObsDate file. If # neither is found, terminate processing. # --------------------------------------- if ( $Date != "none" ) then # (i.e We have a date from -d option) CreateObsDateFile $Date if (! -e SaveObsDate ) then echo "gp.CommandLine: *Error* - No date file (SaveObsDate)" exit 2 endif # ( -e SaveObsDate ) endif # ( $Date == "none" ) exit