Closed JeanneKahn closed 3 years ago
Again after more investigation I believe this is something to do with inclination in orbits - perhaps some trig or division going wrong?
More investigation - this error may not be happening when getting a single orbit track from getOrbitTrack()
, which suggests a problem perhaps with the antimeridian function or something to do with time in general @davidcalhoun ?
Thanks for the heads up, I'll take a look when I can. The underlying SGP4 library satellite.js definitely has problems with some types of TLEs.
If possible, could you share the TLE and some input times that reproduce this error?
@davidcalhoun I got these TLEs via https://tle.ivanstanojevic.me/; I tried a bunch until I saw satellites that presented errors, and from that, satellites that shared almost similar orbits.
AII-BRAVO
1 48270U 21034C 21124.53276317 .00000342 00000-0 45565-4 0 9993
2 48270 97.7860 200.0737 0003406 358.5519 1.5688 14.85661284 809
PROXIMA 2 1 43696U 18088G 21124.58637862 .00001563 00000-0 64741-4 0 9999 2 43696 85.0352 224.3224 0018986 174.8560 185.2882 15.22846619137699
IRIDIUM 100
1 42956U 17061B 21124.43823099 .00000102 00000-0 29484-4 0 9993
2 42956 86.3949 86.5825 0002211 84.7810 275.3638 14.34216227186804
Timestamps (using Date().getTime())
bug present 1620186716953 IRIDIUM 100 1620183731392 PROXIMA 2
No bug present 1620183996890 PROXIMA 2 1620173260997 IRIDIUM 100
(AII-BRAVO never experienced an error)
Thank you for the details, this helps a lot! Will investigate when I get a chance.
Thank you again, the extra info was super helpful to track this down. This is now fixed in 4.2.12
Say I use the following code to get a ground track and print the result:
Sometimes, the results will make sense in that each array has different values, like this:
And the satellite's current position (using
getLatLngObj()
) on a map will lie on ground track [1].But quite often, for no discernible reason (after refreshing or whatever), some of the arrays will be equal to each other.
And the satellite's position will no longer lie on the plotted line for that orbit!
And sometimes, the values will be completely off everywhere:
Changing the
startTimeMS
does not fix this; nor does changing the TLE, or changingstepMS
. I have a hunch that this may be due to something with inclined orbits (TLEs with higher inclinations having more problems) but I have no real way to confirm this because I can't replicate the conditions that explicitly cause it to happen.