AndyMt

[1.4][1.7.7] GravityTurn continued - Automated Efficient Launches

Recommended Posts

I've always been a fan of  @Overengineer1's GravityTurn (see original thread). Unfortunately it wasn't updated for a while, so I thought to take care of that myself :).

Also thanks @sarbian for all the useful MechJeb code of which parts were/are incorparated into this plugin.

So this is what it does:

Launch a craft into a low orbit with a few customizable settings.

Performing a Gravity Turn is arguably the most efficient launch procedure. The plugin will take care of the entire ascent for you by maintaining a strict hold to prograde (as much as possible) and varying the throttle to keep the desired ascent curvature. The circularization burn will be up to you, but it's normally less than 50 m/s.

The "First Guess" button tries to find the best settings for a particular rocket. After the trajectory reaches the destination height and the vehicle leaves the atmosphere, you can revert back to launch and use the "Improve Guess" button to get a better set of parameters. Do this multiple times and you will get a very efficient launch.

Download the mod here

Source on GitHub

License: GPL V3

V1.7.7:

  • recompiled for KSP 1.4. ATTENTION: not compatible with 1.3.1 or earlier any more!

 

Spoiler

V1.7.6:

  • hotfix for issue #36

V1.7.5 (issue tracker):

  • New feature: showing orbital info in stats window (apoapsis, periapsis, time to those).
  • improvement: roll program starts after vessel has cleared it's own height.
  • improvement: launches with inclination much more precise now, no wobble and overcompensation.
  • improvement: Navball switches to orbital display when switchen to orbital insertion pitch program.
  • improvement: main window hides as soon as destination height is reached successfully.
  • bugfix: solved stuttering issue and further reduced memory garbage
  • bugfix: Hiding all TG windows when pressing F2

V1.7.2:

  • Calculation for start speed is based on current surface gravity
  • bugfix: topmost fairings were always staging
  • bugfix: "improve guess" didn't always improve because of duplicate launch db entries.

V1.7.1:

  • Storing default parameters for new crafts
  • Locking parameters so they are not overwritten.
  • Autostaging of top fairings and interstage fairings.
  • Option to speedup of launches via timewarp
  • Smother pitching maneuvers
  • Bugfix: Detection of MechJeb assembly.
  • Some more, see issue tracker

V1.6.1:

  • Bugfix: Circularization with MechJeb didn't work.

V1.6:

  • Stats window shown in (optional) separate window.
  • Stats window updates during manual launches.
  • Using new KSP skin with smoother fonts.
  • Reduced memory usage and garbage.

 

 

Feature requests are welcome, but of course subject to spare time restrictions and personal taste...

Disclaimers:

  • This mod does not work well with Realism Overhaul because of the way GT uses engine throttling.
  • For scaled up solar systems the calculated launch parameters (and iterations) might not be suitable, so don't expect it to work unless you know how to "guestimate" the parameters yourself.

Next on the plan:

  • Reworking UI
  • Adding KSPedia support (maybe)
  • Storing an loading a set of default launch parameters.
Edited by AndyMt
RSS and RO disclaimers.

Share this post


Link to post
Share on other sites
3 minutes ago, MarkusA380 said:

I don't see why not to use MechJeb for that.

Different approaches. MJ tries to follow preset trajectory even if it's suboptimal. This one relays on game physics engine to emulate real gravity turn which is more-or-less close to optimal (though in quite narrow range ot possible TWRs). 

Share this post


Link to post
Share on other sites

 

4 minutes ago, MarkusA380 said:

I don't see why not to use MechJeb for that.

A matter of personal taste maybe? Some consider it more efficient? And MechJeb is not ported to 1.2 yet. And recompiling that - I gave up on.

Anyways: you don't have to use it :).

Share this post


Link to post
Share on other sites

Great work.  I really like this mod.  Had been intending to have a go at updating this myself but been so short of time to get to grips with unity etc I'm glad someone has stepped up.

If you are open to collaboration I'd be happy to help in a few weeks when things get less busy.

Share this post


Link to post
Share on other sites
14 minutes ago, Kerolyov said:

Great work.  I really like this mod.  Had been intending to have a go at updating this myself but been so short of time to get to grips with unity etc I'm glad someone has stepped up.

If you are open to collaboration I'd be happy to help in a few weeks when things get less busy.

Thx :-). Yes, spare time is always an issue so I won't make any promises. If you like to help, just let me know.

Share this post


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

I don't see why not to use MechJeb for that.

Because this is both more efficient than MechJeb, and works with more rocket designs.


Glad to see this is being continued.  I'm not on 1.2 yet, but I'm glad to know my favorite launch helper will be waiting for me when I do.

Share this post


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

I don't see why not to use MechJeb for that.

Mechjeb is sub-optimal when you have a vehicle with very many lower boosters and a relatively small second stage, i.e: Falcon Heavy or Atlas V. The lower stages tend to be used for part (or all, if the payload is really light) of the circularization.

Share this post


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

I don't see why not to use MechJeb for that.

Does MechJeb just handle launches?

I don't want to do "Launch into LKO #69,105" manually, but I don't want all the overhead of MechJeb, either.  This, plus automatic maneuver node execution, is all I want.

Share this post


Link to post
Share on other sites
16 minutes ago, razark said:

Does MechJeb just handle launches?

[...]

...I don't want all the overhead of MechJeb, either.

