Closed Valinwolf closed 4 years ago
The Parser itself work as expected, calling the following with the two example TLE's you provided
CALSPHERE 1
1 00900U 64063C 20220.16857472 .00000188 00000-0 19181-3 0 9994
2 00900 90.1535 29.2002 0025171 263.1154 215.9264 13.73401236777412
CALSPHERE 2
1 00902U 64063E 20219.90849093 .00000018 00000-0 13404-4 0 9991
2 00902 90.1630 31.8626 0017081 325.6007 199.1918 13.52685390566904
List<Tle> parsed = ParserTLE.ParseFile("exampleTLE.txt");
returns exactly 2 TLE objects. Testing again with the https://celestrak.com/NORAD/elements/active.txt file it returns 2835 elements just as expected. The output you see is expected since you are writing the line inside the second loop. Thus every check for tle in tles against sat in Constants.Satellites is printed.
🤦 I feel like an idiot now. Hmm... seems the problem is elsewhere then... Thanks for pointing out my error.
Describe the bug When using
ParserTLE.ParseFile
the populated list has boat loads of duplicates that was not in the file.To Reproduce Please Provide the following information to reproduce the issue you have
new EpochTime(DateTime.UtcNow)
ParserTLE.ParseFile
Expected behavior A single entry in the file, a single entry in the list. For example:
should produce a
List<Tle>
with two entries: one for NORAD ID 900 and the other for NORAD ID 902. It should not, however have 6 entries for ID 900 and 4 entries for 902.Screenshots (Context of the messages are the code below)
Version(please complete the following information):
Additional context