MechJeb2

MechJeb2

4M Downloads

Launch to rendezvous doesn't come close

Pontiac76 opened this issue ยท 4 comments

commented

I've built a rocket that launches gas tanks to my station. As suggested in MechJeb 1, I've launched, ended mission, then immediately relaunch as many times as needed with the same configuration. I've done this, however, I've RARELY ever come close to getting into orbit with my target in space. The station is at a 0.1 degree inclination, I'm normally launching at 0, but the last few times, I've set the inclination to 0.1. Once the gas tank gets to an orbit of 150km, checking the map, the station is anywhere from 1/4 to 2/3 behind me.

The very few times I do get close, I am about 10-20km away, which I kinda would expect for the differences in inclination.

commented

If you post a craft file of the ship you're launching, I'll try it out. The target is in a circular 150km Kerbin orbit?

commented

Absolutely.

Attempt 1 was done after a fresh startup of KSP. First thing I did was launch it, and got into that orbit.
Attempt 2 was brought on with a "End Flight -> Restart Flight".
My current Persistent file: https://dl.dropboxusercontent.com/u/1598459/Games/KSP/MechJeb2/persistent.sfs
My current gas tank: https://dl.dropboxusercontent.com/u/1598459/Games/KSP/MechJeb2/Station%20Fuel.craft

My actions:
Go to map screen, select the station as target. Return to ship view, click "Engage Autopilot" and then "Launch to Rendezvous", ensure "Auto Warp" is on.

There is an oddity somewhere, and it could be the craft itself, that could be related. When I was building this ship, right after 0.20 came out, I was having a problem with the balancing of the ship, so I had told MechJeb to stop staging at a particular point so I could see what was going on. Since then, I've corrected the problem and just want AP to stay on until it reaches orbit, however, AutoPilot turns off just as the final mainsail fires. I have to hover over the "Engage Autopilot" button just as that final engine goes off.

Relevant mods needed, Lazor System used on the station, Quantum Strut on everything, OBVIOUSLY MechJeb. Using the nightly build, which I dropped the DLL in before this test, NOT the rest of the code. I think that'd be it.

I haven't deleted the config files MechJeb writes out, as there could be an oddity in there.

attempt 1
attempt 2

commented

however, AutoPilot turns off just as the final mainsail fires. I have to hover over the "Engage Autopilot" button just as that final engine goes off.

This seems like the real problem. The ascent AP remembers an angle between when it was turned on and when it reaches orbit, so if it is getting turned off and then on again in the middle of ascent this will mess up the angle measurement for the practice launch.

I tried your ship. The reason the ascent AP is turning off is that during the initial part of the ascent, the "master" MechJeb part is the one on the lower stage. That MJ is the one running the ascent AP. When that MJ gets staged away, the remaining MJ takes over, but it is not running the ascent AP. Ideally MJ would not behave this way; we'll have to think about whether there's a straightforward way to fix this behavior.

A quick fix for you would be to remove the MJ on the lower stage and just keep the MJ on the upper stage. Then the upper stage MJ will always be the master, so the ascent AP will remain active throughout the ascent and it should be able to get a good measurement of the angle needed for rendezvous.

commented

That would make sense. Thanks for looking into this. I'm probably an edge case, so I don't think it'd be something taking a LOT of time investigating.