Jump to content

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


AndyMt

Recommended Posts

4 hours ago, AndyMt said:

Yes, sure I'm interested in providing an API like MechJeb does (as an example). But first I have to refactor the whole thing.

for now you could read my changes compared to your 1.5 tag

https://drive.google.com/file/d/0B0rgcOJPK_8XdXhnakVBWm4yd1k/view

P.S. i did add 2 options which by my opinion makes reaching orbit more guaranteed than original johnfink8's version (actually your's 1.5 tag) i.e. minimal speed to account for inclination(prevents launching in opposite direction and rotating in dense atmosphere, can be disabled if you put there 0), and heighdiff to use throttling (it can be disabled if you put there value more than destination orbit height), probably should have use just direct height (without diff)

Link to comment
Share on other sites

Yesss!!!! Please keep up the good work. I love to have a reliable autolaunch that put all my rockets into space for 3500-3700 dV. All this without the mechjeb overhead!

I don't say mj is useless. It's still good if you want to launch fast with 4500 dV. Gravityturn is pretty efficient but needs some time to get the rockets into orbit.

On 23.9.2016 at 4:32 PM, AndyMt said:

I've always been a fan of  @Overengineer1's GravityTurn (see original thread). Unfortunately it wasn't updated for a while, so I thought to take care of that myself :).

 

Edited by Tahib
Link to comment
Share on other sites

New release V 1.6
>download<

Changes:

Stats window shown in (optional) separate window.
In GTs main window you can now toggle an option to show the launch statistics in a separate window (off by default). The stats window remains open even when you close the main window.

Stats window updates during manual launches.
Stats are always updated while the stats window is open and the vehicle is not landed. Also during manual launches without using GT.

Using new KSP skin with smoother fonts.
The skin is changed to the more modern skin using vector fonts. Still not scaleable (I think).

Reduced memory usage and garbage.
Removed Linq from all source files, replaced by Smooth.Slinq in some cases. Most foreach loops converted where they produced garbage. Garbage production reduced to roughly 1/10th.

@okder: I'll incorporate your changes in one of the next releases in some form or the other.

I just hope tomorrows 1.2 release won't break this plugin...

Link to comment
Share on other sites

56 minutes ago, AndyMt said:

Stats window updates during manual launches.

Stats are always updated while the stats window is open and the vehicle is not landed. Also during manual launches without using GT.

 

 

please make it clear when foreground thread calculation of future trajectory is enabled,

I was very surprised to find that such calculation proceed even if gravity-turn windows was never opened in the flight.

reason: there may be bugs or something may trigger them so they would spam error messages to log, and lower performance, i.e. it should be disable able, if not needed.

Edited by okder
Link to comment
Share on other sites

10 minutes ago, okder said:

please make it clear when foreground thread calculation of future trajectory is enabled,

I am very surprised to find that such calculation proceed even if gravity-turn windows was never opened in the flight.

reason: there may be bugs or something may trigger them so they would spam error messages to log, and lower performance, i.e. it should be disable able, if not needed.

I'm not sure if my phrasing was ambiguous: the calculations are only done as long as the stats window is open. If you close it, there's no impact. 

Furthermore you can only open the stats window if you have opened GT at least once for that vehicle. The calculations work exactly the same way as while GT is performing an automated launch, so threading and calculations are no different.

Link to comment
Share on other sites

@AndyMt i have to point out that in 1.5 calculation were processed always (even window was never opened) and i was shocked to know that only because other mod causes errors in those calculations, yea you fixed that (jugging by source code), thank you.

 

Edited by okder
Link to comment
Share on other sites

28 minutes ago, okder said:

@AndyMt i have to point out that in 1.5 calculation were processed always (even window was never opened) and i was shocked to know that only because other mod causes errors in those calculations, yea you fixed that (jugging by source code), thank you.

Yes, that was part of the whole "remove garbage" task :). If I missed something please let me know.

 

26 minutes ago, 5thHorseman said:

You mean today's :)

Looking into history it most probably will be tomorrow in my time zone ;).

Link to comment
Share on other sites

In my game using gravityturn 1.6 with mechjeb 2.5.9 has some trouble with the circulisation node:

