Jump to content

[1.12.x] Anatid Robotics / MuMech - MechJeb - Autopilot - [2.14.3] [4th March 2023]


sarbian

Recommended Posts

On 8/15/2017 at 11:19 AM, sarbian said:

Nope. I never had this particular problem with the reentry AP. One useful info would be a screenshot of the dV window. Most of the math are done using that.

I recorded a video to show the problem:

I must admit however that I probably didn't have the required dV. I guess that's why I'm having this erratic behavior? 

Is it technically possible to auto land on the KSC pad? 

 

 

Link to comment
Share on other sites

I am traveling for a few days so I'll have a look at the end of the week. 

Landing on the pad worked with the old aero. I just need to find the will & time to debug the current code... 

Link to comment
Share on other sites

Mechjeb really needs an update for spaceplanes. Ascent Guidance works a lot better with vertical craft than non-vertical spaceplanes, and seeing spaceplanes are a popular part of the game, I don't see why it should be this way. Also, Spaceplane Guidance is nothing compared to Landing Guidance, such as a display with not a lot of features, and missing out on adjusting throttle, and usually spaceplanes land back at the KSC, not rockets, so seeing a upgrade for spaceplanes would really make the mod a lot better.

Also, a feature to land at the Inline KSC for landing guidance and a flat area near it for spaceplane guidance would be nice.

 

Also also, does Mechjeb simulate powered landings for bodies with an atmosphere?

Edited by Grand Ship Builder
Link to comment
Share on other sites

Looks like with the AirplaneAutopilot you are reinventing the weel.

When i am flying a spaceplane to orbit and back i use Kramax Autopilot for flying in the atmosphere and Mechjeb for the rest.

The mod was abandoned, but kept alive by linuxgurugamer. Perhaps it was an option to integrate it into Mechjeb as an modul for flying airplanes?

Kramax  is nearly perfect in flying airplanes, while Mechjeb is the best autopilot for Spacecrafts so far, so why not bring these two together?

Just my two cents :)

Link to comment
Share on other sites

11 hours ago, Kampfsanni said:

Kramax  is nearly perfect in flying airplanes, while Mechjeb is the best autopilot for Spacecrafts so far, so why not bring these two together?

Or you can just use the two mods in concert.  I have used both MechJeb and Pilot Assistance in the past, either one or the other depending on circumstances.  Kramax was developed from Pilot Assistance.  Pilot Assistance isn't being actively supported as @Crzyrndm has stepped down from modding.  @linuxgurugamer is at least maintaining Kramax, so I'll be using it with MechJeb.

Anything else is up to @sarbian deciding what he thinks is the best us of what time he wants to allocate to KSP.  Adding in such a detailed mod as a component isn't a trivial task nor is it necessarily the best thing to do.  Especially as they can be used in concert now.

Link to comment
Share on other sites

11 hours ago, Jacke said:

Or you can just use the two mods in concert.  I have used both MechJeb and Pilot Assistance in the past, either one or the other depending on circumstances.  Kramax was developed from Pilot Assistance.  Pilot Assistance isn't being actively supported as @Crzyrndm has stepped down from modding.  @linuxgurugamer is at least maintaining Kramax, so I'll be using it with MechJeb.

Anything else is up to @sarbian deciding what he thinks is the best us of what time he wants to allocate to KSP.  Adding in such a detailed mod as a component isn't a trivial task nor is it necessarily the best thing to do.  Especially as they can be used in concert now.

As i said, it is only one option. But it is always a good idea to take a look into a working solution, to see how they manage to fly a plane. Turning a spacecraft is one thing, but turning a plane is a complete different thing. You have to control roll, pitch and yaw at the same time to fly a good turn, and this is the point where  Sarbian has problems at the moment. I know Sarbian will solve the problem one way or the other, but it is easier when you can learn from others, instead doing it all from scratch. And i know, to create something like mechjeb is a hell of a job. We can't thank Sarbian enough for his work, without it KSP would not be the same.

 

Link to comment
Share on other sites

Launch into plane / rendezvous still does not select the right time to launch to actually come anywhere close to the right plane. Is there any hope that this will ever be looked into? It is still behaving exactly as in this github issue: https://github.com/MuMech/MechJeb2/issues/739 , and I also even tried looking for previous commits that might have broken the timing of the launch, which always used to be reliable.

 

Link to comment
Share on other sites

KSP: 1.2.2 Windows 64bit Dx11
MJ: 2.6.0 and Dev #698

Main mods: RSS + RO + FAR + RealChute + RealFuels + RealHeat + KSCSwitcher + StationKeeping + BetterBurnTime + LandingHeight + many part mods

