getAltoffset() is confuddled by landing legs and wheels.
Various orbital physics tools written in kOS for Kerbal Space Program
Status: Beta
Brought to you by:
surge
I think KSP is reporting part offsets for landing legs and wheels as if they were contracted or fully compressed. This makes getAltoffset() in hs.ks and other places report a value that is too low, causing hard landings, explosions and general chaos.
Actually, the function doesnt take into account the size of the part either. Hmm...
If we can solve this, the fudge factor used in hoverslams could be removed as well.
Added iterative recalculation of getAltOffset in hs.ks and landnatm.ks for r83. This seems to help... maybe always? Needs thoughrough testing, especially hs.ks.
Last edit: Stäphen Goedzal 2021-06-04
We're at the mercy of whatever KSP tells us. If a landing leg is stowed, does it report the unfurled position??
There is a fudge factor in hs.ks that tries to account for this. It causes low mass crafts to waste alot of fuel calmly landing at 1/3 throttle, while 50t monsters smash into the ground.
Not good enough.
The fudge factor can be/has been removed. It was partly caused by the hoverslam not accounting for cosine effect. Fixed and partially tested in r85.