Jump to content

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


AndyMt

Recommended Posts

7 minutes ago, MerlinsMaster said:

Hell, I just don't want the fairing to hit something and explode, lol.

Then you are definitely better off going with the higher deployment altitude.. less air rushing past means the fairing sections will get further away from the craft before being pushed backwards. It pays to check the fairing deployment force setting in the VAB before launch, as well.

Link to comment
Share on other sites

12 hours ago, JAFO said:

Then you are definitely better off going with the higher deployment altitude.. less air rushing past means the fairing sections will get further away from the craft before being pushed backwards. It pays to check the fairing deployment force setting in the VAB before launch, as well.

Yup.  Mine is always set to 500, and clamshell deploy.  It's a nice, realistic-looking deployment with those settings.

Looks silly with Use Time Warp selected on the GT panel, though. :)

Link to comment
Share on other sites

  • 2 months later...

I have posted a feature request on the GitHub repository to improve the use of this tool in launching toward rendezvous.

If a target is selected, I would like GravityTurn to delay launch until the orbit is correctly aligned, then launch into the correct inclination.  I think MechJeb does this, but I honestly don't know.  It would be very nice.

Alternatively, if there's *another* mod/app/tool/what-have-you that when given launch location and target parameters will generate launch times and inclinations, I can do it by hand. :-)

Link to comment
Share on other sites

1 hour ago, mathuin said:

I have posted a feature request on the GitHub repository to improve the use of this tool in launching toward rendezvous.

If a target is selected, I would like GravityTurn to delay launch until the orbit is correctly aligned, then launch into the correct inclination.  I think MechJeb does this, but I honestly don't know.  It would be very nice.

Alternatively, if there's *another* mod/app/tool/what-have-you that when given launch location and target parameters will generate launch times and inclinations, I can do it by hand. :-)

MechJeb for sure does this -- and maybe it's not quite in the scope for Gravityturn, since this is devoted mostly to finding the most efficient launch parameters, not so much with duration/rendezvous in mind. That being said, I'd *love* for it to be a feature of GT. :wink:

Link to comment
Share on other sites

4 hours ago, Beetlecat said:

MechJeb for sure does this -- and maybe it's not quite in the scope for Gravityturn, since this is devoted mostly to finding the most efficient launch parameters, not so much with duration/rendezvous in mind. That being said, I'd *love* for it to be a feature of GT. :wink:

I will confess that on my "when I'm not so busy with work" todo list, you'll find, somewhere after "learn KSP modding," an entry for "something to trigger Gravity Turn a given amount of time before in phase/plane with craft's target."  Making something seperate that hooks into GT makes sense to me, since you're right, it really isn't in scope for GT.  Then again, when creeping featuritis sets in, I start thinking of winding up rewriting all of GT as part of a larger project I'm considering.  I have way more plans than time.

Link to comment
Share on other sites

22 hours ago, mathuin said:

I have posted a feature request on the GitHub repository to improve the use of this tool in launching toward rendezvous.

If a target is selected, I would like GravityTurn to delay launch until the orbit is correctly aligned, then launch into the correct inclination.  I think MechJeb does this, but I honestly don't know.  It would be very nice.

Alternatively, if there's *another* mod/app/tool/what-have-you that when given launch location and target parameters will generate launch times and inclinations, I can do it by hand. :-)

The sole purpose of GT is to do exactly that: a gravity turn. While I'm often tempted to add more functionality - I leave that to other mods (which was also the original authors intention I think). Creating the orbit maneuver node at the end is kind of on the border, so of course you could argue that triggering the launch is kind of similar to that.
Anyway - right now I just don't have the time to do any programming on GT. Some real life situations claim all my attention :(.

Link to comment
Share on other sites

On 10/23/2017 at 9:22 AM, AndyMt said:

It should just work fine with 1.2.2, but I haven't tested it recently.

It does, I wasn't expecting that! Great work! 

When using RO/RSS, what values should one use? My rockets always end up flying horizontal when reaching only about 3300m... 

Link to comment
Share on other sites

7 hours ago, Calvin_Maclure said:

It does, I wasn't expecting that! Great work! 

When using RO/RSS, what values should one use? My rockets always end up flying horizontal when reaching only about 3300m... 

I've used it once in a "half size" modded install and I remember already there the turning speed was higher and the angle much lower (with a TWR of about 1.5 at launch). But even with default values something else must make your rockets fly that way? Maybe some other mod? Or "control from here" set to something else?

