pyorbital icon indicating copy to clipboard operation
pyorbital copied to clipboard

Implement SGDP4_NEAR_SIMP propagation

Open JonathanMaes opened this issue 2 years ago • 3 comments

This implements the formula for propagating satellite orbits below 200km until theoretical ground impact. I adapted this with the C implementation of SGDP4 and compared with Heavensat for satellites which are about to decay naturally, and the results seem to match.

I was having the same issue as #80 when propagating orbits, so now the NotImplementedError: Mode "Near-space, simplified equations" not implemented has been implemented. As a consequence, instead of the NotImplementedError, the intended error Exception('Satellite crashed at time %s', utc_time) can now be reached when using Orbital._sgdp4.propagate.

  • [ ] Closes #80
  • [ ] Tests added
  • [ ] Tests passed
  • [ ] Passes flake8 pyorbital

JonathanMaes avatar Mar 21 '23 19:03 JonathanMaes

Thanks a lot for this PR @JonathanMaes ! As you can see the tests are now failing, probably because of some slight difference in the aiaa tests. Could you check what this is about?

mraspaud avatar Mar 22 '23 14:03 mraspaud

It seems to fail because the NotImplementedError is no longer raised, so line 115 in test_aiaa.py no longer just continues to the next test-TLE (in SGP4-VER.TLE). The first test-TLE that now fails is # ARIANE 44L+ R/B # Lyddane bug at <= 70 min for atan2(),. This "Lyddane bug" causes the results to be wrong when compared to the aiaa_results file.

I am not familiar with this bug, and some searching online did not enlighten me all that much. It seems to be a bug that exist(ed) in SGP4 due to the discontinuity in atan, and affects some low-inclination/low-eccentricity orbits, though I can't seem to find how (or if) it was solved.

JonathanMaes avatar Mar 22 '23 21:03 JonathanMaes

I looked quickly at this, and from what I can see, the failing test is not on Arian 44, but on SL-6 R/B(2), second instance (starting with 1 22312U). Nothing seems to be mentioned there about the Lyddane bug, and the error is quite significant: res[0] is 306.10478453, pos[0] is 257.91353553688265, leading to an error of about 48km in the x direction (tolerance is 5mm...)

Skipping that example, the next one to crash is COSMOS 2405, with an error of 5km in the z direction.

I looked at the changes you made though, and compared it to the C++ and matlab versions found here https://celestrak.org/software/vallado-sw.php, and I can't see anything wrong. So I'm really dumbfounded right now...

mraspaud avatar Mar 27 '23 09:03 mraspaud