fix: implement rigorous RANGE_UNITS parsing with correct physical conversions in TDM files - #581
Conversation
- Adds unit checking for `RANGE_UNITS` in CCSDS TDM files. - Applies light time scaling (`SPEED_OF_LIGHT_KM_S`) to time-based units. - Distinguishes 1-way from 2-way tracking data via `effective_divider`. - Warns on non-compliant units (`m`, `ms`, `us`, `ns`) while fixing their scales. - Returns error for unsupported range units or missing fields. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
🤖 Automated Gemini Code Review
Summary
This PR modifies the TDM parser to correctly scale RANGE measurements based on the RANGE_UNITS metadata keyword. It applies the speed of light conversion for time-based units (s, ms, us, ns) and warns on non-CCSDS compliant units.
Architectural Changes
No change
New Features
No change
Improvements
- Enforces strict physical conversions for time-based tracking data in TDM files.
- Adds warnings for non-compliant sub-second unit usage.
Bug Fixes
- Fixes the assumption that all range measurements are in kilometers, correctly applying light-time scaling for time-based units.
Testing and validation
No tests were included in this PR. It is recommended to add tests verifying the correct scaling of time-based units and the rejection of unsupported units like RU.
Documentation
This PR does not primarily deal with documentation changes.
|
Visit the preview URL for this PR (updated for commit f16abfe): https://nyx-rustdoc--pr581-fix-tdm-range-units-vrukorrr.web.app (expires Wed, 05 Aug 2026 03:11:43 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: d8e2a55934352d850c15d11866c39eb2d2e029be |
- Adds unit checking for `RANGE_UNITS` in CCSDS TDM files. - Applies light time scaling (`SPEED_OF_LIGHT_KM_S`) to time-based units. - Distinguishes 1-way from 2-way tracking data via `effective_divider`. - Warns on non-compliant units (`m`, `ms`, `us`, `ns`) while fixing their scales. - Returns error for unsupported range units or missing fields. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
- Adds unit checking for `RANGE_UNITS` in CCSDS TDM files. - Applies light time scaling (`SPEED_OF_LIGHT_KM_S`) to time-based units. - Distinguishes 1-way from 2-way tracking data via `effective_divider`. - Warns on non-compliant units (`m`, `ms`, `us`, `ns`) while fixing their scales. - Returns error for unsupported range units or missing fields. - Fixes linter errors in `nyx-py` python scripts. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
- Adds unit checking for `RANGE_UNITS` in CCSDS TDM files. - Applies light time scaling (`SPEED_OF_LIGHT_KM_S`) to time-based units. - Distinguishes 1-way from 2-way tracking data via `effective_divider`. - Warns on non-compliant units (`m`, `ms`, `us`, `ns`) while fixing their scales. - Returns error for unsupported range units or missing fields. - Fixes linter errors in `nyx-py` and `.github/scripts` python scripts. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
- Adds unit checking for `RANGE_UNITS` in CCSDS TDM files. - Applies light time scaling (`SPEED_OF_LIGHT_KM_S`) to time-based units. - Distinguishes 1-way from 2-way tracking data via `effective_divider`. - Warns on non-compliant units (`m`, `ms`, `us`, `ns`) while fixing their scales. - Returns error for unsupported range units or missing fields. - Fixes linter errors in `nyx-py` and `.github/scripts` python scripts. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
- Adds unit checking for `RANGE_UNITS` in CCSDS TDM files. - Applies light time scaling (`SPEED_OF_LIGHT_KM_S`) to time-based units. - Distinguishes 1-way from 2-way tracking data via `effective_divider`. - Warns on non-compliant units (`m`, `ms`, `us`, `ns`) while fixing their scales. - Returns error for unsupported range units or missing fields. - Fixes linter errors in `nyx-py` and `.github/scripts` python scripts. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #581 +/- ##
==========================================
- Coverage 77.77% 77.64% -0.14%
==========================================
Files 103 103
Lines 16846 16888 +42
==========================================
+ Hits 13102 13112 +10
- Misses 3744 3776 +32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Adds unit checking for `RANGE_UNITS` in CCSDS TDM files. - Applies light time scaling (`SPEED_OF_LIGHT_KM_S`) to time-based units. - Distinguishes 1-way from 2-way tracking data via `effective_divider`. - Warns on non-compliant units (`m`, `ms`, `us`, `ns`) while fixing their scales. - Returns error for unsupported range units or missing fields. - Fixes linter errors in `nyx-py` and `.github/scripts` python scripts. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit modifies the
from_tdmfunction withinio_ccsds_tdm.rsto validate theRANGE_UNITSkeyword specified in the tracking data's metadata block. Instead of assuming values represent physical distances, it now enforces strict conversions for time-based tracking data (s,ms,us,ns), factoring in whether the measurement was a one-way or round-trip pulse (divided accordingly by theeffective_dividerwhich evaluates thePATHdefinition). Furthermore, this patch warns users on non-compliant sub-second unit usage and stops processing via errors on unrecognised representations, fulfilling both physical and specification correctness.PR created automatically by Jules for task 1197532436040297324 started by @ChristopherRabotin