Jump to content

[1.12.x] GravityTurn continued - Automated Efficient Launches


linuxgurugamer

Recommended Posts

2 hours ago, Gfurst said:

Okay, this mod tends to result in rather shallow gravity turns which tend to work well for certain types of boosters, however it fails miserably for another certain type of craft: 1. the ones with pretty low TWR 2. ones with bad drag profile which you want to keep as little as possible in atmosphere.

Basically its not good for when you want to specifically steep curves (lowering drag, using higher ISP engines). It doesn't help that there is barely any explanation on how to fine the values if desired (besides the ? help which is pretty vague). Also doesn't like it detects asparagus type staging (which is also more target for heavier launches).

Finally, does anyone know where does it save the craft settings to?

GT creates discreet settings files per craft -- in the mod/plugindata folder.

Are you re-running the simulations over and over to see if GT eventually finds better trajectories and launch profiles?

Link to comment
Share on other sites

1 hour ago, Beetlecat said:

GT creates discreet settings files per craft -- in the mod/plugindata folder.

Are you re-running the simulations over and over to see if GT eventually finds better trajectories and launch profiles?

Oh I see, its a bit hidden folder, and also includes a snapshot of the ascent curve. But yeah, I'm re-running the simulation but trying to tweak the rocket as well as I go along, but with so many simulations I might as well reduce its KRASH price or otherwise go broke. But here is the thing though, does the director learn still learn from really badly gone situations where you never got to orbit or had to abort?

Link to comment
Share on other sites

22 minutes ago, Gfurst said:

Oh I see, its a bit hidden folder, and also includes a snapshot of the ascent curve. But yeah, I'm re-running the simulation but trying to tweak the rocket as well as I go along, but with so many simulations I might as well reduce its KRASH price or otherwise go broke. But here is the thing though, does the director learn still learn from really badly gone situations where you never got to orbit or had to abort?

