Jump to content

[1.0.5] GravityTurn version 1.3.1 - Automated Efficient Launches (1.1 pre-release available)


Overengineer1

Recommended Posts

20 minutes ago, Overengineer1 said:

@KerBlam So, like I said already, your ship is underpowered for the settings you have entered.  I already told you the settings to change.  The sudden shift in angle of attack is actually a shift to zero angle of attack to orbital prograde.  Check it yourself.  The mod is trying to reach 40 seconds Time To AP, because you told it to, and it's trying to get there as soon as possible, because you told it to.  Your ship is not capable of doing that before 1 minute and 30 seconds into launch, which is an extremely slow launch.  Your lifter stage is only 1.4 TWR, and that goes down almost immediately in the next stage, so it's no wonder that the mod is having trouble keeping up with the default settings.

Your ship has a lot of non-stock parts, so I'm not able to load it.  But I think a Hold AP Time Start of 30 seconds, and a Hold AP Time Finish of 60 seconds is a good place to start.

Yes you told me what settings to change. McIrish3 asked if I was getting better results than the best guess so I did it that way. You understand what your mod does and why, I don't (but I'm trying to) so Best Guess is where most users will get their start.

I have checked it, and from what I'm observing the ship does not change to an orbital prograde until about 36km, or are you saying it does this without changing the display of the navball? I guess It must do, because when the navball does change to orbital the prograde marker is already lined up,

GXLi6oV.png <this is when it changed to orbital on navball. Notice this is with changed settings but it was the same with best guess. 30-60secs as you suggested, plus using the turn start and speed I usually use. I played with the sensitivity but that didn't change much. The end result was this launch being quite efficient but still marginally more expensive than my usual launch, and very accurate to 100km which I like very much.

KER is telling me that my launch stage atmo.TWR is 1.6 and IMO that is not *underpowered* that is more than enough to get the craft off the ground and as I have demonstrated into orbit reasonably efficiently with a payload. Every piece of advice I have read has said anything around 1.5 is fine and much more than that is a waste and that reentry effects are caused by excessive loss due to atmo drag. I have gotten the best efficiency in my style of ascent from that advice. I don't need to touch the throttle, I barely need to touch the controls at all once I set the turn at 50m/s other than to keep the inclination right.

I don't know what to say, I'm definitely not trying to nitpick, or enter into a liquiding competition about this, or prove you wrong in any way. I'm just trying to get the best out of what seems to be a very useful mod. I'm hoping you find some use in a different set of data?

  I'll keep tinkering and if I come up with any results I will post them, it may help others.

Link to comment
Share on other sites

1 hour ago, FrontLineFodder said:

@KerBlam My install does not have the following parts, this is a science save not career

  1. SmallSpotlight
  2. MK1LFOFuselage
  3. LGLadderUtility
  4. 1x3SPanels
  5. fuelTank1-5
  6. Size2MedEngine
  7. SmallPointLight
  8. SmallStripLight

 

 

Oh yep... haha I have quite a few mods installed I forget whats stock and what isn't... It definitely is a career save though I don't even have a science save.

Link to comment
Share on other sites

For those that see the AP increase and don't like it, for example 5 minutes instead of 40 seconds, you could lower that minimum throttle setting a bit. (I think it's on 0.2 by default).

That ought to keep the AP closer higher up in the burn.

Link to comment
Share on other sites

On 1/21/2016 at 3:26 PM, Shalfar said:

I'm seeing an issue where shortly after the beginning of the gravity turn the craft attempt to return to vertical flight for just a moment.  This is very pronounced for small rockets.  With stock physics this is troubling but can be overcome, but with FAR it sends the rocket tumbling.

Having the same issue, stock atmo. Tried different gimbal ranges and TWR settings, can't pinpoint why would that happen on some craft while on the others it's fine.

I would assume it does so to ensure to get enough time to AP start when it's finally switched to prograde as I've seen it do many times with upper stages with low (~1.00) TWR - it's flying at some AoA to prograde/orbital prograde.

Link to comment
Share on other sites

16 hours ago, Ixenzo said:

Having the same issue, stock atmo. Tried different gimbal ranges and TWR settings, can't pinpoint why would that happen on some craft while on the others it's fine.

I would assume it does so to ensure to get enough time to AP start when it's finally switched to prograde as I've seen it do many times with upper stages with low (~1.00) TWR - it's flying at some AoA to prograde/orbital prograde.

I'm having the same issue as you two.

on my stock career I'm having to make a decision, go back to 1.2.1 or modify all my launchers. (So far I'm back to 1.2.1)

