Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLE Data parsing Issue #48

Open
RenjithSunny opened this issue Aug 8, 2024 · 3 comments
Open

TLE Data parsing Issue #48

RenjithSunny opened this issue Aug 8, 2024 · 3 comments

Comments

@RenjithSunny
Copy link

Here When we provide this TLE given below, the parsing is not happening properly. Here I attached the console error screenshot along with this.

TESTMOBILE-001
1 90001U 24999AA 24204.90369213 .00009140 00000-0 34178-3 0 00008
2 90001 053.2348 028.9642 0008048 192.4726 295.1174 15.26749980000473

Our understanding is that, the inclination value in the TLE is not parsing properly causing the issue.

image
@davidcalhoun
Copy link
Owner

davidcalhoun commented Aug 8, 2024

@RenjithSunny It looks like your test TLE is malformed, at least for the spacing on the first line. It should be something more like this (I just took a first pass but you should double check with the formatting described at https://en.wikipedia.org/wiki/Two-line_element_set, also check the sample ISS TLE in the readme):

TESTMOBILE-001
-1 90001U 24999AA 24204.90369213 .00009140 00000-0 34178-3 0 00008
+1 90001U 24999AA  24204.90369213  .00009140  00000-0  34178-3 0 00008
2 90001 053.2348 028.9642 0008048 192.4726 295.1174 15.26749980000473

@RenjithSunny
Copy link
Author

Hi @davidcalhoun , I found that the root cause of issue is not depends on the spacing. Its is working fine when I edited the Line 2 inclination angle from '053.2348' to ' 53.2348'.
1

Case 1: I guess the validation of the inclination angle is not working as we expected. It should validate even if we start the angle value with 0.
Case 2: I noted that the inclination angle can vary from 0-180 as described in the doc https://en.wikipedia.org/wiki/Two-line_element_set#Line_1,. But here when value is more than 100 the library is not working as we expected.

@thkruz
Copy link
Contributor

thkruz commented Aug 14, 2024

The first line is invalid. This one adds the missing spacing. (EDIT: I just realized @davidcalhoun added the corrected first line already)

1 90001U 24999AA  24204.90369213  .00009140  00000-0  34178-3 0 00008
2 90001 053.2348 028.9642 0008048 192.4726 295.1174 15.26749980000473

Most TLE parsers, including the one built into satellite.js (dependency of this library) will use the fixed character widths to find values. So when you miss the trailing space in the international designator it will push the epoch off by a character and make the year 2042 instead of 2024. The error you are getting is "Invalid eci coordinates after trying to propagate" which is almost guaranteed to happen if you are propagating 20 years into the future.

I just ran that through my tools and it propagates without any problems.

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

No branches or pull requests

3 participants