MechJeb2

MechJeb2

4M Downloads

Multi-stage Configuration Confuses Landing Autopilot

doubt72 opened this issue ยท 8 comments

commented

Not sure if it's the multi-stage configuration per se (could swear I've successfully landing with multistage configurations using MechJeb before -- yeah, I have with this: https://www.flickr.com/photos/doubt72/18538862568/in/album-72157654422242812/) or the radially mounted tanks (also done that before, see above) or multiple engines (or the combination of all of the above) or what, but I found a configuration that seems to confuse the landing autopilot landing on Tylo (it consistently shows incorrect estimated landing site/delta-v requirements/etc when enabled, though estimated landing site is correct when disabled).

This is on build #498, landing on Tylo. Image included for reference to see what the craft configuration looks like (turns out the bug didn't matter, the ship was just short of necessary delta-v/sufficient TWR to make a successful manual landing anyway):

screenshot46

commented

...err so the bug is that mechjeb can't do what isn't possible ???

commented

(Admittedly I was landing without landing gears. Had to stage prematurely on the way down.)

commented

Uh, no, sorry, I see what I wrote doesn't properly convey what I meant -- it has plenty of delta-v and a high enough TWR to land (albeit not super efficiently, as you can see from the screenshot 5058 m/s at a minimum TWR of 1.37), just not enough to return to orbit, so what I meant to say is that I had re-do the whole mission anyway for reasons besides MechJeb being unable to perform the landing.

commented

Another screenshot might be helpful: notice how far off the predicted landing site is (and the excessively high delta-V requirement for landing). I also noticed that it seems to kind of get "stuck" before braking from orbit (no timewarp or anything).

screenshot4

(I had manually done the braking stage to see if it would recover once it was close. It didn't.)

commented

Okay, did some more experimenting; apparently on a relatively high gravity target like Tylo, at any initial TWR under about 1.75 or so (with my test vehicle, anyway, I'm sure things would vary a bit with different flight profiles), the guidance comes up with solutions it can't actually execute (even starting at 1.75, it misses its target pretty spectacularly, at a starting TWR of 2.0 or so, though, it does fine). I'm not sure I'd categorize this as a bug exactly, although it'd be nice if the status would recognize and indicate when it's getting poor solutions somehow.

I've pretty much solved this enough for myself, be nice to document this for others, but not sure entirely what's appropriate for that (beyond warning in the status?), the wiki documentation seems a bit... Stale. I'd be happy to add something to that, but think I'd need an account (I'm guessing, if my experience with public wikis is anything to go by, it's locked down to keep the spam off).

commented

What do you mean by " the guidance comes up with solutions it can't actually execute" ? It start the burn too late to stop in time ?

commented

It calculates predicted landing spots that are wildly different from the inertial trajectory when the autopilot is engaged, and when it tries to line them up (i.e., get the landing error within ~100m or whatever the tolerance is), it performs burns that put the ship back into an orbital trajectory (at least on Tylo) until it runs out of fuel or the TWR goes up enough or whatever. Presumably because the algorithms used to calculate/execute landings doesn't handle low TWR craft.

Easy way to reproduce it is to build a low-TWR lander (sub-2.0 or so depending on TWR changes during landing, higher for ion drive landers, say, but something like 1.5 or 1.25 will give obvious results. It doesn't actually require a high gravity body, but even modest lander designs give high TWR on smaller bodies so I didn't see it until Tylo). Landing predictions are accurate until autopilot is engaged (i.e., inertial trajectory landing predictions are fine), but it will predict a landing site halfway around the body once the autopilot is engaged and attempt to adjust the trajectory to match with not-so-good results.

As bugs go, it's extremely minor, since the easy fix is to build a more powerful lander, which is a good idea anyway, since low TWR landers are ridiculously inefficient, and really only challenging for something like Tylo which is difficult because it combines distance with high surface gravity. But it was confusing as heck before I figured it out, because, yeah, landing on Tylo isn't that easy and took me a bit to come up with a design that could do it reasonably efficiently, but mostly because it wasn't initially clear why the autopilot was failing to land, and I never saw this behavior before Tylo.

commented

This is highly difficult and pretty much requires the rewrite in #1052