jeyoder / StuffInSpace

A real-time interactive WebGL visualisation of objects in Earth orbit
http://stuffin.space
817 stars 153 forks source link

unwanted false lithobraking #31

Open wumpus opened 4 years ago

wumpus commented 4 years ago

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.

    {
        "INTLDES": "15054D",
        "OBJECT_NAME": "ARIANE 5 DEB (SYLDA)",
        "OBJECT_TYPE": "DEBRIS",
        "TLE_LINE1": "1 40943U 15054D   20041.87405398  .11653604 -12779-4  20337-2 0  9990",
        "TLE_LINE2": "2 40943   6.3287 340.9296 2028312 121.2018 260.2667 11.76590849 58286"
    },
thkruz commented 3 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.