Jump to content

[1.12.x] GravityTurn continued - Automated Efficient Launches


linuxgurugamer

Recommended Posts

  • 2 weeks later...

Do you have some insight of how the initial guess is made and how improvements are done ?

We did our own GT script using kOS and i'm quite interested to know how it works for this mod, if that's not a secret.

On our side, we ran some ~800 test flights with a dedicated bench rocket and various incremental TWR, reaching the best Angle / Pitch Velocity couple.

This is for our initial guess than run quite well (along some correction factor depending on Solid fuel ratio etc.). From this, we then use some dichotomy approach to find the very best GT within 5-6 flights most of the time, automatically.

i'd love to present this script when I have time :)

Edited by Dakitess
Link to comment
Share on other sites

21 hours ago, Dakitess said:

Do you have some insight of how the initial guess is made and how improvements are done ?

We did our own GT script using kOS and i'm quite interested to know how it works for this mod, if that's not a secret.

On our side, we ran some ~800 test flights with a dedicated bench rocket and various incremental TWR, reaching the best Angle / Pitch Velocity couple.

This is for our initial guess than run quite well (along some correction factor depending on Solid fuel ratio etc.). From this, we then use some dichotomy approach to find the very best GT within 5-6 flights most of the time, automatically.

i'd love to present this script when I have time :)

 

I can not say i've reviewed the code, I did find an old post by the second maintainer @AndyMt the the second thread for the GravityTurn mod

 

On 10/25/2016 at 2:24 PM, AndyMt said:

That's exactly the piece of code I had in mind, too. So I'll change it to the suggested alternative way of detecting a loaded assembly. I still cannot reproduce the problem on my machine. But I guess it depends on the order of how the mods were loaded. If GT finds MJ before it has to iterate CC then it won't fail.

@nightingale: which also means - not only mods which use the toolbar mod are effected: it is all mods which have to detect a specific loaded assembly.

Yes, I noticed that, too. The reason was that the calculation of TWR was broken because of 1.2, then always 100/10 is used as default. So - I fixed that for the next release and now there is always an initial guess if TWR is > 1.2.

@Jovus: You can find the calcuation of angle and speed in GravityTurner.CalculateSettings():




if (TWR > 1.2)
{
  TWR -= 1.2;
  TurnAngle = Mathf.Clamp((float)(10 + TWR * 5), 10, 80);
  StartSpeed = Mathf.Clamp((float)(100 - TWR * 30), 10, 100);
}

 

 

Link to comment
Share on other sites

Gravity Turn's ability to guess appears to be completely borked in my 1.12 game. As you can see below, it's giving me utter madness for the start m/s. If you try to launch with those numbers, it will be flying completely horizontally before even getting above the clouds. If needed, I can provide my modlist, but that shouldn't be needed here considering this rocket is using nothing but vanilla parts.

KHAgzIA.png

Link to comment
Share on other sites

3 minutes ago, killbotvii said:

Gravity Turn's ability to guess appears to be completely borked in my 1.12 game. As you can see below, it's giving me utter madness for the start m/s. If you try to launch with those numbers, it will be flying completely horizontally before even getting above the clouds. If needed, I can provide my modlist, but that shouldn't be needed here considering this rocket is using nothing but vanilla parts.

KHAgzIA.png

Try with a different rocket

Link to comment
Share on other sites

  • 2 weeks later...

New release, 1.8.1.9

  • Added AssemblyFileVersion
  • Updated version file for 1.12
  • Added option to use keybind or not
  • Removed keybind.cfg
  • Now always rewrites the keybind.cfg file to make sure both settings are there
  • Added button to clear the cache directory on the Settings page
Link to comment
Share on other sites

  • 2 weeks later...

Does anyone know how to remove existing guesses for a rocket? Sometimes I launch and then change the rocket somewhere and the existing guesses completely don’t apply anymore. If an easy way does not exist (such as having to go to the config files somewhere and deleting), is there any consideration to make a button to ‘retry first guess’?

Link to comment
Share on other sites

22 minutes ago, Angel33Demon said:

Does anyone know how to remove existing guesses for a rocket? Sometimes I launch and then change the rocket somewhere and the existing guesses completely don’t apply anymore. If an easy way does not exist (such as having to go to the config files somewhere and deleting), is there any consideration to make a button to ‘retry first guess’?

Click the Setup button, in there is a ClearCache.  Although that might clear the cache for all rockets, not sure about that right now.  Also, click the First Guess, not sure, but that  (I think) resets it for the current rocket

Edit:  I see that First Guess is replaced by Improve Guess.  I'll take a look at it tomorrow

Edited by linuxgurugamer
Link to comment
Share on other sites

46 minutes ago, Angel33Demon said:

Does anyone know how to remove existing guesses for a rocket? Sometimes I launch and then change the rocket somewhere and the existing guesses completely don’t apply anymore. If an easy way does not exist (such as having to go to the config files somewhere and deleting), is there any consideration to make a button to ‘retry first guess’?

I think it's [Alt]-Improve Guess. Saving the vehicle with a different name- incrementing a version number for example- will also make GT start from scratch.

Link to comment
Share on other sites

1 hour ago, Paaaad said:

I think it's [Alt]-Improve Guess. Saving the vehicle with a different name- incrementing a version number for example- will also make GT start from scratch.

No, that doesn't do anything.

I'm adding a Reset Guess button to the Setup window for the next release

Link to comment
Share on other sites

39 minutes ago, linuxgurugamer said:

No, that doesn't do anything.

I'm adding a Reset Guess button to the Setup window for the next release

Oh good. The lack of something like that has minorly bugged me for a long time. I've just stumbled along without it by manually putting in my own guess, which is usually good enough for my purposes. I didn't feel it was worth bugging you for, as you have so much else on your plate. But I will like it. :-)

Link to comment
Share on other sites

46 minutes ago, linuxgurugamer said:

I'm adding a Reset Guess button to the Setup window for the next release

could you please add a "clear all files included those relative to the current vessel" button too?
or maybe just organize these files in separate sub-directory named as the vessel name?

 

Edited by antipro
Link to comment
Share on other sites

38 minutes ago, antipro said:

could you please add a "clear all files included those relative to the current vessel" button too?
or maybe just organize these files in separate sub-directory named as the vessel name?

 

Ummm, there is only two  files for each vessel.  One holds the window settings, and the other contains the db for the vessel.

I'll make the Reset Guess delete those two files as well

 

 

Link to comment
Share on other sites

12 hours ago, linuxgurugamer said:

there is only two  files for each vessel. 

the first is created when I open the GT window: "gt_window_SOME_NUMBERS.cfg",
the second is created when I press "L": "gt_vessel_APHANUMERIC_STRING_Kerbin.cfg",
the third is created when the Destination Height is reached: "gt_launchdb_VESSEL_NAME_Kerbin.cfg",
when reaching atmosphere limit, the ascent graph is created: "gt_vessel_VESSEL_NAME_Kerbin.png".

Then I Revert to Launch and press "Clear Cache" which deletes all files except:
"gt_window_SOME_NUMBERS.cfg" and
"gt_launchdb_VESSEL_NAME_Kerbin.cfg"

so yes, there are just two files, thanks beforehand if you will delete these too.
I just would like to have a button that let GT "starts from scratch", like MJ has.

Edited by antipro
Link to comment
Share on other sites

@linuxgurugamer

Just ignore this as I have to check if I am doing anything differently.

Edit: this time worked as expected. No idea what happened.

Spoiler

With the last version, the mod window closes itself as soon as the ship leaves the atmosphere, creating but not executing the circularization burn.

https://drive.google.com/file/d/1bmbwwH8SZ965DP_ouvn3dt7WqdKEJHqc/view?usp=sharing

Edited by Tacombel
Link to comment
Share on other sites

6 minutes ago, Tacombel said:

@linuxgurugamer

With the last version, the mod window closes itself as soon as the ship leaves the atmosphere, creating but not executing the circularization burn.

https://drive.google.com/file/d/1bmbwwH8SZ965DP_ouvn3dt7WqdKEJHqc/view?usp=sharing

I hadn't yet noticed that, but it makes a lot of sense to me. Nothing more for the mod to do. Saves me having to close the window manually. Are you saying this is a problem? Hmm. I suppose perhaps if you are planning to tell it to abort and try for a better set of values. Guess I seldom do that, and almost never after leaving the atmosphere.

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