pdp3.sh: respect pre-staged broadcast nav on same-day runs#58
Open
bobvan wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PrepareRinexNavinscripts/pdp3.shhas four code paths that supplythe broadcast-ephemeris file
brdm{doy}0.{yy}pfor a processingsession. Three of them respect an already-present file via
if [ ! -f "$rinex_dir/$rinexnav" ]; then ...(lines 2112, 2122,2143). The fourth — the same-day hourly download + merge block at
line 2076 — runs unconditionally and clobbers any pre-staged file via
mv -fat line 2095.This breaks workflows in which the operator pre-stages a multi-GNSS
brdm at the canonical name (e.g., a full
BRDM00DLRorBRDC00IGSfile containing GPS + GLONASS + Galileo + BeiDou +QZSS records) and then runs
pdp3 -m Sfor the current UTC day:the hourly fetch downloads GPS + GLONASS hourly nav,
merge2brdm.pyproduces a GPS+GLONASS-only merged file, and themv -foverwrites the operator's multi-GNSS brdm. Downstreamprocessing then rejects Galileo and BeiDou observations as
DEL_BADRANGEbecause their ephemerides are no longer present inthe (now-overwritten) brdm.
Reproduction
Result before this patch: pdp3 logs
===> Merging brdm${doy}0.${yy}p ...,overwrites the pre-staged file with a GPS+GLONASS-only product, then
emits
DEL_BADRANGEfor every Galileo observation intedit'soutput.
Result after this patch: the existence check short-circuits the
same-day download/merge branch, the operator's pre-staged file is
preserved, and Galileo + BeiDou observations are processed normally.
Fix
Add an existence guard to the same-day branch, matching the pattern
used by the three blocks that follow it. One-line change:
The new condition matches the symmetric pattern already in use at
lines 2112, 2122, and 2143: each of those blocks is wrapped in
if [ ! -f "$rinex_dir/$rinexnav" ]; then. Block 2076 is the onlynav-acquisition branch in
PrepareRinexNavthat did not previouslyrespect a pre-existing file.
Backward compatibility
When no file is pre-staged at
$rinex_dir/$rinexnav, the newcondition evaluates the same as the old one and the same-day hourly
download + merge runs as before. This change only affects the case
where the operator has explicitly staged a file at the canonical
name, which is exactly the case where the previous behavior was
silently destructive.
Field-tested context
We hit this in a lab automation pipeline that pre-stages BKG-mirrored
multi-GNSS brdm files for same-day captures (5–60 minute arcs from
ZED-F9T receivers, processed within the same UTC day they were
captured). The local fix has been running across four lab hosts for
~12 hours without regressions; the only behavior change is that
pre-staged Galileo + BeiDou ephemerides are now respected.