1. I'm trying to launch the rocket to Moon via MechJeb Ascent guidance autopilot.

This is the stable result (yellow is the Moon's orbit):

https://yadi.sk/i/3aQR8D563McioV

Log.

Several times it worked (in 2.6.0), and a couple of launch was succesfull.

Where to look for?

2. Trying circularize at Ap through maneuver planner.

After Pe (413 km) I create circularize task with Time Warp. The vessel starts to turn retrograde, but instead of warping to Ap the engines activates immediately, decreasing the Ap height.

 

P.S. Also I had strange behavior of Smart A.S.S. prograde\retrograde functions orbiting the Moon. Suddenly, after a couple of turns, I've got such a problem as in video above, but I haven't any save.

 

 

Edited by MaxP
Link to comment
Share on other sites

8 hours ago, drhay53 said:

Launch into plane / rendezvous still does not select the right time to launch to actually come anywhere close to the right plane. Is there any hope that this will ever be looked into? It is still behaving exactly as in this github issue: https://github.com/MuMech/MechJeb2/issues/739 , and I also even tried looking for previous commits that might have broken the timing of the launch, which always used to be reliable.

Do you launch / revert / re-launch?

Any launch to rendezvous algorithm can only guess at your rocket's characteristics and how it will launch, and therefore can only guess at what time to launch. In order to deal with this, a full simulation has to be performed: NASA and co use powerful computers to do this, we have to use a trick to get the right "guess":

  1. Launch the rocket using Launch to Rendezvous/Plane. Mechjeb will make its best guess and will probably get it wrong, but it will save data on the characteristics of the rocket that will allow it to do a better job next time. This step is the "simulated" launch.
  2. Revert to launch.
  3. Repeat the launch without changing any launch profile settings or rocket loadout. (This is essential. The characteristics Mechjeb saved will only be valid if the launch profile and loadout are identical. If you change anything then you must go back to Step 1.) Mechjeb will use the saved rocket characteristics to get a very-nearly spot-on rendezvous or launch-to-plane.

I hope this helps!

Link to comment
Share on other sites

31 minutes ago, softweir said:

Do you launch / revert / re-launch?

Any launch to rendezvous algorithm can only guess at your rocket's characteristics and how it will launch, and therefore can only guess at what time to launch. In order to deal with this, a full simulation has to be performed: NASA and co use powerful computers to do this, we have to use a trick to get the right "guess":

  1. Launch the rocket using Launch to Rendezvous/Plane. Mechjeb will make its best guess and will probably get it wrong, but it will save data on the characteristics of the rocket that will allow it to do a better job next time. This step is the "simulated" launch.
  2. Revert to launch.
  3. Repeat the launch without changing any launch profile settings or rocket loadout. (This is essential. The characteristics Mechjeb saved will only be valid if the launch profile and loadout are identical. If you change anything then you must go back to Step 1.) Mechjeb will use the saved rocket characteristics to get a very-nearly spot-on rendezvous or launch-to-plane.

I hope this helps!

Did you actually read the github issue? In it, I present an imgur album showing that it's just plain broken. It's not about fine-tuning the time of launch; it frequently launches either off by several hours, or with exactly the opposite inclination for the chosen time. In the album I explain it pretty clearly and also revert 3 times.

Basically, it appears that whatever in mechjeb calculates the time to launch into the plane is totally broken... and it didn't used to be this way. The reason I posted this yesterday was that I tried to launch into the plane of Minmus with 3 reverts and every launch required a 300+ dV plane change maneuver after circularization. So clearly it's still completely broken.

edit: just to say that yesterday, when trying to launch into plane for minmus, it didn't even bother to set a countdown timer to try to time anything. It would just launch into a +- 6 orbit from wherever I currently was w.r.t. the correct plane. One of the time I randomly happened to be close to the right spot, and I thought maybe MJ had been fixed. But several later launches showed that to definitely be false. 

Edited by drhay53
Link to comment
Share on other sites

@drhay53 In your screenshots the initial settings show large numbers in the boxes next to the launch to rendezvous and launch to plane of target buttons. Try setting these to zero for the initial launch before clicking the button and then allowing MJ to set their values on revert/re-launch.

Edited by Aelfhe1m
Strike out mistake
Link to comment
Share on other sites

1 minute ago, Aelfhe1m said:

@drhay53 In your screenshots the initial settings show large numbers in the boxes next to the launch to rendezvous and launch to plane of target buttons. Try setting these to zero for the initial launch before clicking the button and then allowing MJ to set their values on revert/re-launch.

Aren't those basically just times (expressed as angles, in the sense that the conversion is controlled by the the rotation rate of kerbin and the current position w.r.t. the line of nodes)? MJ used to get those times basically right; even if it wasn't timed perfectly, even without reverting, you'd get fairly close to the right plane. However, I doubt the initial values of these has anything to do with MJ learning the ascent properties of the launch vehicle properly. 

Now, it basically never approaches the right plane. It behaves as if it can't properly calculate where the line of nodes passes through kerbin. 

I am testing the craft I was trying to launch to the plane of minmus yesterday:

1) first launch, 107 m/s dv for plane change after reaching orbit. That's not too bad, actually. I forgot to write down the angle but it was ~5 hours of time warp.

