Skip to content

Product bundles - #40

Open
mikegottlieb84 wants to merge 15 commits into
mainfrom
product-bundles
Open

Product bundles#40
mikegottlieb84 wants to merge 15 commits into
mainfrom
product-bundles

Conversation

@mikegottlieb84

Copy link
Copy Markdown
Contributor

Summary

This PR improves PRIDE PPP-AR product selection, same-day processing, failure handling, diagnostics, and output preservation.

It introduces coherent precise-product bundles so orbit, clock, ERP, bias, and optional attitude products are selected from compatible analysis-center/product families rather than independently mixing incompatible products.

Product bundle resolution

  • Added dependency bundles with configurable coherence fields.
  • PRIDE precise products are grouped by:
    • Analysis center (AAA)
    • Timeliness (TTT)
    • Product line (PPP)
  • Bundle candidates are preflighted before downloading.
  • Required bundle members must exist within the same family.
  • If a required download fails, the complete family is rejected and the next compatible family is tried.
  • Product searches and downloads within a bundle run concurrently.
  • Independent dependencies, such as broadcast navigation and static tables, continue resolving separately.
  • Added optional analysis-center restrictions for targeted testing and diagnostics.
  • Aggregate lockfiles are only written when all required dependencies are fulfilled.

Product precedence and sources

  • Default PRIDE precedence is now:
    1. FIN
    2. RTS
    3. RAP
    4. ULT
  • Added Wuhan RTS orbit, 5-second clock, ERP, and OSB support.
  • RTS is preferred over RAP because the Wuhan RTS bias products support the configured Galileo E1/E5b combination.
  • Updated CODE products from retired FTP access to the current AIUB HTTPS/S3-backed archive.
  • Added correct AIUB directory-listing support.
  • Added BKG’s rolling WRD current-day mixed-GNSS broadcast navigation product.
  • Broadcast navigation preference is now WRD, followed by normal IGS/IGN/DLR daily products.
  • Added coherent product bundles to both default and final-only PRIDE dependency specifications.

Download and cache behavior

  • Added force_download support throughout dependency resolution and transport.
  • override_products_download=True now refreshes mutable products that can change, such as orbit, clock, bias, ERP, navigation, and attitude products.
  • Static PRIDE tables use refresh_on_force: false and remain cached.
  • Cached decompressed products are bypassed when a fresh download is explicitly requested.
  • Sidecar lockfiles are refreshed after forced downloads.
  • Added one bounded retry with randomized backoff for transient network failures.
  • Failed remote downloads are memoized for the duration of a resolution run so the same missing URL is not repeatedly retried.
  • Added safer reconnection behavior for stale FTP/HTTP connections.
  • GitHub-hosted files larger than the Contents API limit are downloaded through immutable raw-content URLs.
  • Product metadata is classified from the actual matched filename, allowing bundle grouping to use concrete family values rather than wildcard search patterns.
  • Remote URI construction now avoids duplicated schemes and path separators.

PRIDE product compatibility diagnostics

Added advisory validation before processing:

  • Reads the phase observables advertised by each RINEX file.
  • Reads the phase observables available in Bias-SINEX products.
  • Reports signal-level and frequency-band bias coverage by constellation.
  • Checks SP3 orbit and RINEX clock epoch coverage against the observation interval.
  • Reports partial constellation or time coverage without rejecting otherwise usable products.
  • Attaches diagnostics to dependency-resolution results and emits them through logging.

These checks intentionally remain advisory because some constellations may have incomplete bias support while the remaining systems can still produce a useful solution.

Frequency handling

  • Changed the default combinations to:
    • GPS G12
    • GLONASS R12
    • Galileo E17
    • BeiDou C27
    • QZSS J12
  • This selects Galileo E1/E5b and BeiDou B1/B2.
  • Fixed pdp3 command construction so frequency combinations are passed as separate arguments rather than one combined string.
  • Added explicit mapping-function support to PrideCLIConfig.

Same-day processing

  • Stages resolved RINEX 3 mixed navigation under the legacy brdmDDD0.YYp filename expected by pdp3.
  • Prefers BKG’s rolling same-day mixed-navigation file.
  • If no mixed navigation is available, limits the current-day run to GPS and GLONASS so PRIDE can use its hourly navigation builder.
  • Clips same-day observations to the common orbit/clock coverage endpoint with a five-minute safety margin.
  • Uses a physical clipped RINEX because PRIDE’s explicit time-window handling is unreliable in this macOS workflow.
  • Explicitly selects GMF for same-day processing, avoiding dependency on unpublished VMF grids.
  • Historical runs preserve an explicitly requested VMF1 selection.
  • Makes satellite attitude optional for near-real-time bundles.
  • Writes Quaternions = NONE when ATTOBX is unavailable, preventing unnecessary fallback downloads and avoiding PRIDE’s nonportable macOS sed -i failure.
  • Added NONE as a valid satellite-attitude configuration value.

PRIDE execution robustness

  • Missing required products prevent pdp3 from launching, while other dates in a batch can continue.
  • Handles non-UTF-8 subprocess output without aborting the job.
  • Replays captured PRIDE stdout and stderr through Python logging.
  • Detects PRIDE’s internal error: messages even when pdp3.sh exits with status zero.
  • Validates generated KIN files before accepting them.
  • Rejects incomplete SPP seed files left behind by failed downstream stages.
  • Handles PRIDE residual timestamps rounded to 60.0000000 seconds by carrying them into the next minute correctly.
  • Avoids writing literal "None" product filenames into generated PRIDE configurations.

Preserved output artifacts

Successful PRIDE runs now retain:

kin_YYYYDOY_site.kin
res_YYYYDOY_site.res
config_YYYYDOY_site.config
log_YYYYDOY_site.log
cst_YYYYDOY_site.cst
stt_YYYYDOY_site.stt
run_YYYYDOY_site.log

…ependency-resolution run. Reusing a WormHole instance will no longer prevent a previously unavailable product from being retried later.

- CODE product tests now reflect the HTTPS/S3 migration and CODE/ root paths instead of obsolete FTP/year-specific paths.

logger = logging.getLogger(__name__)

_AIUB_DOWNLOAD_ROOT = "https://www.aiub.unibe.ch/download"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should live in yaml files and go through the propery analysis center registry

full_path = pool.full_path(directory)

def _ls(conn: "fsspec.AbstractFileSystem") -> list[str]:
if hostname.rstrip("/") == _AIUB_DOWNLOAD_ROOT:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment from one above.

- {name: TTT, value: RAP}
- {name: PPP, value: OPS}
directory: {pattern: "CODE/{YYYY}/"}
directory: {pattern: "CODE/"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets double check this one

- {name: TTT, value: RAP}
- {name: PPP, value: OPS}
directory: {pattern: "CODE/{YYYY}/"}
directory: {pattern: "CODE/"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets double check this one

- {name: SMP, value: 30S}
- {name: SMP, value: 05M}
directory: {pattern: "CODE/{YYYY}/"}
directory: {pattern: "CODE/"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets double check this one

- {name: SMP, value: 05M}
- {name: SMP, value: 15M}
directory: {pattern: "CODE/{YYYY}/"}
directory: {pattern: "CODE/"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets double check this one

@frigusgulo frigusgulo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets double check those CODE product directories, and and the AIUB hard coded edge-case claude artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants