Jump to content

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


AndyMt

Recommended Posts

Well, I'll put it this way.  

If someone learns to play music "by ear" and can not read music, they may find there's a limit to what they can play.  However, when that person later attempts to learn to play by reading music, they will, for a time, find themselves unable to perform as they used to.  There will be a period of it all seeming more difficult.

It's up to you if it is worth it.

Link to comment
Share on other sites

Good analogy. I learned to play the alto sax by blowing into the end and fiddling with the knobs. Then I hit a wall, so learned to read music, I could then play reasonably well but found the fun had gone and I haven't picked it up in 10 years. 

Link to comment
Share on other sites

Let me try to break down the basics?  The most efficient trajectory uses Oberth effect to the max by burning as much as possible, as low as possible.  On airless worlds, that means just enough upward thrust not to hit terrain, and completely sideways thrust otherwise.  Gaining orbital speed 1cm off the surface would be the most efficient of all.

We can't do orbital speed at 1cm on Kerbin - or at least, not for long.  There's a delicate balancing act of gaining speed as low as possible without overheating and exploding.  Worst case is go straight up to space, and burn sideways in space for a total burn of like 4500m/s.  Best case is to burn as low as your ship can stand for about 3000m/s total.  Middle ground, an efficient path with some headroom for heat safety ought to cost about 3200m/s.

So then, in broad terms - all this mod does is kick the craft sideways just off the pad, then control throttle to keep the current high point of the trajectory (apoapsis or AP) a constant time ahead (Time to AP).  It basically doesn't steer the ship at all.*  That initial sideways kick alone sets how far over the whole trajectory will lean.

