NaN output when generating orbit file with a single TLE in tle2Orbit.cpp #418
Replies: 1 comment
-
|
Hi, Thank you very much for your help. The bug should now be fixed. Best regards |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I recently found a small bug in tle2Orbit.cpp. When generating an orbit file using only one single TLE (see Fig 1), the output becomes NaN (see Fig 2).
After checking the code, I found the issue is around line 119 (see Fig 3). The code ignores the initialization for the first TLE read from the file, which causes the subsequent calculations to be all zeros.
To fix this, we just need to add sgp4init('a', iterRecord->second); right after line 114 (see Fig 4). Once added, the results return to normal (see Fig 5)! Hope this helps.
Beta Was this translation helpful? Give feedback.
All reactions