My guess is to have the turn speed at around 100 and the angle at around 5 or 6, time to apoapsis at 50 or 60 seconds and sensitivity not lower than 60 or 70.  But maybe someone else used it with RSS already and can give some hints?

Link to comment
Share on other sites

I'm running into a problem after redesigning one of my craft when I realized it didn't have enough dV for my needs. GT just doesn't seem to work at all unless the engines have some sort of gimballing. If the vehicle's engines don't have any gimbal range, attempting to use GT causes the thing to just fly straight up until it runs out of fuel. Is there any way around this as I use Real Fuels and many, if not most, engines do no gimbal with those configs. Also, I'd like to know if there is a way to clear a ships previous guesses without having to completely rename it because I have little desire to repeatedly rename my ships after every failed attempt that needs a redesign.

 

Thanks.

 

EDIT: I would also like to know if there is a way to prevent engine cutoff as again, Real Fuels configs only allow many engines to have a single ignition. Thanks.

Edited by SpacedInvader
Link to comment
Share on other sites

1 hour ago, SpacedInvader said:

I'd like to know if there is a way to clear a ships previous guesses without having to completely rename it because I have little desire to repeatedly rename my ships after every failed attempt that needs a redesign.

This is something I'd like to see as a feature.. 

At the moment, the only way to do this is to go to GameData\GravityTurn\Plugins\PluginData\GravityTurn\ and delete the gt_launchdb_SHIPNAME_Kerbin.cfg file with the name of the ship in question. I hope that helps.

Edited by JAFO
Link to comment
Share on other sites

5 minutes ago, JAFO said:

This is something I'd like to see as a feature.. 

At the moment, the only way to do this is to go to GameData\GravityTurn\Plugins\PluginData\GravityTurn\ and delete the gt_launchdb_SHIPNAME_Kerbin.cfg file with the name of the ship in question. I hope that helps.

Does this require a complete reloading of the game? I'd probably rather rename or just use MJ if I had to do a 5-10 min reload of the game to reset the guesses.

Also, I should clarify on my other question that the rocket in question had plenty of control authority with movable fins, but it just wouldn't turn at all with GT unless the engines were switched to include some gimballing range.

Link to comment
Share on other sites

1 minute ago, SpacedInvader said:

Does this require a complete reloading of the game? I'd probably rather rename or just use MJ if I had to do a 5-10 min reload of the game to reset the guesses.

I haven't tested, but I'd imagine it should not need a reload. You can always try it and see what happens.

Link to comment
Share on other sites

7 hours ago, SpacedInvader said:

I'm running into a problem after redesigning one of my craft when I realized it didn't have enough dV for my needs. GT just doesn't seem to work at all unless the engines have some sort of gimballing. If the vehicle's engines don't have any gimbal range, attempting to use GT causes the thing to just fly straight up until it runs out of fuel. Is there any way around this as I use Real Fuels and many, if not most, engines do no gimbal with those configs. Also, I'd like to know if there is a way to clear a ships previous guesses without having to completely rename it because I have little desire to repeatedly rename my ships after every failed attempt that needs a redesign.

 

Thanks.

 

EDIT: I would also like to know if there is a way to prevent engine cutoff as again, Real Fuels configs only allow many engines to have a single ignition. Thanks.

Sorry I wasn't clear in my previous answer: my statement is true with RSS, using stock(like) parts, but probably not with RO. With Real Fuels there come a lot of additional requirements, then there are engines which cannot throttle down, or if you try too much they cut off and cannot restart. That's why the original author probably didn't support it. And I can also see why, the effort would be quite high.

There may be workarounds for some of the problems, like engine cut-off. What if you set the sensitivity to 1.0, so it won't throttle down? Then fiddle with the "Max Thrust" parameter on the engines directly? That's something I do sometimes, like if the 2nd stage engine doesn't have enough TWR initially. Then I let the first stage thrust over the configured time to apoapsis, so I have some reserves.

I can look into the issue why the fins didn't work, that should not happen. But I remember having used SRBs with control fins and that worked. Maybe a RO specific issue?

