Open wumpus opened 4 years ago
This is an issue with https://github.com/shashwatak/satellite-js/ not StuffinSpace specifically. There have been some bugfixes put in the last few years to satellite.js, but I don't think anything that would cover this. Recently I started putting more bugfixes in at https://github.com/thkruz/ootk to correct the gravity constants and some minor parsing issues.
Thanks for pointing it out as a great fringe case to track in testing.
You can alter the satCruncher to flag anything that returns [false,false]. Move it to [0,0,0] and then stop propagating it. Basically simulate a reentry.
This guy has a perigee of 143km, but satellite.js thinks it goes below the Earth's surface for part of its orbit. When it does that sat-cruncher gets back undefined for xyzdxdydz and altitude is NaN. the orbit-calculation-worker is also a bit confused, basically it doesn't draw the part of the orbit where it's below the Earth's surface. Looks like the issue affects everything that's close to re-entering, although I suppose they might have to have a large apogee, too.