Skip to content

fix: implement rigorous RANGE_UNITS parsing with correct physical conversions in TDM files - #581

Merged
ChristopherRabotin merged 10 commits into
masterfrom
fix-tdm-range-units-1197532436040297324
Jul 29, 2026
Merged

fix: implement rigorous RANGE_UNITS parsing with correct physical conversions in TDM files#581
ChristopherRabotin merged 10 commits into
masterfrom
fix-tdm-range-units-1197532436040297324

Conversation

@ChristopherRabotin

Copy link
Copy Markdown
Member

This commit modifies the from_tdm function within io_ccsds_tdm.rs to validate the RANGE_UNITS keyword 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 the effective_divider which evaluates the PATH definition). 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

- 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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 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.

Comment thread nyx-core/src/od/msr/trackingdata/io_ccsds_tdm.rs Outdated
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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

google-labs-jules Bot and others added 5 commits July 28, 2026 21:14
- 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

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.58140% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.64%. Comparing base (cde254d) to head (f16abfe).

Files with missing lines Patch % Lines
nyx-core/src/od/msr/trackingdata/io_ccsds_tdm.rs 25.58% 32 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

google-labs-jules Bot and others added 4 commits July 28, 2026 22:35
- 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>
@ChristopherRabotin
ChristopherRabotin merged commit fb52295 into master Jul 29, 2026
14 of 17 checks passed
@ChristopherRabotin
ChristopherRabotin deleted the fix-tdm-range-units-1197532436040297324 branch July 29, 2026 05:21
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.

1 participant