Closed mhmdscin closed 3 years ago
I'm facing the same "Data contained parse error(s)." exception today too for the ISS. No change in my code since a while. This was working great until now. I'm also getting the TLE for the ISS from celestrak.com:
ISS (ZARYA)
1 25544U 98067A 20316.41516162 .00001589 00000+0 36499-4 0 9995
2 25544 51.6454 339.9628 0001882 94.8340 265.2864 15.49409479254842
System.IO.InvalidDataException
HResult=0x80131501
Message=Data contained parse error(s).
Source=One_Sgp4
StackTrace:
at One_Sgp4.ParserTLE.parseTle(String tleLine1, String tleLine2, String tleName)
at One_Sgp4.ParserTLE.ParseFile(String filename, String satName)
at OneSGP4UWP.MainPage.
This exception was originally thrown at this call stack: [External Code]
Inner Exception 1: ArgumentOutOfRangeException: Length cannot be less than zero. Parameter name: length
An Exeption is being triggered here since the first line of the TLE-Data does not match the expected format.
The Parser expects the following formating.
1 NNNNNC NNNNNAAA NNNNN.NNNNNNNN +.NNNNNNNN +NNNNN-N +NNNNN-N N NNNNN
The Drag-Term (position 54-61) should be +NNNNN-N
However, for the TLE provided in this Issue has a plus Symbol +NNNNN+N thus an exeption is caused while parsing.
I will expand the Parser to handle 00000+0 inputs in the first TLE line. I will close this issue as soon as a new version is pushed.
New Release version 1.0.13 has been publisched to NuGet and Github.
Describe the bug I was using your library for a long time and it was working like a charm. Today I encounter an error in this function in my program, while I haven't change anything
To Reproduce
This raise an exception :
Version:
Additional context I have downloaded the tle data from here: https://celestrak.com/NORAD/elements/weather.txt
the issue can also be reproduce with following data: METEOR-M 2
1 40069U 14037A 20316.66959948 -.00000019 00000+0 10591-4 0 9992 2 40069 98.4874 348.5318 0005172 204.5397 155.5535 14.20677290329111