I'm used to set it to 60s to AP and it always worked just fine for me, a mixture of low fuel usage to low time to orbit but with 1.2.2+ (I only tested 1.2.3 but since it was on 1.2.2 that he changed something about TWR I think it started there) my rocket begins the gravity turn then it tries to go back a little and hold a pattern close to vertical, it's nothing big and I noticed it's more pronounced when I input something bigger than 40s on time to AP.

I ran quite a few simulations and I noticed I lost around 200 m/s DeltaV from 1.2.1 to 1.2.3 with the same rocket and same settings (I'm talking about Kerbal X in case anyone want to reproduce the testing)

 

What I did was: add mechjeb to Kerbal X rocket, just that, launch the rocket, click best guess then either launch with Time to AP as 40 or change it to 60 on both start and end. 

Below are a few of my results:

1.2.1 - 40s to AP - Total Burn 3094, Total Loss 1035, orbit DeltaV remaining 3220m/s

1.2.1 - 60s to AP - Total Burn 3086, Total Loss 1056, orbit DeltaV remaining 3197m/s

1.2.3 - 40s to AP - Total Burn 3163, Total Loss 1101, orbit DeltaV remaining 3156m/s

1.2.3 - 60s to AP - Total Burn 3047, Total Loss 1243, orbit DeltaV remaining 3008m/s

I made some other settings, like 40s/50s to AP (works great and 1 to 2m less Time to Orbit) and 40s/60s to AP (not as good on the fuel side but better than straight 60s)

TL;DR - From 1.2.1 to 1.2.2+ my crafts lost DeltaV with best guess settings or best guess + 60s to AP. It's more pronounced with 60s to AP. 

 

Any Suggestions? The issue seems to be with this thing the rocket does at the start at the begin of the gravity turn.

Link to comment
Share on other sites

@Suppressor It has to do with how the mod is handling low-TWR designs.  Specifically, when it thinks it will be behind the target position for more than 20 seconds, it will pitch upwards a bit as allowed by dynamic pressure.  So in your case and in the other guy's case where you won't hit the initial desired AP time for well over a minute, the mod is scrambling to catch up to where it thinks you want to be.  There are a number of different ways to address this in the settings that will all have different effects on the overall outcome.  This behavior has great benefits later on in the launch when your hyper-efficient 0.5TWR upper stage ends up not crashing into the planet, but takes some adjustment for a slightly lethargic lower stage.

The upcoming version (currently available in the dev branch on Github) will "learn" from previous launches and make more/less aggressive settings based on the previous best result.  This is done per ship name, and it excludes the default "Untitled Space Craft" name since that would cause a lot of unwanted guesses.  This has a lot of serious implications in a lot of cases, like occasionally burning your ship up on ascent.  In general it iterates towards horrifyingly fireball-like ascents, because those are the most efficient, and this is the desired behavior that I will keep.  I am working on making it quit while it's ahead and learn when to stop instead of going just one launch too far.  With my 1.25m test rocket, the second guess launch had improved over the first by 60m/s, the next another 40.  If your rocket is not currently engulfed in flame during ascent, then your improvements will probably be more dramatic.  Let me repeat that this is still in development, and while it does seem to work pretty well, you still have to hold its hand a bit or you'll end up catching a bit too much fire.

The below image is not too much fire, this is in fact a very efficient launch for that particular design, and 100m/s better than any guess settings in previous versions:

yvVIiqh.png

Link to comment
Share on other sites

1 hour ago, Overengineer1 said:

@Suppressor It has to do with how the mod is handling low-TWR designs.  Specifically, when it thinks it will be behind the target position for more than 20 seconds, it will pitch upwards a bit as allowed by dynamic pressure.  So in your case and in the other guy's case where you won't hit the initial desired AP time for well over a minute, the mod is scrambling to catch up to where it thinks you want to be.  There are a number of different ways to address this in the settings that will all have different effects on the overall outcome.  This behavior has great benefits later on in the launch when your hyper-efficient 0.5TWR upper stage ends up not crashing into the planet, but takes some adjustment for a slightly lethargic lower stage.

The upcoming version (currently available in the dev branch on Github) will "learn" from previous launches and make more/less aggressive settings based on the previous best result.  This is done per ship name, and it excludes the default "Untitled Space Craft" name since that would cause a lot of unwanted guesses.  This has a lot of serious implications in a lot of cases, like occasionally burning your ship up on ascent.  In general it iterates towards horrifyingly fireball-like ascents, because those are the most efficient, and this is the desired behavior that I will keep.  I am working on making it quit while it's ahead and learn when to stop instead of going just one launch too far.  With my 1.25m test rocket, the second guess launch had improved over the first by 60m/s, the next another 40.  If your rocket is not currently engulfed in flame during ascent, then your improvements will probably be more dramatic.  Let me repeat that this is still in development, and while it does seem to work pretty well, you still have to hold its hand a bit or you'll end up catching a bit too much fire.

The below image is not too much fire, this is in fact a very efficient launch for that particular design, and 100m/s better than any guess settings in previous versions:

 

I did some tests with your dev version and I must admit, you know your tech.. congratz.. after 3 or 4 launches my stock Kerbal X got into a 80km Orbit with 3286m/s of DeltaV left.

it went there slowly and in a ball of fire.. but it's as efficient as it can be. :)

Edit: I did some testing.. and, since I'm trying to improve my rockets and all that I noticed sometimes I change it too much and the addon will get nuts thinking I'm still using the previous version that it has all its data from. (I could rename it, ofc) Is it possible to add a "clear custom data" button or something? (I know I can just delete the data from the addon folder, but that would be quicker. 

Edited by Suppressor
more testing done
Link to comment
Share on other sites

I finally got around to testing your totally awesome mod.  I have been reading the conversation about low TWR ships and thought I would experiment a bit.  So I did two ships one with High TWR and one with very low TWR 1.03 to be exact.  (I meant to and forgot to take pics)  I launched both ships twice, once using your mod and once using Mechjeb.    I set mechjeb as close to the best guess as I could get.  So on the High TWR ship very significant improvement over Mechjeb as I expected.  On the very low TWR the reverse is true which based on the above conversation I also expected.  What I did not expect was that the best guess did not change any of the default numbers on the low TWR ship.  I am sure, especially based on your awesome news above, that improvements can be made.  As a results I have two suggestions that I am not sure you can implement but just as a thought.

First, perhaps define a TWR threshold, that has the best guess changing some of the parameters the best guess currently does not change for higher TWR ships.  (like start time and finish time)   You seem to have a good handle on what setting to change to improve performance on low TWR ships so maybe you already thought of this. 

Second, part me wonders if one could not rerun the bestguess setting each time you stage to a new TWR( better build in a 0 TWR check or you will throw errors)  This may not be possible but I am curious how that would work out.  You would probably want to use the gravitational  acceleration at your current altitude for extra accuracy.  But maybe that is not how the best guess works.

Thank You for making a great addition to KSP.

Link to comment
Share on other sites

Ive tried a few things and every time the craft just sits in the atmosphere burning away. It either rips it apart at launch or starts to spin at like 40k while its burning away. I cant figure out how to make this work. There aren't enough settings to work with. Ill just stick with MechJeb for now...

 

Link to comment
Share on other sites

2 hours ago, vinster7 said:

Ive tried a few things and every time the craft just sits in the atmosphere burning away. It either rips it apart at launch or starts to spin at like 40k while its burning away. I cant figure out how to make this work. There aren't enough settings to work with. Ill just stick with MechJeb for now...

 

Mind showing some of your designs? There's somewhat a lack of detail, apart from, it doesn't work for you. ;) 

Link to comment
Share on other sites

2 hours ago, vinster7 said:

Ive tried a few things and every time the craft just sits in the atmosphere burning away. It either rips it apart at launch or starts to spin at like 40k while its burning away. I cant figure out how to make this work. There aren't enough settings to work with. Ill just stick with MechJeb for now...

 

This is exactly what you do if you just want to complain and don't want help.

Edited by mcirish3
Link to comment
Share on other sites

@Over-Engineered I'm studying your code and I can't seem to find where you allow the time-to-apoapsis to climb above 40s after you've roughly circularized at 40km-ish?

I'm pretty certain we're always in this bit of code controlling the throttle until our apoapsis hits our destination, so our throttle is always governed by APThrottle:

https://github.com/johnfink8/GravityTurn/blob/1.2.3/GravityTurn/GravityTurn/GravityTurner.cs#L510-L511

The if our apoapsis ever climbs above 40s we should be throttling back:

https://github.com/johnfink8/GravityTurn/blob/1.2.3/GravityTurn/GravityTurn/GravityTurner.cs#L437-L443

But what I see is that after a time it starts allowing the time-to-apoapsis to start climbing and the apoapsis rises to the destination height and that clamp seems to not be applied, but I can't find that bit of code anywhere...

EDIT: and of course now that I posted this I see where you clamp the throttle to the sensitivity value on the lower bound...  nevermind...

Edited by Jim DiGriz
Link to comment
Share on other sites

@Overengineer1 Did you see my post about the RO support? I think it should detect if RO is installed (ModuleManager?), and if it is installed, find the most efficient launch using full throttle or available throttle, use RCS after stage sep for ullage (check if the fuel is very stable?) and then try to use as little ignitions to circularize. It might have inclination relative to the ecliptic, even though that would be ~23.5*, it would show a Moon launch trajectory  as 5.2* instead of 28.7*

Link to comment
Share on other sites

@legoclone09 That's way out of line with what the mod works.  "Find the most efficient launch" is a lot easier to type than to actually do without actually launching, since there are so many variables involved.  I'm able to do what I can do with throttlable engines because that throttle takes a huge variable out of the equation, we can have exactly as much acceleration at any given second as we want.  If you take that away... well, then you don't need GravityTurn.  There's nothing for me to do if there's no throttle to control, except all the guess work to set the initial turn angle, which is just WILD speculation already.

TL;DR: No, I don't feel like I can be a lot of help with RO launches.

Link to comment
Share on other sites

2 minutes ago, Overengineer1 said:

@legoclone09 That's way out of line with what the mod works.  "Find the most efficient launch" is a lot easier to type than to actually do without actually launching, since there are so many variables involved.  I'm able to do what I can do with throttlable engines because that throttle takes a huge variable out of the equation, we can have exactly as much acceleration at any given second as we want.  If you take that away... well, then you don't need GravityTurn.  There's nothing for me to do if there's no throttle to control, except all the guess work to set the initial turn angle, which is just WILD speculation already.

TL;DR: No, I don't feel like I can be a lot of help with RO launches.

Ok, thanks for the response. I was just wondering if it would work, you are a great dev.

Edited by legoclone09
Link to comment
Share on other sites

Something I just discovered is that 1.25m launches take more fuel to get to orbit than 2.5m launches.  I was struggling to get a 1.25m design to orbit (high TWR, playing with all kinds of angles) and could barely hit 3,600 delta-V.  I just threw together a 2.5m rocket and tossed it into orbit, not even very well tuned yet, and got 3123 dV (3175 vac dV) to 80x80.

I believe its mostly drag losses increasing for the 1.25m rocket, and drag losses are higher for the same reason that scaled down things have lower terminal velocity.   Also one reason why you can't just scale down a Falcon-9 and create a nano-rocket that will get to orbit.  Then the increased drag losses probably make the gravity drag at bit worse as well since you're fighting the atmosphere that much harder.

I also discovered that putting an octo probe core right behind a 1.25m nose cone is thermally bad.  Not enough heat flow out of the nose cone and too much heat flow for the little octo core to handle, I think.  Putting a SAS module next in the stack after the nose cone helped a lot with heat transfer.  People with explode-ey rockets might look at their design and why its exploding.

Link to comment
Share on other sites

This is terrific!  Thank you @Overengineer1 for an elegant and instructive mod.  I've really learned a lot from this discussion, and watching GT do its thing.  I really have been overbuilding my engines and TWR this whole time, and boy does this show that.

Some notes from my observations with a couple test rockets:

1. I'm having a lot of problems with autostaging.  Radial SRBs always seem to drop when depleted.  Main stack stages will blow the decoupler if it's separate from the next engine but not ignite the engine on the following stage; if both are on the same stage it just does nothing.  Since I haven't seen anyone else complain about this very basic feature, I wonder how to diagnose if this is just me, or a mod conflict, or what?

2. Time warp - there's a long coast from reaching orbital speed at ~45km to reaching space.  Works great if I manually warp to 4x, including the tiny AP bump burns.  Any interest in including an autowarp-while-coasting-in-atmosphere feature?  Could be I'm just accustomed to MJ's autowarp coasting.  (When using MJ to circularize, it handles autowarp in space just fine, so no worries there. In fact the integration is extremely slick!)  EDIT - I see this has been mentioned, I'll just leave this here as another voice.

3. Thermal - I built the exact rocket pictured in the OP (Mk1 cockpit, largest tank, Mammoth engine) and the cockpit promptly overheated and exploded.  Just want to confirm my guess that the scope of this mod will not include durability concerns like this?  If so, it might be smart to replace the example photo with something that will work for people on the first try.   Or is this a difficulty setting / re-entry heating setting problem?

Great mod!  Really enjoying it so far.  Thanks!

Link to comment
Share on other sites

One of the 1.2.2 changes to pitch corrections had an unintended side effect during the initial launch.  I'm still working on version 1.3 which has some great new features, but in the meantime I'm releasing 1.2.4 to fix that pitch correction issue.  You should all find that your lower TWR rockets launch much more smoothly and a bit more efficiently with this.  CKAN should pick up the new version within a few hours of this comment.

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