Skip to content

Parse Alpha-5 NORAD catalog numbers in TLE data - #446

Open
Wahaj18 wants to merge 1 commit into
csete:masterfrom
Wahaj18:fix-444-hex-norad-id
Open

Wahaj18 wants to merge 1 commit into
csete:masterfrom
Wahaj18:fix-444-hex-norad-id

Conversation

@Wahaj18

@Wahaj18 Wahaj18 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Since catalog numbers reached 100000, space-track encodes the 5-character TLE field with a leading letter (A1286 = 101286). atoi() and g_ascii_strtod() stopped at that letter, so imported satellites were stored as NORAD ID 0 and could not be selected.

This adds Convert_Sat_Catnr() with the standard Alpha-5 mapping (A–H, J–N, P–Z; I and O skipped) and uses it in Convert_Satellite_Data() and the TLE update parser. All-digit catalog numbers are unchanged. Stored TLE lines keep their original catalog field; .sat filenames and the UI still print the integer ID.

make and make check pass. test-001 checks an all-digit control (25544) and the issue's A1286 TLE through Get_Next_Tle_Set (catnr == 101286).

Fixes #444

Space-track encodes catalog IDs >= 100000 as a 5-character
Alpha-5 field (A1286 = 101286). atoi() and g_ascii_strtod()
stopped at the leading letter, so those satellites were stored
as NORAD ID 0 and could not be selected.

Decode the field with the standard Alpha-5 mapping and leave
all-digit catalog numbers unchanged.

Fixes csete#444
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.

Feature request: support TLE with hex in NORAD ID

1 participant