You can reset the config values in 2 ways: delete the file as suggested by @JAFO (no game reload required) or (something I've implemented for debugging purposes) - keep the alt-key pressed while pressing "previous best guess". This resets every parameter which is not locked to defaults. This also causes the stats window to show more stuff (for debugging), so don't be surprised.

Link to comment
Share on other sites

3 hours ago, AndyMt said:

Sorry I wasn't clear in my previous answer: my statement is true with RSS, using stock(like) parts, but probably not with RO. With Real Fuels there come a lot of additional requirements, then there are engines which cannot throttle down, or if you try too much they cut off and cannot restart. That's why the original author probably didn't support it. And I can also see why, the effort would be quite high.

There may be workarounds for some of the problems, like engine cut-off. What if you set the sensitivity to 1.0, so it won't throttle down? Then fiddle with the "Max Thrust" parameter on the engines directly? That's something I do sometimes, like if the 2nd stage engine doesn't have enough TWR initially. Then I let the first stage thrust over the configured time to apoapsis, so I have some reserves.

I can look into the issue why the fins didn't work, that should not happen. But I remember having used SRBs with control fins and that worked. Maybe a RO specific issue?

You can reset the config values in 2 ways: delete the file as suggested by @JAFO (no game reload required) or (something I've implemented for debugging purposes) - keep the alt-key pressed while pressing "previous best guess". This resets every parameter which is not locked to defaults. This also causes the stats window to show more stuff (for debugging), so don't be surprised.

I'm not actually using RO, just RF configured for the stock system, so there is a little less to worry about as far as compatibility. That said, I understand the limited engine throttling and ignitions tends to throw a massive wrench in the way most KSP ascents are calculated. What has surprised me is that I've never been able to find a way to do a reliable single-burn-to-orbit without lots or trial and error and manual fiddling with the controls... you would think after all these years that someone would have been able to come up with a way to automate it like everything else in this community...

Edited by SpacedInvader
Link to comment
Share on other sites

  • 1 month later...

I've noticed that after a stage event happens the next stage drops below ideal time to AP because it takes a portion of a second for the stage event to happen and the next stage to kick in. The next stage is now below the AP target and Gravity Turn tries to compensate by lifting the nose to increase time to AP. The result is a series of "porpoise" bounces.

There would be two ways I could think of to fix this bouncing:

  1. in the last moments before a stage burns out allow time to AP to rise about 10-15 seconds above the target time. This way when the staging event happens the rocket will be back down to correct time to AP when the next stage kicks in.
  2. Slow down how quickly the computer reacts and corrects so as to smooth out the pitch changes.

Thanks for maintaining this mod. it's really cool. :)

 

Edited by Tyko
Link to comment
Share on other sites

  • 1 month later...

Would it be possible to move the stage limit to the main window under autostage when it's enabled? And maybe add a global default thing to the things under Setup, it gets a bit annoying having to set the stage limit to 1 every time for it to not activate my chutes.

And maybe a way ingame to delete the launch data of a craft.

Edited by Crimor
Link to comment
Share on other sites

@AndyMt

A minor addition to Gravity Turn would be a way for another mod to trigger the Launch button. I use a mod called Launch Countdown, which can trigger a launch by itself, but if I do that, then GT doesn't start.  I can easily add the code to Launch Countdown to call GT instead of doing the launch itself.

Edit:  I was looking at the code, it seems that if I just call the Launch() method, it should work.

Edited by linuxgurugamer
Link to comment
Share on other sites

On ‎16‎.‎01‎.‎2018 at 2:33 AM, linuxgurugamer said:

I just released the update to the NASA Countdown clock, it can now activate GravityTurn when the countdown is complete.

Great! Thanks for looking into this so the 2 mods work together.

I still don't have the time to continue the refactoring and UI improvement...

Link to comment
Share on other sites

Could you explain a bit what your top secret super efficient maths are ?

I'm looking to do the same kind of thing on a kOS script but I can't find any "gravity turn equation" (I know that would be too simple :) )

Link to comment
Share on other sites

1 minute ago, lBoBl said:

Could you explain a bit what your top secret super efficient maths are ?

I'm looking to do the same kind of thing on a kOS script but I can't find any "gravity turn equation" (I know that would be too simple :) )

I think for a kOS script, you'd probably want the simple version of what this mod does: A certain time/height/speed after launch, turn a set amount.  Keep engines on full until apoptosis is ~50 seconds away.  (Or 20, or whatever you set.)  Then reduce throttle and adjust it to keep it at that time away.  Have a minimum throttle you can reduce to.  Cut engines entirely when apoptosis reaches your desired orbital height.  (Though you may want to keep the script running to account for drag.)

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