diff --git a/CODE/shells/gnss_make_rinex b/CODE/shells/gnss_make_rinex index 5d614c45..dea16be0 100755 --- a/CODE/shells/gnss_make_rinex +++ b/CODE/shells/gnss_make_rinex @@ -169,7 +169,9 @@ for station in $NODES; do anttype=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.at' | tr -d '"') antnum=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.an' | tr -d '"') posxyz=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.px' | tr -d '"') - alertheader=" $DAYLYMSG sitelog: receiver = '$receiver' - antenna type = '$anttype' - antenna s/n = '$antnum' (will use rinex header if empty)" + observer=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.op' | tr -d '"') + agency=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.ag' | tr -d '"') + alertheader=" $DAYLYMSG sitelog: receiver='$receiver' - antenna type='$anttype' - antenna s/n='$antnum' - observer='$observer' - agency='$agency' (will use rinex header if empty)" else echo " $DAYLYMSG - Warning - sitelog : SITELOG is empty in .rc file !!!" fi @@ -178,7 +180,7 @@ for station in $NODES; do echo " $DAYLYMSG - Warning - bad site information source " esac fi - if [[ ! -z "$receiver$anttype$antnum$posxyz" ]]; then + if [[ ! -z "$receiver$anttype$antnum$posxyz$observer$agency" ]]; then echo "$alertheader" # transform site imformation in teqc option if [ ! -z "$receiver" ]; then @@ -193,6 +195,12 @@ for station in $NODES; do if [ ! -z "$posxyz" ]; then posxyz=" -O.px $posxyz" fi + if [ ! -z "$observer" ]; then + observer=" -O.op $observer" + fi + if [ ! -z "$agency" ]; then + agency=" -O.ag $agency" + fi else echo " $DAYLYMSG - Warning - No site information fond in $INFOSRC, Rinex will be generated whithout overwriting headers if empty" fi @@ -200,9 +208,9 @@ for station in $NODES; do # makes Rinex daily file from raw data (see raw2rinex script) mkdir -p $RINEX - $PROGDIR/raw2rinex "$RAW" $RINEX $TEQCOPTIONS -O.mn \"$FID\" -O.mo \"$FID\" $receiver $anttype $antnum $posxyz + $PROGDIR/raw2rinex "$RAW" $RINEX $TEQCOPTIONS -O.mn \"$FID\" -O.mo \"$FID\" $receiver $anttype $antnum $posxyz $observer $agency if [[ ! -z $VERBOSE || $? != 0 ]]; then - echo " $PROGDIR/raw2rinex \"$RAW\" $RINEX $TEQCOPTIONS -O.mn \"$FID\" -O.mo \"$FID\" $receiver $anttype $antnum $posxyz" + echo " $PROGDIR/raw2rinex \"$RAW\" $RINEX $TEQCOPTIONS -O.mn \"$FID\" -O.mo \"$FID\" $receiver $anttype $antnum $posxyz $observer $agency" fi else echo " $DAYLYMSG no data to process in $RAW." diff --git a/CODE/shells/gnss_make_rinex.rc b/CODE/shells/gnss_make_rinex.rc index 38db4f8c..77fef5f8 100644 --- a/CODE/shells/gnss_make_rinex.rc +++ b/CODE/shells/gnss_make_rinex.rc @@ -15,7 +15,7 @@ NODEROOT=/etc/webobs.d/GRID2NODES/$GRID. # it can be a site_log file, a station.info file (Gamit), or the webobs node informations # this option can be also pass in parameters with "-i" # valid variables are : SITELOG (recommended) / WEBOBS / STATION_INFO -INFOSRC=WEBOBS +INFOSRC=SITELOG # site information source parameters : # - sitelog directory, must be filled to use SITELOG as INFOSRC @@ -37,5 +37,5 @@ FMT='$FROM/$FID/$yyyy/$mm/$dd' DEST=/opt/webobs/rawdata # teqc options: Please take a deep look at www.unavco.org TEQC tutorial! -TEQCOPTIONS="+quiet -O.ag 'IPGP' -O.op 'WO' -O.pe 0 0 0 -C2 -O.-obs C2 -O.-obs C5 -O.dec 30s -max_rx_SVs 50 -n_GLONASS 27" +TEQCOPTIONS='+quiet -O.pe 0 0 0 -C2 -O.-obs C2 -O.-obs C5 -O.dec 30s -max_rx_SVs 50 -n_GLONASS 27' diff --git a/CODE/shells/sitelog2json b/CODE/shells/sitelog2json index d1460f68..5109a0e6 100755 --- a/CODE/shells/sitelog2json +++ b/CODE/shells/sitelog2json @@ -52,6 +52,7 @@ fi if [ ! -z "$FILE" ]; then #******************* site ******************* JSON={\"mo\":\"${SITE}\" + #******************* Serial number ******************* JSON=$JSON,\"sn\":\"$(sed -n "/^1\. /,/Site Name/p" ${FILE} | tail -n1 | sed -e 's/^.*: //g')\" #******************* Approximative position ******************* JSON=$JSON,\"px\":\"$(sed -n "/^2\. /,/Z coordinate/p" ${FILE} | tail -n3 | sed -e 's/^.*: //g')\" @@ -67,7 +68,9 @@ if [ ! -z "$FILE" ]; then awk -F '\t' -v date="${DATE}" '{ if (date >= $12 && date <= $13) \ printf ",\"at\":\"%s\",\"an\":\"%s\",\"pe\":\"%1.4f %1.4f %1.4f\"", $1, $2, $4, $5, $6 }' ) + #******************* Observer ******************* JSON=$JSON,\"op\":\"$(sed -n "/^11\. /,/Abbreviation/p" ${FILE} | tail -n1 | sed -e 's/^.*: //g')\" + #******************* Agency ****************** JSON=$JSON,\"ag\":\"$(sed -n "/^12\. /,/Abbreviation/p" ${FILE} | tail -n1 | sed -e 's/^.*: //g')\"} echo $JSON fi