From becd1ded18a6506ef06be7d80a18c460f4cf4c55 Mon Sep 17 00:00:00 2001 From: Bob Van Valzah Date: Wed, 20 May 2026 14:56:16 -0500 Subject: [PATCH] pdp3.sh: respect pre-staged broadcast nav on same-day runs PrepareRinexNav has four branches that supply brdm{doy}0.{yy}p; the three later branches (lines 2112, 2122, 2143) all wrap themselves in 'if [ ! -f "$rinex_dir/$rinexnav" ]', but the same-day hourly merge branch at line 2076 runs unconditionally and 'mv -f's a GPS+GLONASS merge over any pre-staged file. Operators who pre-stage a multi-GNSS brdm (e.g., a BRDC00IGS or BRDM00DLR file containing GAL and BDS records) then see their file silently overwritten on same-day runs, after which Galileo and BeiDou observations are rejected as DEL_BADRANGE. Add the same existence guard the other three branches already use. --- scripts/pdp3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pdp3.sh b/scripts/pdp3.sh index 5c4a8f7..eff2961 100644 --- a/scripts/pdp3.sh +++ b/scripts/pdp3.sh @@ -2073,7 +2073,7 @@ PrepareRinexNav() { # purpose : prepare RINEX multi-systems broadcast ephemeride local rinexnav="brdm${doy}0.${year:2:2}p" # Try downloading hourly navigation file when processing current day's data - if [ $(date -u +"%Y%j") -eq "$year$doy" ]; then + if [ $(date -u +"%Y%j") -eq "$year$doy" ] && [ ! -f "$rinex_dir/$rinexnav" ]; then local navgps="hour${doy}0.${year:2:2}n" && rm -f "$navgps" local urlnav="ftp://igs.gnsswhu.cn/pub/gps/data/hourly/${year}/${doy}/${navgps}.gz" WgetDownload "$urlnav"