Skip to content

Validate OMM reference context before propagation - #27

Open
sylvesterkaczmarek wants to merge 3 commits into
esa:masterfrom
sylvesterkaczmarek:fix/validate-omm-reference-context
Open

Validate OMM reference context before propagation#27
sylvesterkaczmarek wants to merge 3 commits into
esa:masterfrom
sylvesterkaczmarek:fix/validate-omm-reference-context

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Reject OMM metadata that is incompatible with the reference context assumed by dSGP4 propagation.

Changes

  • require CENTER_NAME to resolve to EARTH
  • require REF_FRAME to resolve to TEME
  • require TIME_SYSTEM to resolve to UTC
  • preserve the existing supported defaults when those optional fields are absent
  • accept case-insensitive equivalents
  • add regression tests for invalid, case-insensitive, and missing reference-context fields

Rationale

load_from_omm() previously accepted incompatible reference metadata and then propagated the elements using the Earth/TEME/UTC assumptions used internally by dSGP4. This change rejects those mismatches before propagation.

Validation

Focused regression validation passes. The upstream GitHub Actions workflow is currently waiting for maintainer approval to run for this fork PR.

@sylvesterkaczmarek
sylvesterkaczmarek marked this pull request as ready for review August 15, 2026 18:41
@Sceki

Sceki commented Aug 16, 2026

Copy link
Copy Markdown
Member

Hi @sylvesterkaczmarek ,

can you provide an actual input/use case where dSGP4 currently produces an incorrect or misleading result because of this?

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Yes. A concrete case is an OMM with the normal SGP4 elements but REF_FRAME=EME2000.

Today load_from_omm() accepts it and produces the same propagatable object as if REF_FRAME=TEME, because the reference-frame metadata is not used when converting the OMM fields into the SGP4/TLE representation.

The caller therefore gets a propagated result without any indication that EME2000 elements were interpreted under dSGP4's TEME assumptions. The same issue applies to a non-UTC TIME_SYSTEM or non-Earth CENTER_NAME.

The purpose of this PR is to fail explicitly at ingestion rather than silently reinterpret incompatible metadata.

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