(*the exception is if it's at full throttle and can't maintain Time to AP - this happens if you are short on TWR - it will pitch up to gain some upward thrust.  This isn't an efficient path and you shouldn't rely on it; rather it's an indicator you should redesign for more TWR at that phase of flight.)

Turn start and turn angle set how hard the initial kick is.  It happens at the beginning when you're low and slow, long before drag matters, then goes back to prograde the whole way up.  The slower you're going when the turn starts, the stronger effect it will have on the resulting trajectory.  Same with turn angle.  Now, a lot of the complexity of the mod is about attempting to learn from successive launches and make improved guesses at what these numbers should be.  The bare default is 100m/s and 10 degrees - for ordinary rocket-shaped rockets, this is generally not enough; you'll go relatively directly to space, turn right, and have a large circularization burn and expensive ride to space.  Sometimes it will guess 56m/s and 18 degrees - this generally will be very shallow, lots of time going hypersonic and burning up.  It may be extremely efficient, but without a fairing you will likely have low-temp parts explode.  A rough middle ground is 70m/s and 15 degrees - lately I just throw these numbers in when I just want to reach space for 3200m/s of dV and don't want to faff about.

Time to AP start and finish - these have a powerful effect but just leave them on default.  It used to default to 40, now it defaults to 50, seems similar.  Whenever I've messed with these it's not ended well.  This is the chief genius of this mod - controlling throttle to keep a constant time to AP despite changing drag, changing thrust, changing mass.

All the other numbers, just leave them alone.

(I'm sure that was dumbing things down too much for experienced players like @Foxster, but maybe the thread needs it anyway?)

edit: might as well add this below for completeness:

Sensitivity...Minimum throttle?  (Yes - this is an option for Realism Overhaul where many engines will conk out below a certain minimum throttle)

Destination Height...On safer ground with this one. (Yep, you got it)

Roll... (the default position of command pods in the VAB is heads-south, or 180.  Want it to stay there? Change this to 180.  Want it to roll to heads-up on a east-going prograde launch? Leave it on the default 90.  Roll to heads-down like the Space Shuttle?  270. Doesn't change the gravity turn or the trajectory at all, just the orientation of the ship on the way up)

Inclination...OK with this one too. (This used to be very bugged, but it works now - just expect that you will likely need to make minor adjustments on-orbit if you're trying to match a very precise orbit, like a contract requirement)

Pressure Cutoff... (this is the atmospheric pressure where it will automatically deploy fairings.  This is a balance between hauling unnecessary fairing mass too far, and suffering increased drag once you ditch them. Default is usually OK.  It's maybe a bit on the low side, so if your fairings are very tight around your ship, the air drag may cause fairings to impact the side of the rocket.  A lower number means a higher-altitude deployment.)

Edited by fourfa
Link to comment
Share on other sites

I tried GT on ksp 1.2.2 and RealSolarSystem_v12.0

I pinned the sensitivity (throttle) to 100% to see how it'd work on RO.

After a bit of faff I've decided it should work fine just fine.

Here are the settings I used for 1 click to orbit. (for this craft)

 

U05zvvs.jpg

 

5vy4X3v.jpg

The big pitch squiggles in the flight recorder at the end is just tumbling at the end of the burn.

The automatic circulation burn (which I cancelled) was 2.2m/s

One ignition per stage, as above throttle pinned at 100% all the way.

Edited by MarlboroMan
Link to comment
Share on other sites

7 hours ago, fourfa said:

Let me try to break down the basics?  The most efficient trajectory uses ...

That, sir, is excellent and it has plugged some big gaps for me. Thank you. 

One small thing...I have only used it for Kerbin once, which is what many of the examples talk about. I've only tried it in anger for Eve. 

Link to comment
Share on other sites

 

3 hours ago, MarlboroMan said:

I tried GT on ksp 1.2.2 and RealSolarSystem_v12.0

I pinned the sensitivity (throttle) to 100% to see how it'd work on RO.

After a bit of faff I've decided it should work fine just fine.

[...]

Thanks a lot for testing this. I'm happy to see it can be used with RO. Probably some adjustments are needed, like taking orbital velocity into consideration for the initial values - or not try throttling down/shut down for engines with only 1 ignition.

And by the way - that' must be a hell of a monitor on your desk - or 3 big ones in any case...

10 hours ago, fourfa said:

Let me try to break down the basics?  

[...]

 

Wow, thanks a lot for this post. If it is ok, I'll use part of this as a basis for the upcoming wiki/KSPedia (haven't decided which way to go yet).

12 hours ago, Foxster said:

Thanks for that. 

I have used the ? buttons and they just didn't help me much. I'm afraid that your explanations, though no doubt excellent, only help a little. I really do need an idiot's guide with phrases like "Make this number bigger to get there quicker but waste more fuel". 

[...]

I must admit I haven't looked in detail at the explanation texts when I've continued with this mod based on the original authors work. As I want to change the UI anyway, the texts will get an overhaul as well. In any case I'd like to hide most of the parameters on the basic UI, so that new users of the mod can just start without having to worry about all the details. Just enter destination height, inclination and roll, decide on auto staging, press "Launch" - that's it.

Edited by AndyMt
Link to comment
Share on other sites

id like to add on Time to AP start and finish

the bigger the start time the less time it will be in high pressure zone

the lower the finish time the more efficient the lunch

i started using 50-40 wen a long unstable ship had the a flipping problem, and by increasing the start time to AP to 60 and lowering the end to 30 i solved the problem and got a better dV then lowering the start angle  or increasing the start turn speed

Link to comment
Share on other sites

3 hours ago, AndyMt said:

 

Thanks a lot for testing this.

And by the way - that' must be a hell of a monitor on your desk - or 3 big ones in any case...

 

My pleasure.

Yeah i've always had 2 monitors on my desk plus the telly. after my last pc upgrade a year ago i found i can connect at least 3 monitors into my gfx card and my telly into my on board gfx. Then thank science i found my Nvidia card can span 3 monitors to have a desktop resolution of 5040 x 1050 (3x 1680 x 1050)

I can't put into words how lovely it is to have all my mechjeb and app windows to the side and my middle monitor clean so I can see my rocket.

And it makes RSS shots like these nice

1EWTBCl.jpg

 

Next I tried launching into 51.64 inclination. It undershot so I had to overshoot my target inclination, it also required a slightly more shallow accent.

uQggyGd.jpg

orlkDAN.jpg

Edited by MarlboroMan
Link to comment
Share on other sites

Well that description from @fourfa sure helped me!  Made me think to try a lower speed for the turn.  My x20 kept flipping so I upped the speed for the turn and ended up going straight up almost.  Tearing my hair out I read that description above and it hit me, turn when the air pressure it too low to flop it!!  Worked a treat!

Edited by tg626
Link to comment
Share on other sites

22 hours ago, Foxster said:

One small thing...I have only used it for Kerbin once, which is what many of the examples talk about. I've only tried it in anger for Eve. 

Good point.  Eve is drastically different - it's probably useful to share experiences and settings for Eve here as well.  As well as provide feedback on performance there, to close the loop and make sure it's doing its job there too.

Link to comment
Share on other sites

In terms of Eve, I just used it. The only change I made was to set the starting velocity much higher, 250 iirc, to both get out of some of the soup and to stabalize to vertical after launching from a tilted base since my landing wasn't perfect.

Link to comment
Share on other sites

OnOn 16.12.2016 at 8:43 AM, MarlboroMan said:

@AndyMt Would you be able to add a list where we can save GT settings for a particular craft?

I actually plan something similar, details you find in the Github issue tracker:

https://github.com/AndyMt/GravityTurn/issues/17

But that requires the UI overhaul to be completed.

Link to comment
Share on other sites

On 12/1/2016 at 11:44 AM, Nicias said:

I download 1.7.6 and it seems to have fixed a problem I've been having where GT wouldn't ever turn when launching from Mun or Minmus. It was an intermittent problem, so maybe I just got lucky. I'll let you know if it comes back. 

I think this was a mechjeb GT interaction. I had SmartASS from MechJeb keeping the craft vertical still on from the descent, and that was overriding the GT pitch control.

Link to comment
Share on other sites

21 hours ago, Kerbal007 said:

Love this mod, Can someone point me where I can learn how to read the Statistics window so I can understand if my launch is efficient ? Cheers!

Dunno if there is any strong doco but here is a short version as I understand it:

3 types of efficiency losses are tracked/modeled: air drag, gravity drag, thrust vector drag

Air drag is resistance from the air being pushed out of the way on a body with an atmosphere.  Having nicely shaped rockets (pointy) helps here.  Use fairings around your space payloads.  Worst air drag is within 10 to 30 seconds of launch; you are moving fast and the atmosphere is thick.

Gravity drag is the loss from being deep in a gravity well.  For example the worse case is having thrust equal to your weight at the surface.  You won't lift off but technically you are pressing down on the launchpad with the weight equivalent of a sheet of paper (ignoring the streaming hot gases beating on the pad); This would be 100% gravity drag loss.  As you get further from the center of a body's mass (assuming you are trying to orbit), gravity drag goes toward zero.  The perfect launch on an airless world is to get enough altitude to clear mountains then burn sideways until you achieve orbit.  Atmospheres need to be cleared and this causes you to waste a lot on gravity drag.

Thrust vector drag is the loss from having to point your rocket thrust in some other direction than prograde.  This can't be zero unless you have a perfect launch that already starts at a "gravity turn" angle (10 to 20 degrees with a strong enough booster to not go sideways, think bottle rockets).  A common place to generate a lot of this drag is a weak engine on an upper stage that is struggling to push you into orbit.  Your thrust vector will be way off from prograde.

The window also sums them all up for you.

In general gravity drag is the biggest hitter. You can improve by increasing the angle.  The tradeoff is that you then experience more air drag and potentially parts burning up from heating.  A certain amount of thrust vector drag is unavoidable.  You are trying to turn from straight vertical to horizontal.  GravityTurn generally does a much better job on thrust vector drag then you manually launching rockets into space.  My guess is that thrust vector savings are one of the biggest that users gain by automating launches.

Edited by NeuroticGamer
Link to comment
Share on other sites

I have a feature request.

IIUC, "sensitivity" determines the minimum throttle GT will apply to a rocket while it is keeping the Time to Ap at the target value.

When I launch with a liquid + solid first stage, often as the solids burn out my TWR is way up around 3. GT only adjusts the throttle on the liquids since they are the only things throttleable.  so if the solids are providing half the thrust, and sensitivity is set to .3, then the overall thrust is only reduces to (.5 + .5 * .3) = .65 rather than .5. This runs up the TtA. So I often launch with sensitivity set to 0 or .01 and then change it to .3 after the solids are spent.

Would it be possible to have GT adjust the throttle so that the *overall* thrust is sensitivity*max thrust? So for instance if sensitivity is .3 and solids provide a quarter of the thrust, then set sensitivity to 1/9 so that .25 + .75 * .0667  = .25 + .05 = .3 as desired, rather than .25 + .75 * .3 = .25 + .225 = .475.

Link to comment
Share on other sites

Loving this: Even the "best guess" stats seem to do a much nicer and reliable turn than MechJeb, especially with a much more reliable final inclination.

In fact, the only thing it's really missing is an option to time a launch and set the inclination to match planes with a target. What are the chances of this being added later?

Link to comment
Share on other sites

23 hours ago, Rohaq said:

Loving this: Even the "best guess" stats seem to do a much nicer and reliable turn than MechJeb, especially with a much more reliable final inclination.

In fact, the only thing it's really missing is an option to time a launch and set the inclination to match planes with a target. What are the chances of this being added later?

I would like to keep GT's functionality to it's core task: performing a gravity turn launch into orbit with a given set of parameters. But I'm open to implement an interface to/from any other mod which's author is willing to cooperate. But first I have to finish the UI overhaul and refactoring of logic/data etc. Which is quite a big task and progress over the holidays was... minor...

On 2.1.2017 at 2:47 PM, Nicias said:

I have a feature request.

IIUC, "sensitivity" determines the minimum throttle GT will apply to a rocket while it is keeping the Time to Ap at the target value.

When I launch with a liquid + solid first stage, often as the solids burn out my TWR is way up around 3. GT only adjusts the throttle on the liquids since they are the only things throttleable.  so if the solids are providing half the thrust, and sensitivity is set to .3, then the overall thrust is only reduces to (.5 + .5 * .3) = .65 rather than .5. This runs up the TtA. So I often launch with sensitivity set to 0 or .01 and then change it to .3 after the solids are spent.

Would it be possible to have GT adjust the throttle so that the *overall* thrust is sensitivity*max thrust? So for instance if sensitivity is .3 and solids provide a quarter of the thrust, then set sensitivity to 1/9 so that .25 + .75 * .0667  = .25 + .05 = .3 as desired, rather than .25 + .75 * .3 = .25 + .225 = .475.

I've observed this already, too - and sometimes it causes trouble - but mostly not (in my case). I'll consider it, but it has to queue in the issue tracker further down the list at the moment:

https://github.com/AndyMt/GravityTurn/issues/38

Link to comment
Share on other sites

1 hour ago, AndyMt said:

But I'm open to implement an interface to/from any other mod which's author is willing to cooperate

One idea, assuming "Plop a maneuver node at Ap to circularize"* is still not an option: How about KAC integration to add a pause-the-game alarm at Ap, so I can hit launch and go make dinner without fear of coming back to my ship screaming back down through the atmosphere?

*I know circularization is possible if you have MechJeb installed but I don't want to install it just for that.

Link to comment
Share on other sites

25 minutes ago, 5thHorseman said:

One idea, assuming "Plop a maneuver node at Ap to circularize"* is still not an option: How about KAC integration to add a pause-the-game alarm at Ap, so I can hit launch and go make dinner without fear of coming back to my ship screaming back down through the atmosphere?

*I know circularization is possible if you have MechJeb installed but I don't want to install it just for that.

With nothing but KAC you can set up auto-alarms for AP. 

Link to comment
Share on other sites

33 minutes ago, Beetlecat said:

You can do it in a click or two.

No, you can't.

You can set up an Ap alarm during launch, but it sets the alarm to the current Ap which is changing. The alarm then goes off way early, frequently while still in atmosphere, and is totally counter to what I want to do which is start the launch and walk away.

If you know of another way, please document the click or two that is required to get it done.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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...