Yes, MechJeb has an OK auto-launch feature.

 

Ok then, don't use the other stuff that it comes with? Have some self control

Share this post


Link to post
Share on other sites
2 minutes ago, StickyScissors said:

Yes, MechJeb has an OK auto-launch feature.

 

Ok then, don't use the other stuff that it comes with? Have some self control

"I want to hammer a nail."

"You should buy the local hardware store. They have nails."

"But I only want to hammer this nail."

"Fine. Buy the hardware store and only use the nails. Have some self control."

Share this post


Link to post
Share on other sites

Come on guys :) - everyone shall use the mods he or she wants... I'll definetly use MechJeb in 1.2 when it is available again - just not for launches...

Share this post


Link to post
Share on other sites
4 hours ago, AndyMt said:

I've always been a fan of  Overengineer1's GravityTurn (see original thread). Unfortunately it wasn't updated for a while, so I thought to take care of that myself :).

I've uploaded the source code changes to GitHub and recompiled the addon properly including versioning, license etc.

Thanks for the update!

Share this post


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

Ok then, don't use the other stuff that it comes with? Have some self control

So how do I install just the launch feature?

 

In short, not having everything else is worth more to me than having a single feature.

Share this post


Link to post
Share on other sites

I see why this has a purpose despite MechJeb's existence:
MechJeb is a big, hulking, all-in-one "Do Everything" Jack-of-all-trades AI system, but this is a small, simple one-trick pony. Some of us like to install the big total conversion package to change everything at once and get tons of features, and some of us prefer to pick and choose what to install for what function (I'm in the latter group).
For a comparison, think of KER versus a simple Delta-V readout as is often requested of the stock game.

Share this post


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

I see why this has a purpose despite MechJeb's existence:
MechJeb is a big, hulking, all-in-one "Do Everything" Jack-of-all-trades AI system, but this is a small, simple one-trick pony. Some of us like to install the big total conversion package to change everything at once and get tons of features, and some of us prefer to pick and choose what to install for what function (I'm in the latter group).
For a comparison, think of KER versus a simple Delta-V readout as is often requested of the stock game.

MechJeb's Ascent Guidance also failed to do exactly what this does, Ascent Guidance is basically just a pitch program, it does not optimize itself on a per craft basis

Share this post


Link to post
Share on other sites
7 hours ago, 5thHorseman said:

"I want to hammer a nail."
"You should buy the local hardware store. They have nails."
"But I only want to hammer this nail."
"Fine. Buy the hardware store and only use the nails. Have some self control."

If the ironmonger's shop is free, why not?

The reason to prefer Gravity Turn to MechJeb is not that MechJeb has many other features. It's that Gravity Turn does this one thing better.
 

Share this post


Link to post
Share on other sites

One feature I'd like to see in GravityTurn is a function to make it shut off the first stage's engine(s) and trigger stage-sep automatically with some fuel still left in that first-stage, so that when either StageRecovery or FMRS is installed, the first-stage will have enough delta-V left to make a propulsive landing. In the case of FMRS, perhaps even enough for a SpaceX style RTLS or ASDS recovery.

9 hours ago, razark said:

Does MechJeb just handle launches?

I don't want to do "Launch into LKO #69,105" manually, but I don't want all the overhead of MechJeb, either.  This, plus automatic maneuver node execution, is all I want.

How do you get tooltips to show for abbreviations like LKO there?

Share this post


Link to post
Share on other sites
18 minutes ago, StevieC said:

How do you get tooltips to show for abbreviations like LKO there?

It just happens for many things. It's part of the forum software.

Share this post


Link to post
Share on other sites
37 minutes ago, StevieC said:

How do you get tooltips to show for abbreviations like LKO there?

The exact same way you did. :D

 

2 hours ago, damerell said:

The reason to prefer Gravity Turn to MechJeb is not that MechJeb has many other features.

I carry a pocket knife.  I have a multitool that I could carry instead.  It even has a better blade than my knife.

But I prefer to carry the knife because I don't need all the other tools 99% of the time.  Carrying around a bunch of stuff I have no need of is pointless at best, and an annoyance most of the time.

Edited by razark

Share this post


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

One feature I'd like to see in GravityTurn is a function to make it shut off the first stage's engine(s) and trigger stage-sep automatically with some fuel still left in that first-stage, so that when either StageRecovery or FMRS is installed, the first-stage will have enough delta-V left to make a propulsive landing. In the case of FMRS, perhaps even enough for a SpaceX style RTLS or ASDS recovery.

I'd say that Smart Parts is your friend here.  Add a trigger to auto-stage at whatever fuel amount you want.

1 hour ago, razark said:

I carry a pocket knife.  I have a multitool that I could carry instead.  It even has a better blade than my knife.

But I prefer to carry the knife because I don't need all the other tools 99% of the time.  Carrying around a bunch of stuff I have no need of is pointless at best, and an annoyance most of the time.

There are multiple reasons to like this mod.  Some like it because it's lighter and less complex than MechJeb.  Some like it because it does a better job then MechJeb.  Some use it without other auto-piloting mods.  Some use it in conjunction with things like MechJeb or TCA, for the specific features that it offers.

All are good.  All are glad AndyMt is bringing it back from the abandoned pile.  Thank Andy that it's back, and let's stop arguing about why we like it.  :wink:

Share this post


Link to post
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.