Skip to content

Commit 6cd09ac

Browse files
committed
Add agency and observer in information that com from sitelog
1 parent fef45c7 commit 6cd09ac

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

CODE/shells/gnss_make_rinex

+12-4
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ for station in $NODES; do
169169
anttype=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.at' | tr -d '"')
170170
antnum=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.an' | tr -d '"')
171171
posxyz=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.px' | tr -d '"')
172-
alertheader=" $DAYLYMSG sitelog: receiver = '$receiver' - antenna type = '$anttype' - antenna s/n = '$antnum' (will use rinex header if empty)"
172+
observer=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.op' | tr -d '"')
173+
agency=$($PROGDIR/sitelog2json "$SITELOG" $FID $ymd|jq '.ag' | tr -d '"')
174+
alertheader=" $DAYLYMSG sitelog: receiver='$receiver' - antenna type='$anttype' - antenna s/n='$antnum' - observer='$observer' - agency='$agency' (will use rinex header if empty)"
173175
else
174176
echo " $DAYLYMSG - Warning - sitelog : SITELOG is empty in .rc file !!!"
175177
fi
@@ -178,7 +180,7 @@ for station in $NODES; do
178180
echo " $DAYLYMSG - Warning - bad site information source "
179181
esac
180182
fi
181-
if [[ ! -z "$receiver$anttype$antnum$posxyz" ]]; then
183+
if [[ ! -z "$receiver$anttype$antnum$posxyz$observer$agency" ]]; then
182184
echo "$alertheader"
183185
# transform site imformation in teqc option
184186
if [ ! -z "$receiver" ]; then
@@ -193,16 +195,22 @@ for station in $NODES; do
193195
if [ ! -z "$posxyz" ]; then
194196
posxyz=" -O.px $posxyz"
195197
fi
198+
if [ ! -z "$observer" ]; then
199+
observer=" -O.op $observer"
200+
fi
201+
if [ ! -z "$agency" ]; then
202+
agency=" -O.ag $agency"
203+
fi
196204
else
197205
echo " $DAYLYMSG - Warning - No site information fond in $INFOSRC, Rinex will be generated whithout overwriting headers if empty"
198206
fi
199207

200208

201209
# makes Rinex daily file from raw data (see raw2rinex script)
202210
mkdir -p $RINEX
203-
$PROGDIR/raw2rinex "$RAW" $RINEX $TEQCOPTIONS -O.mn \"$FID\" -O.mo \"$FID\" $receiver $anttype $antnum $posxyz
211+
$PROGDIR/raw2rinex "$RAW" $RINEX $TEQCOPTIONS -O.mn \"$FID\" -O.mo \"$FID\" $receiver $anttype $antnum $posxyz $observer $agency
204212
if [[ ! -z $VERBOSE || $? != 0 ]]; then
205-
echo " $PROGDIR/raw2rinex \"$RAW\" $RINEX $TEQCOPTIONS -O.mn \"$FID\" -O.mo \"$FID\" $receiver $anttype $antnum $posxyz"
213+
echo " $PROGDIR/raw2rinex \"$RAW\" $RINEX $TEQCOPTIONS -O.mn \"$FID\" -O.mo \"$FID\" $receiver $anttype $antnum $posxyz $observer $agency"
206214
fi
207215
else
208216
echo " $DAYLYMSG no data to process in $RAW."

CODE/shells/gnss_make_rinex.rc

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ NODEROOT=/etc/webobs.d/GRID2NODES/$GRID.
1515
# it can be a site_log file, a station.info file (Gamit), or the webobs node informations
1616
# this option can be also pass in parameters with "-i"
1717
# valid variables are : SITELOG (recommended) / WEBOBS / STATION_INFO
18-
INFOSRC=WEBOBS
18+
INFOSRC=SITELOG
1919

2020
# site information source parameters :
2121
# - sitelog directory, must be filled to use SITELOG as INFOSRC
@@ -37,5 +37,5 @@ FMT='$FROM/$FID/$yyyy/$mm/$dd'
3737
DEST=/opt/webobs/rawdata
3838

3939
# teqc options: Please take a deep look at www.unavco.org TEQC tutorial!
40-
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"
40+
TEQCOPTIONS='+quiet -O.pe 0 0 0 -C2 -O.-obs C2 -O.-obs C5 -O.dec 30s -max_rx_SVs 50 -n_GLONASS 27'
4141

CODE/shells/sitelog2json

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ fi
5252
if [ ! -z "$FILE" ]; then
5353
#******************* site *******************
5454
JSON={\"mo\":\"${SITE}\"
55+
#******************* Serial number *******************
5556
JSON=$JSON,\"sn\":\"$(sed -n "/^1\. /,/Site Name/p" ${FILE} | tail -n1 | sed -e 's/^.*: //g')\"
5657
#******************* Approximative position *******************
5758
JSON=$JSON,\"px\":\"$(sed -n "/^2\. /,/Z coordinate/p" ${FILE} | tail -n3 | sed -e 's/^.*: //g')\"
@@ -67,7 +68,9 @@ if [ ! -z "$FILE" ]; then
6768
awk -F '\t' -v date="${DATE}" '{ if (date >= $12 && date <= $13) \
6869
printf ",\"at\":\"%s\",\"an\":\"%s\",\"pe\":\"%1.4f %1.4f %1.4f\"", $1, $2, $4, $5, $6 }'
6970
)
71+
#******************* Observer *******************
7072
JSON=$JSON,\"op\":\"$(sed -n "/^11\. /,/Abbreviation/p" ${FILE} | tail -n1 | sed -e 's/^.*: //g')\"
73+
#******************* Agency ******************
7174
JSON=$JSON,\"ag\":\"$(sed -n "/^12\. /,/Abbreviation/p" ${FILE} | tail -n1 | sed -e 's/^.*: //g')\"}
7275
echo $JSON
7376
fi

0 commit comments

Comments
 (0)