2) revert to launch, launch into plane again. The angle for launch into plane was 12 degrees. 406 m/s plane change burn after reaching orbit. The orbit is basically 90 degrees rotated from minmus. 

3) revert a second time. the angle this time is 120 degrees. after clicking launch into plane there was no countdown timer. Engaging autopilot launched immediately. after reaching orbit, 279 m/s dv plane change burn required.

I can keep going, but the behavior is identical to what I posted in the github issue. The timing of launches behaves erratically across different revert's and never approaches being even remotely correct.

 

Link to comment
Share on other sites

@drhay53 I believe they behave as offsets for "leading" the target orbit. Slight correction to earlier post - don't let MJ set the values on a revert either.

To test I started a new sandbox save in my heavily modded build:

  • Launched a Kerbal-X into a 53° 150km orbit to serve as a target.
  • Time warped forward several days to make sure orbits were randomly aligned.
  • Rolled out a new Kerbal-X to launch pad and set target to first vessel.
  • Opened ascent guidance and set the box next to the "launch into plane of target" button to 0.
  • Clicked "launch into plane of target" and "engage autopilot"
  • Watched the launch. Final orbit was 1.77° relative to target.
  • Revert and relaunch (again setting value to 0).
  • Got 1.75° relative inclination
  • Revert again and set value to 1.8
  • Final orbit was 0.33° relative inclination

Final launch: http://imgur.com/a/TK6La

 

Link to comment
Share on other sites

1 minute ago, Aelfhe1m said:

@drhay53 I believe they behave as offsets for "leading" the target orbit. Slight correction to earlier post - don't let MJ set the values on a revert either.

To test I started a new sandbox save in my heavily modded build:

  • Launched a Kerbal-X into a 53° 150km orbit to serve as a target.
  • Time warped forward several days to make sure orbits were randomly aligned.
  • Rolled out a new Kerbal-X to launch pad and set target to first vessel.
  • Opened ascent guidance and set the box next to the "launch into plane of target" button to 0.
  • Clicked "launch into plane of target" and "engage autopilot"
  • Watched the launch. Final orbit was 1.77° relative to target.
  • Revert and relaunch (again setting value to 0).
  • Got 1.75° relative inclination
  • Revert again and set value to 1.8
  • Final orbit was 0.33° relative inclination

Final launch: http://imgur.com/a/TK6La

 

Ok, but haven't you just proven that MJ cannot calculate the leading angle correctly, hence, there is still a bug? You have overridden the most important part of the launch.

Link to comment
Share on other sites

2 hours ago, Aelfhe1m said:

@drhay53 I believe they behave as offsets for "leading" the target orbit. Slight correction to earlier post - don't let MJ set the values on a revert either.

To test I started a new sandbox save in my heavily modded build:

  • Launched a Kerbal-X into a 53° 150km orbit to serve as a target.
  • Time warped forward several days to make sure orbits were randomly aligned.
  • Rolled out a new Kerbal-X to launch pad and set target to first vessel.
  • Opened ascent guidance and set the box next to the "launch into plane of target" button to 0.
  • Clicked "launch into plane of target" and "engage autopilot"
  • Watched the launch. Final orbit was 1.77° relative to target.
  • Revert and relaunch (again setting value to 0).
  • Got 1.75° relative inclination
  • Revert again and set value to 1.8
  • Final orbit was 0.33° relative inclination

Final launch: http://imgur.com/a/TK6La

 

After testing this: while this is a solution to get the planes pretty close, I do think it's now quite obvious that something in the estimated leading angles is what is broken. MJ would do way, way better if it just always set the number to 0 and never tried to estimate anything. 

My guesstimate is that setting the value to 0 simply ignores all of the 'learning' that MJ is supposed to be doing when you launch and then revert; so whatever is happening in that "learning" is probably what's broken. Hopefully @sarbian will be able to find the bug and fix it; with a workaround that gets me pretty close I no longer have to waste a ton of delta-v changing planes in-orbit, so I won't complain anymore, I'll just hack the number to 0 until hopefully a fix comes around in the future.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...