sarbian

[1.3.0] Anatid Robotics / MuMech - MechJeb - Autopilot - [2.6.1] [27 May 2017]

Recommended Posts

2 hours ago, xxSpikeZZxx said:

The ship I used was all stock KSP parts. It had the basic "Reliant" engine and was very manoeuvrable. I have landed much more complicated aircraft on atmospheric bodies absolutely fine with Mechjeb before but no matter what i try with the update, i cannot get even the simplest ship to land successfully on the Mun or Minmus. 

Just had a thought here:  Are you using "Land at target"?  As far as I can tell from the source code the generic land-somewhere is broken and in practice I have never gotten it to work.  A perusal of the source seems to show it trying to fly the rocket to an intercept with the terrain at the current altitude but wherever the rocket might be going.  The land at target engine flies the rocket to a point 500m above the target and then lowers it.

Share this post


Link to post
Share on other sites

The strangest thing that happend to me was when I set him to ascent with a heading of -75° he flew south (Don't know if thats right polar orbits are always strange) and then tried to circulice in the opposite direction. I'll never you subasseblies again without double checking stuff.

Share this post


Link to post
Share on other sites
1 minute ago, JayPee said:

for me this has made the difference between success and failure when landing on the Mun with mechjeb.

Never tried it on landing.  I had a quite spectacular failure on takeoff that way--I was lifting a rover and the control point was set to the rover, not the rocket.  Somehow I managed to splatter the rocket over the countryside yet leave a kerbal standing on the runway.  Yes, runway, not launch pad.  Unfortunately, I had looked away for a little bit when it happened and I didn't see how that came to be.

I have also had a failure akin to what he described when landing on "Ike".  I use quotes because I managed to run out of power during the orbital adjustment (I had folded my panels for EVA safety and forgot to redeploy them) and somehow got ejected from Ike's SOIMJ was actually trying to guide me down to a landing on Duna, apparently using the parameters for Ike.  Of course it couldn't fly it right but other than that there wasn't a hint of anything wrong until I hit the fire.

1 minute ago, maculator said:

The strangest thing that happend to me was when I set him to ascent with a heading of -75° he flew south (Don't know if thats right polar orbits are always strange) and then tried to circulice in the opposite direction. I'll never you subasseblies again without double checking stuff.

And what would you expect?  On a heading of -75 degrees I would expect him to head 15 degrees east of due south.

Share this post


Link to post
Share on other sites
28 minutes ago, Loren Pechtel said:

Never tried it on landing.  I had a quite spectacular failure on takeoff that way--I was lifting a rover and the control point was set to the rover, not the rocket.  Somehow I managed to splatter the rocket over the countryside yet leave a kerbal standing on the runway.  Yes, runway, not launch pad.  Unfortunately, I had looked away for a little bit when it happened and I didn't see how that came to be.

I have also had a failure akin to what he described when landing on "Ike".  I use quotes because I managed to run out of power during the orbital adjustment (I had folded my panels for EVA safety and forgot to redeploy them) and somehow got ejected from Ike's SOIMJ was actually trying to guide me down to a landing on Duna, apparently using the parameters for Ike.  Of course it couldn't fly it right but other than that there wasn't a hint of anything wrong until I hit the fire.

And what would you expect?  On a heading of -75 degrees I would expect him to head 15 degrees east of due south.

Yeah sideways or backwards probe cores for stages and for some reason it picks that one to control from.  I have lost probes with docking ports active after refueling that gained control on separation. 

MJ is an incredible tool with or without flaws, and given I'm battering it with 100+ mod installs, it does a great job 80+% of the time.  Just having suicide burn time is a Kerbal life saver alone.

30 minutes ago, maculator said:

The strangest thing that happend to me was when I set him to ascent with a heading of -75° he flew south (Don't know if thats right polar orbits are always strange) and then tried to circulice in the opposite direction. I'll never you subasseblies again without double checking stuff.

Had this happen any time I did not manually start ascent on my nine RSS manned Venus return launches. Enter 0 and get 180 or enter 75ish and get 105ish.  Couple of very hard rescue missions.  They were balloon drop launches at ~1atm. so I chalked it up to chaos of that event.  Drop, Fire correction solids, Fire main ascent drives, toggle autopilot on as I cleared the ascending balloon.  Had one mission ready to go down abort and retrieve the counter orbit lander from a roughly polar orbit and limp home.  The one going for 75deg was caught by an unmanned test version of the lander/mothership combo and taken home. 

 

I have hopes and dreams of MJ able to handle maneuvers in the 1.2.2 RO/RP-0 system without early burn problems.

Share this post


Link to post
Share on other sites

The only issue I've ever had with auto MJ's "Land at Target" option is when I apparently pick a target on the side of a hill.... The lander/probe will always smash itself into the hillside, regardless of KSP version or MJ version.  If I pick fairly flat place to land, I have (almost) zero issues/splattering instances (innate KSP Kracken strikes notwithstanding).

If I use "Land Anywhere" on a lower gravity moon ie Minmus, I tend to have some smashy smashy.  Most of the time when landing on a body similar to the Mun I have no issues with either autopilot option, again, as long as I don't pick a hillside/Neil Armstrong Memorial as my LZ.

Share this post


Link to post
Share on other sites
10 minutes ago, smotheredrun said:

The only issue I've ever had with auto MJ's "Land at Target" option is when I apparently pick a target on the side of a hill.... The lander/probe will always smash itself into the hillside, regardless of KSP version or MJ version.  If I pick fairly flat place to land, I have (almost) zero issues/splattering instances (innate KSP Kracken strikes notwithstanding).

If I use "Land Anywhere" on a lower gravity moon ie Minmus, I tend to have some smashy smashy.  Most of the time when landing on a body similar to the Mun I have no issues with either autopilot option, again, as long as I don't pick a hillside/Neil Armstrong Memorial as my LZ.

In my experience if MechJeb can land a rocket on something flat it can land the rocket on something steep.  The problem is landing the rocket isn't the same thing as surviving the landing.  Once the rocket touches down MechJeb has done it's job and switches off and now you have a problem.  The high side of the rocket is on the ground but the low side is not--and it falls to the surface.  This imposes a torque on the rocket, even if it could still stand in the tilted position it's going to swing past that point to approximately twice the terrain tilt.  If the rocket is not stable in that position it falls over.

Immediately turning on SAS will slow this tipping process and generally keep the rocket from swinging past the stability point.  With enough authority it can even keep the rocket standing with only one point of contact.  (I've spent several minutes sliding down a hill on Gilly this way, SAS pointed radial out and wait until it found a valley.)

Also, beware that at least as of 1.1.3 (I haven't tested this in 1.2.x) the impact speed rating of parts is really just the speed rating, they'll fail while sliding horizontally at their impact speed (or, really crazy, while rolling at their impact speed.  For a really crazy KSC science collecting rover you can take two capsules, batteries and a reaction wheel plus whatever science you want, lay everything on it's side and go rolling around.  If you're using the Mark 1 capsule you have to watch your speed, though, the craft blows up if you try to roll faster than the impact speed of any parts in the cylinder between the capsules.  Using the 3-man capsules works a lot better because those inner parts don't touch the ground.)  Slide down a hill above the impact speed of your legs and they fail.

Share this post


Link to post
Share on other sites

We have a little discussion about SAS/autopilot improvement by using Trim instead of direct controls for the autopilot and stability controls:

This might be good to get implemented in MechJeb, improving its autopilot.

Share this post


Link to post
Share on other sites
1 minute ago, dr.phees said:

We have a little discussion about SAS/autopilot improvement by using Trim instead of direct controls for the autopilot and stability controls:

This might be good to get implemented in MechJeb, improving its autopilot.

Since MJ does not uses the stock SAS I don't see how this would help.

Share this post


Link to post
Share on other sites

No, MechJeb doesn't. But it does the same thing. It uses the direct controls instead of trim.

An example: You use Kill Rotation mode to stabilise a plane. Look at the controls, that MechJeb uses to keep the craft on course. At level flight that would usually only be pitch. The moment you touch the controls for yaw, all other input is moved to center instead of keeping the set-off for stable flight. You release controls and MechJeb starts oscillating until it finds a new stable set up. That makes planes (and spacecraft with slightly offset thrust vectors) ungainly to fly.

Instead, MechJeb should use trim to stabilise flight and then add user input to that until user input is done. The craft would now be much closer to stable, making it wobble much less when restabilising.

While this would improve all the flight modes, the described mode could be made into a free flight mode for athmospheric stabilised flight. The current "Kill Rotation" mode let's the craft return to the exact direction and rotation where the user takes the fingers off the controls. That makes the craft wobble around that orientation. A stabilised flight mode would return to the trim setup saved before the user input. The craft would take a moment to stop rotation, but that would be what you expected from a stabilised craft.

Share this post


Link to post
Share on other sites

What you suggest is not using trim. It is (and you even wrote it) adding the user input to MJ input. The fact that MJ does not do it is a choice, not a omission. I could add an option however.

Share this post


Link to post
Share on other sites
7 hours ago, Loren Pechtel said:

In my experience if MechJeb can land a rocket on something flat it can land the rocket on something steep.  The problem is landing the rocket isn't the same thing as surviving the landing.  Once the rocket touches down MechJeb has done it's job and switches off and now you have a problem.  The high side of the rocket is on the ground but the low side is not--and it falls to the surface.  This imposes a torque on the rocket, even if it could still stand in the tilted position it's going to swing past that point to approximately twice the terrain tilt.  If the rocket is not stable in that position it falls over.

 

I've had many crashes with landing enabled with craft that were perfectly capable of landing at that site. 

Crash while in auto time warp.  Crash because the ship is sideways from the landing maneuver even though seconds before it was nearly vertical at low side velocity. Burn every ounce of RCS even though none was needed.  RCS stuck on until landing was disabled.  To the point of a habitual save before enable. I assume that if i enable landing it will crash. Sometimes MJ can land on extreme slopes other times it fails on flat plains.  If mechjeb fails a landing in my experience it is at a +30m/s or more vs the terrain. If it succeeds it's a nice gentle 0.5m/s. Load and let it run again it will succeed or maybe fail again possibly in a different way.

In my experience the safest landing MJ does is if brought to near suicide burn time and active land somewhere with auto time warp off. Killing horizontal velocity will help reduce the flipping chance.

Landing if it works right does a great job of soft landing almost anything. Its a great tool. The landing estimate is a life saver and time saver. It's made landings I wasn't sure were possible.

 

Share this post


Link to post
Share on other sites
1 hour ago, Bornholio said:

Landing if it works right does a great job of soft landing almost anything. Its a great tool. The landing estimate is a life saver and time saver. It's made landings I wasn't sure were possible.

 

The translatron is VERY reliable and works every time, but you have to spend the effort to monitor your craft all the way down in the keep vertical speed mode with kill horizontal checked and assure that it can maneuver to retrograde with reasonable speed.

Share this post


Link to post
Share on other sites
Posted (edited)

I am using 2.6.0.0 and getting thousands of those lines and the Landing Guidance Window is broken:

[EXC 17:20:14.980] IndexOutOfRangeException: Array index is out of range.
    MuMech.GuiUtils+ComboBox.Box (Int32 selectedItem, System.String[] entries, System.Object caller, Boolean expandWidth)
    MuMech.MechJebModuleLandingGuidance.WindowGUI (Int32 windowID)
    MuMech.DisplayModule.ProfiledWindowGUI (Int32 windowID)
    UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
    UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)
Q29SsEh.png

EDIT: i just landed with the Mechjeb Landing Guidance on the mun, it was no problem there. But when i am again in Orbit, its empty...

Edited by Blackline

Share this post


Link to post
Share on other sites
2 hours ago, Bornholio said:

I've had many crashes with landing enabled with craft that were perfectly capable of landing at that site. 

Crash while in auto time warp.  Crash because the ship is sideways from the landing maneuver even though seconds before it was nearly vertical at low side velocity. Burn every ounce of RCS even though none was needed.  RCS stuck on until landing was disabled.  To the point of a habitual save before enable. I assume that if i enable landing it will crash. Sometimes MJ can land on extreme slopes other times it fails on flat plains.  If mechjeb fails a landing in my experience it is at a +30m/s or more vs the terrain. If it succeeds it's a nice gentle 0.5m/s. Load and let it run again it will succeed or maybe fail again possibly in a different way.

In my experience the safest landing MJ does is if brought to near suicide burn time and active land somewhere with auto time warp off. Killing horizontal velocity will help reduce the flipping chance.

Landing if it works right does a great job of soft landing almost anything. Its a great tool. The landing estimate is a life saver and time saver. It's made landings I wasn't sure were possible.

 

I forgot about the timewarp bit--I always disable autowarp when it's about a minute from landing.

I have seen it squander RCS--design problem, the RCS wasn't properly balanced.

I used to habitually save before attempting a landing but so long as I'm confident of the design I no longer find that necessary.  The only time I've seen an impact velocity like 30 m/s was due  to my confusing it.  I had separate landing engines but some fuel left in the transfer stage.  I let it start the landing on the transfer engines.  Oops, with their tanks almost dry they had a higher TWR than the landing engines.  The transfer stage burned dry and I blew it off, TWR dropped, the deceleration burn took longer than it thought, boom.

Share this post


Link to post
Share on other sites

Many many thanks to your great works on the MJs.

Here is my problem: the auto-launch function,(or whatever it is called) , there is an option "launch to the target orbit plane" which is vital when you want to catch up something that inclination is not 0°. It worked perfectly many many versions ago and saved tons of DeltaVs especially when you were using a RSS mod. 

But it is gone now, it launchs the rockets with the right inclinations but at WRONG moments.

Could you please to fix it?

Thank you a lot.

 

 

Share this post


Link to post
Share on other sites
Posted (edited)
5 hours ago, ChrisDishen said:

Many many thanks to your great works on the MJs.

Here is my problem: the auto-launch function,(or whatever it is called) , there is an option "launch to the target orbit plane" which is vital when you want to catch up something that inclination is not 0°. It worked perfectly many many versions ago and saved tons of DeltaVs especially when you were using a RSS mod. 

But it is gone now, it launchs the rockets with the right inclinations but at WRONG moments.

Could you please to fix it?

Thank you a lot.

@ChrisDishenI would suggest that, as a  minimum, you provide some information as to how you're trying to perform your launch, i.e. screen shots of your vessel and the MechJeb parameters you're using, your KSP log file, a mod list, etc.  Your asking it to be fixed when it works successfully for others and not providing any information for the developer to help you is not going to get you much useful assistance.

To help everyone, please read the first post in this topic (no logs => no support) and the following thread:

 

Edited by Brigadier

Share this post


Link to post
Share on other sites

I've noticed that the "time to Pe" readout says infinity when on the inboard portion of a hyperbolic orbit. Could that be fixed?

Share this post


Link to post
Share on other sites
On 20.4.2017 at 5:15 PM, Blackline said:

I am using 2.6.0.0 and getting thousands of those lines and the Landing Guidance Window is broken:

[EXC 17:20:14.980] IndexOutOfRangeException: Array index is out of range.
    MuMech.GuiUtils+ComboBox.Box (Int32 selectedItem, System.String[] entries, System.Object caller, Boolean expandWidth)
    MuMech.MechJebModuleLandingGuidance.WindowGUI (Int32 windowID)
    MuMech.DisplayModule.ProfiledWindowGUI (Int32 windowID)
    UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
    UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)
Q29SsEh.png

EDIT: i just landed with the Mechjeb Landing Guidance on the mun, it was no problem there. But when i am again in Orbit, its empty...

sorry @Brigadier, was in a hurry: https://www.dropbox.com/s/f2ukadxqxtufkp6/output_log.txt?dl=0

the Log is from a fresh install -> load Savegame -> VAB -> load vessel -> Launch -> empty Landing Guidance Window

Share this post


Link to post
Share on other sites
Posted (edited)
28 minutes ago, Blackline said:

No apologies necessary @Blackline.  Not only was that not directed at you specifically (but well done anyway :P) but also I am just trying to help those wiser or newer at this than I.

Edited by Brigadier

Share this post


Link to post
Share on other sites
2 hours ago, Brigadier said:

No apologies necessary @Blackline.  Not only was that not directed at you specifically (but well done anyway :P) but also I am just trying to help those wiser or newer at this than I.

So you can't help? Bohooo! No, just kidding :-) I hope somene can tho...

Share this post


Link to post
Share on other sites
29 minutes ago, Blackline said:

So you can't help? Bohooo! No, just kidding :-) I hope somene can tho...

Hum, interesting one. Do you have "Replace drop down menu with arrow selector" active in the settings window ? If yes uncheck it and it should solve the problem and I ll fix the code for the next version.

Share this post


Link to post
Share on other sites
11 minutes ago, sarbian said:

Hum, interesting one. Do you have "Replace drop down menu with arrow selector" active in the settings window ? If yes uncheck it and it should solve the problem and I ll fix the code for the next version.

I flipped the setting, but reverted it. Must be ~3 days ago. But it doesnt help:

2TQfUDU.png

before

jugp0Mh.png

here is the LOG: https://www.dropbox.com/s/f2ukadxqxtufkp6/output_log.txt?dl=0 (replaced the old one)

Share this post


Link to post
Share on other sites

Ok, I guess you changed some mod and you have less landing site than before. 

In your GameData\MechJeb2\Plugins\PluginData\MechJeb2\mechjeb_settings_global.cfg you should find a "landingSiteIdx = x". Before launching the game edit the file and set the x to 0. Your save game should have a couple of those too, you can change them too (make a copy before editing). 

I hope this is it :)

Share this post


Link to post
Share on other sites

Got it, i had SSRSS on it with KSCswitcher, now went back to stock. Thats the reason why it changed. Works now, safe and sound! And thats why it worked on the mun = no landing sites preconfigured.

Thanks for the quick help!

Jfp15XD.png

Share this post


Link to post
Share on other sites

Great, I ll add the range check I forgot for the next version :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now