MechJeb2

MechJeb2

4M Downloads

Any interest in updating the gravity turn from 'stock alike' to AndyMt's version?

mathuin opened this issue · 6 comments

commented

The one thing I don't like about MJ's ascent guidance is the gravity turn. It feels like an afterthought, almost, and it rarely works without tweaking.

I use https://github.com/AndyMt/GravityTurn/ for my gravity turns, but it's missing all the neat features that MJ's ascent guidance has -- timing launches for plane and rendezvous, automatically deploying solar panels, optional circularization.

Both projects are GPL-3.0 licensed, so there's no hurdles in that area. AndyMt's code has a few more tweakables, and the ability to improve after multiple reverts, but that shouldn't be hard to import into MJ.

I'm willing to do the work, but only if it has a good chance of being merged into master. What do you think?

commented

If I can find a way to create something new that's different from their gravity turn and works as well, then I'll submit a pull request!

commented

I have mixed feeling about copy/pasting an other mod code juste because you can. If you want to add something that is more that a copy paste I ll merge it but make it a bit original (and use the current dev code since @lamont-granquist changed it to allow more ascent systems)

commented

I did that already more or less.

Use the dev version, in the drop down menu at the bottom of Ascent Guidance pick "Stock-style GravityTurn™" and then when you click on "edit ascent path" you get a menu for controlling what the burn looks like.

It is not a copypasta of GravityTurn mod and I didn't intend it to be, I sort of don't agree with some of the choices that mod makes.

The intermediate altitude is used to control how much thermal heating you get, which you need to balance (manually somewhat) against your target altitude.

The major feature its missing right now is pitching up to account for low-TWR upper stages. I think it also probably could dribble throttle less and warp more so that it was much faster-to-orbit than the GT mod.

There's also the PEG method, but that requires single-burn-to-orbit and means you have to build a somewhat more realistic rocket with lower TWRs and your delta-v-to-orbit will be higher.

I want to document and/or throw up some videos of it all at some point, but right now I'm at the tail of a months-long complete rewrite and major upgrade of the PEG code.

commented

I was also pondering the feasibility of writing a MJ module that would automate multiple launches, varying parameters, resetting and relaunching when the vessel inserted into the orbit or failed, and using the final weight / final dV of the vessel as an value to be optimized and then pushing that into Levenberg-Marquardt or one of the other alglib optimizers. I did something like that with kOS awhile back.

generally though you're going to want to pitch over as soon and as hard as you can and still reach the intermediate orbit (drag losses outweigh gravity losses). if you pitch over too far generally you fail to make orbit because aerodynamic forces cause your rocket to either get dragged back to the surface (either don't use the AoA limiter and/or use smaller fins) or else your rocket tumbles due to high AoA (in which case maybe use larger fins) -- just back off until that stops. lower intermediate altitudes are better up until you burn up, although this seems to be second order effect. you don't really need an optimizer to figure out how to get a fairly decently low dV launch in stock.

commented

I definitely look forward to the documentation -- if I can understand the choices in the stock-alike gravity turn menu, I think I'll be happier with that than anything I can create.

commented

Closing this as its mostly done, and I'm working on #1061 and more or less we'll get better and better ascent guidance.