If you tweak the rockets or change the name at all, you're basically starting from scratch each time, as far as the GT simulation and refining goes. Also, if money is a real issue, you can fire up a sandbox game and launch to your heart's content over there with the same vessel (just migrate the craft file, or use CraftManager to move it in-game.

Failures are definitely accounted for, though I'm not certain about aborts. Full on crashes are definitely part of the program.

Link to comment
Share on other sites

6 minutes ago, Beetlecat said:

If you tweak the rockets or change the name at all, you're basically starting from scratch each time, as far as the GT simulation and refining goes. Also, if money is a real issue, you can fire up a sandbox game and launch to your heart's content over there with the same vessel (just migrate the craft file, or use CraftManager to move it in-game.

Failures are definitely accounted for, though I'm not certain about aborts. Full on crashes are definitely part of the program.

Alright, I'll give some more tries, still I would like to know how to fine tune, like what the values mean, I understand "start m/s", but what to the "curve angle", "hold prograde start/end" each means?

The problem I see is that the logic expects the rocket to have enough trust, to be able to push through the curvature, if you have a reasonably low TWR rocket, than it just falls short.

Link to comment
Share on other sites

4 hours ago, Gfurst said:

Okay, this mod tends to result in rather shallow gravity turns which tend to work well for certain types of boosters, however it fails miserably for another certain type of craft: 1. the ones with pretty low TWR 2. ones with bad drag profile which you want to keep as little as possible in atmosphere.

Basically its not good for when you want to specifically steep curves (lowering drag, using higher ISP engines). It doesn't help that there is barely any explanation on how to fine the values if desired (besides the ? help which is pretty vague). Also doesn't like it detects asparagus type staging (which is also more target for heavier launches).

I typically don't use the self-learn part of Gravity Turn.  I change the numbers myself until I get something I like.  If you want a steeper trajectory try some combination of the following:

  • Increase Start m/s
  • Decrease Turn Angle
  • Increase Hold AP Start Time

Of course a steeper trajectory is less efficient.  You want to keep it as shallow as you can and still make it to orbit.

Link to comment
Share on other sites

6 minutes ago, OhioBob said:

I typically don't use the self-learn part of Gravity Turn.  I change the numbers myself until I get something I like.  If you want a steeper trajectory try some combination of the following:

  • Increase Start m/s
  • Decrease Turn Angle
  • Increase Hold AP Start Time

Of course a steeper trajectory is less efficient.  You want to keep it as shallow as you can and still make it to orbit.

Thanks, is the turn angle the initial tumble angle? What I just don't get is the "Hold AP start time" supposed to mean.

Link to comment
Share on other sites

24 minutes ago, Gfurst said:

Thanks, is the turn angle the initial tumble angle? What I just don't get is the "Hold AP start time" supposed to mean.

"Start m/s" is the speed of the rocket when it begins its turn.  "Turn Angle" it the initial pitch angle that the rocket rotates to when it starts its turn.  "Hold AP Start Time" is the time to apoapsis that the rocket maintains during the beginning of its ascent.  For instance, if "Hold AP Start Time" and "Hold AP End Time" are both 50 seconds, then the rocket will try to maintain a time to apoapsis of 50 seconds throughout the ascent.  (Initially it will be less but once it hits 50 seconds, it will hold it.)  If the start and end times are different, it will transition from the start time to the end time (I believe it is a linear transition, likely based on altitude).  For instance, if Hold AP Start Time = 80 and Hold AP End Time = 50, the rocket will initially hold a time to apoapsis near 80 seconds and will gradually flatten out the trajectory and let the time to apoapsis decrease to 50 seconds near the end of the burn.  (As we approach engine cutoff, the time to apoapsis will grow rapidly, but this is normal.)
 

Edited by OhioBob
Link to comment
Share on other sites

6 minutes ago, OhioBob said:

"Start m/s" is the speed of your rocket when it begins its turn.  "Turn Angle" it the initial pitch angle that the rocket rotates to when it starts its turn.  "Hold AP Start Time" is the time to apoapsis that the rocket maintains during the beginning of its ascent.  For instance, if "Hold AP Start Time" and "Hold AP End Time" are both 50 seconds, then the rocket will try to maintain a time to apoapsis of 50 seconds throughout the ascent.  (Initially it will be less but once to hits 50 seconds, it will hold it.)  If the start and end times are different, it will transition from the start time to the end time (I believe it is a linear transition, likely based on altitude).  For instance, if Hold AP Start Time = 80 and Hold AP End Time = 50, the rocket will initially hold a time to apoapsis near 80 seconds and will gradually flatten out the trajectory and let the time to apoapsis decrease to 50 seconds near the end of the burn.  (As we approach engine cutoff, the time to apoapsis will grow rapidly, but this is normal.)

Ohhh, thanks, this makes a whole lot more sense, its actual "time to apoapsis", I thought it had something to do with how much it held the angle before going prograde. And considering that usually if you had a efficient enough ascent, time to AP is pretty big, wouldn't it make sense the have start value smaller than end value, by quite a lot? Maybe that could be the key on making a rocket avoid as much atmosphere drag as possible.

Link to comment
Share on other sites

5 minutes ago, Gfurst said:

wouldn't it make sense the have start value smaller than end value, by quite a lot? Maybe that could be the key on making a rocket avoid as much atmosphere drag as possible.

When I've needed to loft the rocket into a steeper trajectory, I've always made the time to AP greater at the start.  A longer time to AP results in a more nose up attitude, while a shorter time to AP results a more nose down attitude.  So if you want to avoid atmospheric drag, start more nose up and get up out of the air as quickly as possible.  Then push the nose down and transition into more horizontal flight.  The more horizontal you can go, the more efficient the launch.

Link to comment
Share on other sites

screenshot-2020-08-12-23-37-40.jpg

So hello there,  first I want to show my appreciation for the help you guys gave me, after actually understanding it better I'm able to make much greater use of the mod. Its more or less how I used to do gravity turns manually as well, but I've never thought of using the time for apoapsis as a parameter of where I was in the gravity turn.

On 8/11/2020 at 5:42 PM, OhioBob said:

When I've needed to loft the rocket into a steeper trajectory, I've always made the time to AP greater at the start.  A longer time to AP results in a more nose up attitude, while a shorter time to AP results a more nose down attitude.  So if you want to avoid atmospheric drag, start more nose up and get up out of the air as quickly as possible.  Then push the nose down and transition into more horizontal flight.  The more horizontal you can go, the more efficient the launch.

Anyway, allow me to disagree with you on this regard, the best results I've found for heavier rockets, is setting a shorter "AP time start", but a more subtle initial curve as well. And I believe this is the answer to why Mechjeb does a more efficient curve, because it use black magic to calculate the terminal velocity of craft, and edge velocity just below this threshold. So throttling down is good for this, however it need a gentler initial curve, otherwise you risk going too shallow and burning up. The final AP time, on the other hand serves pretty well for getting a truly final circular trajectory, but can be quite useful if you get shorter time too shallow still in the atmosphere, while a having a longer time you can get a sub-orbital trajectory much quicker, of course this is up to each situation and rocket style, but more ballistic trajectories can be better for example if you're doing a direct transfer burn, or rendezvous with another craft in orbit, so you want a bit time to plan the maneuver.

Anyway², despite all of that, I've something weird going on in the picture above, I set initial AP time to 30 and lock it, but the mod will unlock itself and adjust to that value as shown. I'm wondering why it does that, the rocket has a couple SRBoosters to give it a initial kick, but otherwise I don't understand why it adjust in this situation but not in others. I don't even click the improve guess button.

Link to comment
Share on other sites

33 minutes ago, Gfurst said:

 

Spoiler

 

screenshot-2020-08-12-23-37-40.jpg


 

So hello there,  first I want to show my appreciation for the help you guys gave me, after actually understanding it better I'm able to make much greater use of the mod. Its more or less how I used to do gravity turns manually as well, but I've never thought of using the time for apoapsis as a parameter of where I was in the gravity turn.

Anyway, allow me to disagree with you on this regard, the best results I've found for heavier rockets, is setting a shorter "AP time start", but a more subtle initial curve as well. And I believe this is the answer to why Mechjeb does a more efficient curve, because it use black magic to calculate the terminal velocity of craft, and edge velocity just below this threshold. So throttling down is good for this, however it need a gentler initial curve, otherwise you risk going too shallow and burning up. The final AP time, on the other hand serves pretty well for getting a truly final circular trajectory, but can be quite useful if you get shorter time too shallow still in the atmosphere, while a having a longer time you can get a sub-orbital trajectory much quicker, of course this is up to each situation and rocket style, but more ballistic trajectories can be better for example if you're doing a direct transfer burn, or rendezvous with another craft in orbit, so you want a bit time to plan the maneuver.

Anyway², despite all of that, I've something weird going on in the picture above, I set initial AP time to 30 and lock it, but the mod will unlock itself and adjust to that value as shown. I'm wondering why it does that, the rocket has a couple SRBoosters to give it a initial kick, but otherwise I don't understand why it adjust in this situation but not in others. I don't even click the improve guess button.

Hmm. If it was over the time you set I'd blame the SRBs for pushing you past it, but this is under. Try setting the variables you want locked and then hitting the save button in the bottom left? That will make the values you entered the default when you go to launch a new craft... Might help. :/

Link to comment
Share on other sites

3 hours ago, Gfurst said:

Anyway, allow me to disagree with you on this regard, the best results I've found for heavier rockets, is setting a shorter "AP time start", but a more subtle initial curve as well. And I believe this is the answer to why Mechjeb does a more efficient curve, because it use black magic to calculate the terminal velocity of craft, and edge velocity just below this threshold. So throttling down is good for this, however it need a gentler initial curve, otherwise you risk going too shallow and burning up. The final AP time, on the other hand serves pretty well for getting a truly final circular trajectory, but can be quite useful if you get shorter time too shallow still in the atmosphere, while a having a longer time you can get a sub-orbital trajectory much quicker, of course this is up to each situation and rocket style, but more ballistic trajectories can be better for example if you're doing a direct transfer burn, or rendezvous with another craft in orbit, so you want a bit time to plan the maneuver.

Maybe I misunderstood the question, but I thought the goal was to fly a steeper trajectory, i.e. reach a higher altitude more quickly.

The following are three sample trajectories flying the same rocket will all the same settings except HoldAPTime Start.  The following settings are unchanged from one launch to the next:

Start m/s = 80
Turn Angle = 10
HoldAPTimeFinish = 60
Sensitivity = 0.30
Destination Height (km) = 100
Roll = 0
Inclination = 0
Pressure Cutoff = 1200

HoldAPTimeStart for the three launches were 40, 60 and 80 seconds for the top, middle and bottom trajectories respectively.  Clearly we have a steeper trajectory with higher values of HoldAPTimeStart.

Spoiler

oJHmmXX.jpg

NGKWAtR.jpg

QQmsqri.jpg

 

Edited by OhioBob
Link to comment
Share on other sites

screenshot-2020-08-15-21-07-00.jpg

There is one weird thing happening to me, testing a payload of 15 tonne, I had nearly found the perfect settings for it with very optimal fuel usage, however near the end it starts tumbling quite a lot upwards, and the funny thing is that doesn't it when it actually needs when flying too low. And I checked, there was pretty good control authority and the flight director intentionally keeping it angled when at that point it could easily push the apoapsis into desired orbit (though after double checking it is indeed a bit low).

Also as a side note, the game just crashed nearly taking my computer with it just after this shot, actually after I tried saving the config for gravityturn, due out of memory kernel panic. Could be something to do with the mod after the test quite a few times, could also have to do with KRASH simulation, just throwing it out there.

3 hours ago, OhioBob said:

Maybe I misunderstood the question, but I thought the goal was to fly a steeper trajectory, i.e. reach a higher altitude more quickly.

The following are three sample trajectories flying the same rocket will all the same settings except HoldAPTime Start.  The following settings are unchanged from one launch to the next:

It is indeed, but you can also do that by start a gentler curve (less angle at higher speed), so it will give you room to still make a suitable curve without loosing to much fuel to drag. If you follow your launches you can how much off the mark the time to apoasis is, having it higher usually just means full throttle all the way. For example, very rarely you will even have a higher than time for AP than 20s below 15km altitude, unless on a very high thrust ballistic missile. But of course this should always vary from rocket to rocket.

For reference but just look how shallow ascents the mod was giving me earlier

gt-vessel-Needle-Mk1-Kerbin.png

And that's just one older one that manage to get up there without problems, most of my rockets have blank pictures

Link to comment
Share on other sites

1 hour ago, Gfurst said:

It is indeed, but you can also do that by start a gentler curve (less angle at higher speed), so it will give you room to still make a suitable curve without loosing to much fuel to drag. If you follow your launches you can how much off the mark the time to apoasis is, having it higher usually just means full throttle all the way. For example, very rarely you will even have a higher than time for AP than 20s below 15km altitude, unless on a very high thrust ballistic missile. But of course this should always vary from rocket to rocket.

There are certainly multiple ways to achieve the desired result.  That's why I listed options, recommending that you try "some combination" of the three.  What solution you choose is up to you.

On 8/11/2020 at 3:40 PM, OhioBob said:

I typically don't use the self-learn part of Gravity Turn.  I change the numbers myself until I get something I like.  If you want a steeper trajectory try some combination of the following:

  • Increase Start m/s
  • Decrease Turn Angle
  • Increase Hold AP Start Time

Of course a steeper trajectory is less efficient.  You want to keep it as shallow as you can and still make it to orbit.

 

Link to comment
Share on other sites

screenshot-2020-08-16-21-07-18.jpg screenshot-2020-08-16-21-16-07.jpg

Alright, to better illustrate on what meant above,  new attempt at this rocket, but still forgot to take a picture at the VAB (or is just that F1 doesn't work there?). In the first picture here you can see the apoapsis is near the 30s but not quite there, yet still full throttle, but when it will reach it will start throttling back, however the time to APO target is also varying as it goes through. My thinking is that the optimal delta-v usage is achieve by having the least throttle that still gets you to orbit (literally doesn't fall short), the default suggested values work very well for this (constant 50s time for APO), the one I picked above was a bit too short for me, but one like 30s initial ~120s terminal should work as well with the caveat of being a more sub-orbital trajectory, on the other hand a inverted value alike @OhioBob suggest is interesting to ensure thrust initially but fine curvature at the end of the ascent.

The mess with my rocket above was because I was experimenting with two different versions of it, both a sort of asparagus staging, but one with crossfeed enabled, the other with direct fuel lines, the difference being that, the crossfeed one the lateral engines would still keep burning with their tanks empty, but as soon as noticed the throttling back (due to lower time for APO) I could drop the stage dead weight with it (as now I didn't need the extra thrust), the difference was just a few seconds apart, so I figured it wouldn't have that much, but indeed that little bit extra thrust time could make a difference between making it to orbit or not. Eitherway I digress, my point is just that throttling back could prove beneficial in the case of excessive drag, I think the mod does take drag into consideration but still makes a bit a bad guess on how steep it needs to go.

Anyway, completely unrelated to discussion above, but I had another crash, seems to me related to the mod and memory leak. After aborting the flight above (just shortly after taking that second picture), and trying to save the results, the games gets very unresponsive, and my RAM nearly blowing the limit, causing my whole PC to halt to crawl. Here is the log though I haven't found anything obvious https://gist.github.com/Gfurst/247d0b729202d126729bccf7e8d5c115

Link to comment
Share on other sites

  • 4 weeks later...

Really liking this mod so far ! I love the fact that the general behavior is to follow Prograde, this is what is lacking in other AutoPilot that gives absolute angles / curve to follow. i'll allow myself to give some Feedback :

Damn, the default setting are sooooooo wrong. I have to set my pitch to 10 and 10 m/s to have a proper Gravity Turn with a TWR ~ 1.5, which is kinda classic, and the rocket by itself is really conventional.

That might lead some new user to ditch the mod quickly if the default settings are way too wrong, too conservative. Maybe something like 10°, 20 m/s, which should be "safe" enough while still providing a Gravity-ish turn.

Roll at 0° should not roll the rocket at liftoff, better use the launch referential than an absolute one, it's kinda confusing to have to set 270° or -90° for instance just to avoid an unwanted Roll.

What is the trigger for the fairing jettison ? 1000 Pa of dynamic pressure ? It looks like it always separate too soon : a Gravity Turn will lead you to cross the upper atmosphere for a looooong time, specifically when you allow the ThrottleDown. Actually, thanks to the wonderful Stats panel, we have the Instant Air Drag Losses, and it helps a lot to "feel" when it's best to jettison the fairing. Which is later. Ditching the fairing will give instant extra DeltaV thank to less DryMass, but if you keep flying in the upper atmosphere for minutes, the extra Air Drag definitely will catch up and overcome this gain. Ditch later when you Gravity Turn :)

In addition, do you have some clue of how the "improve guess" work ? Does it take all the moment when it had to correct the attitude / thrust to adjust the initial pitch ?

Can you add an option "Force Follow Prograde" ?

Thanks a lot for this mod !

Edited by Dakitess
Link to comment
Share on other sites

@Gfurst I think the reason you’re having those issues is because you’re using the time to APO start and end times incorrectly- if the end time is greater than the start time then your rocket will continuously fight to push its apoapsis further away which results in an inefficient nose high attitude later in the climb and wastes fuel. Your start time should be higher than your end time which will result in a steeper climb at low altitude but a more horizontal attitude later on and a smaller circularisation burn at the end.

Edited by jimmymcgoochie
Link to comment
Share on other sites

  • 2 weeks later...

Hey I noticed that at some point in the last couple months that the window position of the Gravity Turn mod no longer saves or remembers its position. I remember I used to be able to move it and the next flight it would be at the location I last had it, even if I quit and relaunch the game. Right now it always pops up in the top right corner and does not remember where the window was moved. 

Any ideas is something changed in code or could it be something on my end? It's not a huge thing, but a little annoying as that location covers up other windows.

Link to comment
Share on other sites

5 minutes ago, Atlas Gaming said:

Hey I noticed that at some point in the last couple months that the window position of the Gravity Turn mod no longer saves or remembers its position. I remember I used to be able to move it and the next flight it would be at the location I last had it, even if I quit and relaunch the game. Right now it always pops up in the top right corner and does not remember where the window was moved. 

Any ideas is something changed in code or could it be something on my end? It's not a huge thing, but a little annoying as that location covers up other windows.

There was a recent release: 

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

@linuxgurugamer, I don't know if this has been mentioned before, but I've got a bug to report.  Gravity Turn's automatic staging doesn't work when an engine plate decoupler is used.  Regular decouplers work fine, but whenever decoupling is to be done using the decoupler built into the engine plates, nothing happens.  I always have to decouple manually using the space bar.  Once decoupling is complete, the engines will ignite automatically, so that part works.  It's not that big of a deal to manually decouple, but it would be nice if it worked automatically as it should.  I've experienced this problem ever since engine plates were introduced into the game.

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