[LOG 12:43:25.856] GravityTurn : Circularization burn 1876.8 m/s
[EXC 12:43:26.024] NullReferenceException: Object reference not set to an instance of an object
    ManeuverNode.OnGizmoUpdated (Vector3d dV, Double ut)
    GravityTurn.VesselExtensions.PlaceManeuverNode (.Vessel vessel, .Orbit patch, Vector3d dV, Double UT)
    GravityTurn.MechjebWrapper.CircularizeAtAP ()
    GravityTurn.GravityTurner.fly (.FlightCtrlState s)
    Vessel.FeedInputFeed ()
    FlightInputHandler.FixedUpdate ()

The effect is that it keeps making nodes.

 

Link to comment
Share on other sites

4 hours ago, mostlikely said:

In my game using gravityturn 1.6 with mechjeb 2.5.9 has some trouble with the circulisation node:

[LOG 12:43:25.856]...

The effect is that it keeps making nodes.

Thanks a lot. I kind of expected this as I didn't have a MJ version which worked with 1.2 before I released GT 1.6 - well I wasn't aware of it to be honest. I'll look into it soonTM.

Until then - it'll be a known issue and you would have to circularize manually. Hm... actually you can't because MJ integration is automatic. If it turns out to be more complicated I'll just make MJ integration an option and do an intermediate release.

And as stated in the 1st post: "The 1.2 release might brake this mod".

Edited by AndyMt
Link to comment
Share on other sites

On 12/10/2016 at 4:32 PM, AndyMt said:

And as stated in the 1st post: "The 1.2 release might brake this mod".

 

Oh... I was just about to ask why it wouldn't work xD But during the pre-release for me it STILL wouldn't work. Are there any mods that aren't compatible with this? And is a button still used or a key binding like HyperEdit's Ctrl + H?

Link to comment
Share on other sites

New release V 1.6.1
>download<

Changes:

Bugfix: Circularization with MechJeb didn't work.
Looks like GT used an old API for creating and updating maneuver nodes. Fixed now.
MechJeb integration tested with MJ dev version 2.5.9.642.

Now I will really try to implement the next features...

 

Link to comment
Share on other sites

Man- some of the defaults are way different from what they used to be. Time to Ap is 50 now instead of 40, roll defaults to 0 instead of -90(which kept rockets from rolling unnecessarily into an equatorial orbit.) and the big one is how sensitivity is .5 instead of .2- huge difference in the Pe between those two. Any way to change these back without having to do it every launch?

Link to comment
Share on other sites

4 hours ago, Paaaad said:

Man- some of the defaults are way different from what they used to be. Time to Ap is 50 now instead of 40, roll defaults to 0 instead of -90(which kept rockets from rolling unnecessarily into an equatorial orbit.) and the big one is how sensitivity is .5 instead of .2- huge difference in the Pe between those two. Any way to change these back without having to do it every launch?

I was initially unhappy with sensitivity being changed to 0.5, but after some testing, found it actually resulted in improved final results, compared to the original 0.2.

Link to comment
Share on other sites

5 hours ago, Paaaad said:

Man- some of the defaults are way different from what they used to be. Time to Ap is 50 now instead of 40, roll defaults to 0 instead of -90(which kept rockets from rolling unnecessarily into an equatorial orbit.) and the big one is how sensitivity is .5 instead of .2- huge difference in the Pe between those two. Any way to change these back without having to do it every launch?

No worries, the next release will have a "lock" feature for every parameter. Here's a sneak preview what that will look like:

4f53fccc-92b9-11e6-94f8-d2d53a5b0180.png

So you will be able lock the parameters (per vessel) which you want to have different from the defaults and won't be modified by the "Improve guess" or "Previous Best Settings" (not sure about the last one).

Note: UI design and button labeling not finalized!

I changed the AP times to 50 because they generally result in more efficient launches. I also changed sensitivity because throttling an engine down to 20% is just not realistic. But I noticed that in KSP scale this results in some issues for some launches. So I'll change the default to 30% with the next release.

1 hour ago, JAFO said:

I've entered Gravity Turn v1.6.1 in the 'Launch "Kerbal 1-5" to LKO' gravity turn challenge.. wish me luck..

(and see if you can do better!)

I'll follow that thread and thumbs are pressed!

Link to comment
Share on other sites

