Land at Target AP Bugginess
Shadow771 opened this issue · 5 comments
Using MechJeb 2.0.7
Craft file: https://dl.dropboxusercontent.com/u/94616370/Landing%20AP%20test.craft
Save file: https://dl.dropboxusercontent.com/u/94616370/persistent.sfs
Been having lots of issues with the Landing Guidance land at target autopilot. Issues such as randomly going nuts, spinning the craft uncontrollably, getting stuck on steps during landing (such as plane changes), flinging my craft out of a body's SoI, or just doing nothing at all when engaged.
Here's what happened when I tried to test the auto-pilot using the craft file above:
My craft is in a circular 100km equatorial orbit around the Mun and I want to land at 59° 2' 35" N, 3° 52' 19" W. Auto-warp and Show landing predictions are set.
I enter the coordinates and press Land at target.
It starts off by moving to the low orbit plane change point and then burns to change planes. Working fine so far.
After the burn is complete, the auto-pilot starts to fail. It's now stuck on "Executing low orbit plane change of about 0 m/s."
Upon aborting and restarting the auto-pilot, it immediately starts a high de-orbit burn. All goes well until my periapsis is brought to 0, upon which it appears to try and raise it again, and starts spinning uncontrollably, burning in all directions. If it happens to spin so that my periapsis is raised above 0, it will immediately stop spinning and correct itself to lower it, and then repeat the process. It might be over-correcting upon trying to adjust the landing point. I'm not entirely sure.
I've also attached a save file where the behavior seems to be reproducible. Hopefully this is enough info to take a look into it.
I ran into the issue with the crazy doom spin myself and I seem to have found a workaround (and hopefully this helps with a fix):
If you enter in numbers for the lat/lon and try to autoland, it starts to work then goes into a crazy spin and freaks out.
However, if you first pick a target on the map using the button to do so (or target KSC with its button, if applicable) so the red target indicator is visible on the map, it works fine, even if you then manually change the numbers to what you want.
Essentially, if the red "landing target" indicator isn't there, then something with the landing isn't initialized right and it's going to freak out.
Yes, I think @Balorn has the right of it. We have neglected to include some sort of "set target from coordinates" button that will initialize a completely new target from the entered coordinates, and we've neglected to include a check in the land-at-target code to see whether the target is properly initialized. I expect this is leading to the observed behavior. I'll fix this soon.
When I tried it, the plane-change maneuver resulted in an orbit that no longer reentered and progressed past polar, continuing to expand, and I had to abort the AP. If I re-engage the AP after it raises the orbit too high, it flips around and starts lowering it, but once it intersects the surface the ship starts spinning, alternately raising and lowering the orbit... Definitely something weird going on.
Even trying to land at 0N, 0E leads to bizarre behavior. Instead of shutting off the engine or changing to another mode when the predicted landing site is almost on top of the target, the ship starts spinning crazily and continuing to burn full throttle. As far as I can tell it will continue that forever.
Another thing I've noticed is that it seems to stop generating control signals, and while manual yaw and pitch controls seem to work, it seems like the roll is impossible to stop. Turning off SAS causes it to accelerate the roll rapidly, turning it back on slows it despite absence of SAS modules, but nothing will eliminate it.
This fix should be out in 2.0.8, so I'm closing this. Please start a new issue if you have landing AP problems with 2.0.8.