Skip to content

Fix GCRS to J2000 frame bias in tleHandling - #1622

Merged
schaubh merged 1 commit into
AVSLab:developfrom
carlo98:hotfix/bsk-1621-frame_bias_teme_gcrf
Oct 17, 2026
Merged

schaubh merged 1 commit into
AVSLab:developfrom
carlo98:hotfix/bsk-1621-frame_bias_teme_gcrf

Conversation

@carlo98

@carlo98 carlo98 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Description

tleHandling.frame_bias() returned R3(dalpha0) R2(-xi0) R1(-eta0). The IERS frame bias from the GCRS to the mean equator and equinox of J2000 is R1(-eta0) R2(xi0) R3(dalpha0), so the rotations were applied in reverse order and xi0 had the wrong sign. _teme2j2000() applies the transpose of this matrix to go from mean J2000 to the Basilisk inertial frame (J2000/ICRF), and ommHandling reuses _teme2j2000().

Changes:

  • src/utilities/tleHandling.py: frame_bias() now returns rot(1, -eta) @ rot(2, xi) @ rot(3, d_alpha). The bias constants are unchanged. The function now has a docstring, and the constants have unit comments. _teme2j2000() and ommHandling need no changes.

Verification

Reference values were computed with Orekit 13.1 (orekit_jpype 13.1.8.0):

Check Before After
frame_bias() vs. Orekit GCRF → EME2000 at J2000 (max element difference) 1.6e-7 6.8e-13
_teme2j2000() vs. Orekit TEME → GCRF, position error 1.36 m 0.072 m
_teme2j2000() vs. Orekit TEME → GCRF, velocity error 1.1e-3 m/s 1.1e-4 m/s

Two regression tests were added to the existing src/tests/test_readTLE.py:

  • test_frame_bias_matches_orekit: compares frame_bias() with Orekit's GCRF → EME2000 rotation.
  • test_teme2j2000_matches_orekit: converts a LEO TEME state at 2004-04-06 07:51:28.386009 UTC and compares it with Orekit's TEME → GCRF result.

Both tests fail with the previous formula and pass with the fix. test_readTLE.py, test_readOMM.py, and test_scenarioConstellationFromTle.py all pass.

Documentation

  • Added the release-note snippet.
  • Added an entry to docs/source/Support/bskKnownIssues.rst.

Future work

None.

@carlo98
carlo98 force-pushed the hotfix/bsk-1621-frame_bias_teme_gcrf branch from 27a2406 to dd05aa4 Compare October 16, 2026 16:08
@carlo98
carlo98 marked this pull request as ready for review October 16, 2026 16:09
@carlo98
carlo98 requested a review from a team as a code owner October 16, 2026 16:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-16T16:14:35.034867Z dd05aa4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@schaubh schaubh self-assigned this Oct 17, 2026
@schaubh schaubh added the bug Something isn't working label Oct 17, 2026
@schaubh schaubh added this to Basilisk Oct 17, 2026
@schaubh schaubh moved this to 👀 In review in Basilisk Oct 17, 2026
@schaubh
schaubh force-pushed the hotfix/bsk-1621-frame_bias_teme_gcrf branch from dd05aa4 to e4b815e Compare October 17, 2026 13:07
@schaubh
schaubh merged commit 5557c5c into AVSLab:develop Oct 17, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Basilisk Oct 17, 2026
@carlo98
carlo98 deleted the hotfix/bsk-1621-frame_bias_teme_gcrf branch October 17, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

tleHandling and ommHandling apply a wrong frame bias in the TEME to GCRF conversion

2 participants