After reaching stable orbit but leaving the GT window open - the numbers in the Gravity Drag Loss and Total Loss fields continue to change by small amounts.  Engines and RCS completely off.  Doesn't seem like a major bug, probably just rounding errors piling up? But I thought I'd mention it

I'd love it if the stats window was back in the main window and always on.  The instant feedback from that (current drag and totals) was a big part of the appeal of the original.  

Link to comment
Share on other sites

4 hours ago, fourfa said:

I'd love it if the stats window was back in the main window and always on.  The instant feedback from that (current drag and totals) was a big part of the appeal of the original.

I actually really like the stats window separate :) Maybe an option? I've been using it to test my non-GT launches and see how they stack up against not just GT, but each other.

Link to comment
Share on other sites

I have a question about how to use the guessing/improve launch functionality.

When I have a launch that's going poorly (clearly inefficient or not going to make orbit or so forth), when/how should I end it so GravityTurn is able to correctly update its guesses? Revert at any time? Do I have to wait for the launch to "complete" either by reaching orbit or crashing?

Link to comment
Share on other sites

1 hour ago, salajander said:

I have a question about how to use the guessing/improve launch functionality.

When I have a launch that's going poorly (clearly inefficient or not going to make orbit or so forth), when/how should I end it so GravityTurn is able to correctly update its guesses? Revert at any time? Do I have to wait for the launch to "complete" either by reaching orbit or crashing?

I actually don't know exactly - bear with me, I haven't analysed all the code (yet). Looking into it briefly it looks like it takes the "Total Loss" values of each launch to calculate the next suggestions. Which means you can revert any time, but the earlier you revert, the more "guestimated" the total loss will be. I usually revert when the apoapsis reaches the destination height. This way I don't have to wait for the vehicle to reach orbit.

The original development thread might contain the exact description.

On 16.10.2016 at 8:50 AM, fourfa said:

Not a big deal - at first it seemed like I had to bring it back up each time, but then it seemed to come back up whenever I opened the main window. As long as it ain't extra clickspam

I'm thinking about a tabbed UI where the tabs would be "Simple", "Standard" and "Advanced".

  • Simple: only the most basic parameters will be shown (turn height, turn speed, destination height, inclination).
  • Standard: the UI we have right now with staging and stats as separate popups on request.
  • Advanced: Same as we have now, plus staging parameters and the stats all in the same window again.

But I'm not sure if this is the way to go.

Link to comment
Share on other sites

I have to admit I was initially skeptical about the utility of this mod in the face of MJ, which has provided so much more functionality in previous versions.  However, as someone else pointed out, MJ is not yet available for 1.2.  So, tired of having my rockets flying around like drunken cats, I decided to check out Gravity Turn.  @AndyMt; Thanks for toughing it out in spite of the naysayers!  This is WAY better than any launch automation I have previously used!  No more flipping just cause I don't know how or can't be bothered to properly design my stages to avoid it!  No more drunken cats flying my launches!  I stuck a mobile mining, refining, and science outpost on top of a 2.5m asparagus-staged stack and clicked Launch!  This thing is big, bulky, mounted sideways on top of a rocket with a huge fairing to make the HUGE drag symmetrical, and GT took her to 80km easily on 3500m/s!  Perfect!  Way better than my poor, decrepit old fingers can do it!

But that's enough praise for now - wouldn't want it to go to your head.  I do have a wish list.  I know you're focused on the Gravity Turn and that's the name of the app and all, but it would be really nice if it could have a options to finish off the orbit (circularizing would be a nice first step - my launch left me 5m from Ap in an 80km x 59km orbit.  Looks like GT is giving up soon as the ship hits 70km).  Also would be nice if it had some staging built-in.  I thought that little "Auto-StageManager" button was going to handle that, but it seems to only worry about fairings.  I know smart parts is my friend, but I was really hoping for something integrated.

Anyhow, thanks for the AWESOME mod and I'm looking forward to seeing it become even awesomer!

Danny

Link to comment
Share on other sites

Staging has always worked for me - though I'll admit I'm still on the KSP 1.1.3 version, as I'm waiting for other mods to update.  If you have MechJeb installed, this should hand off to it once your ship leaves the atmosphere, so MJ should do the circularization burn for you.

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