Jump to content

[1.1.3] MechVal - new HowTo: Departure Burn (v0.03 2016/09/30)


DBowman

Recommended Posts

@DBowman AWESOME tutorial... :)

Also, I have to say, I have barely used kOS, as it did seem a bit intimidating... And I know people have put together other scripts, but MechVal, and your very well done tutorial, make me want to install and give kOS another try...
THANX! :D

PS- Auto-astrogator... I like that... :)  Great way to explain/differentiate from the auto-pilot claims

PSS- So, will MechVal handle maneuver nodes you create with MJ's Maneuver Planner? (I should probably read the OP again to see if I ust missed that...lol)

Edited by Stone Blue
Link to comment
Share on other sites

MechVal How To: Departure Burn

Crawling out of the gravity well

In the previous How To I detailed the MechVal functions to set up some Pe Kicks and place one big departure burn at just the right place and time. Now I'll demonstrate a function that lets you see what Kerbin will do to your low thrust trajectory and a couple more that help you put it back where you want it.

I have all the images in this album.

First I want to call out an additional function I've added in v0.03 to make moving the one big departure node simpler: mvDeltaMagNodeFrom( nodeToChange, nodeToCompensate, magnitude ). This function keeps the total node sequence deltaV constant as we move some into / out of the final Pe Kick node ( to change the final kick Ap / orbital period and therefore move the final burn location around ). Earlier we had to do the 'compensation' by hand.

I'm going to pretend we can use the same plan as the first How To except we pretend our departure burn has to be done at 0.3 m/s2 acceleration. The Pe Kicks mean we only have to burn 260 m/s @ 0.3 m/s2 = about 14 min 30 seconds - near half an 80x80 orbit.

kd5Ybjbl.png

This is what the burn would look like if it was impulsive / instantaneous - 15 mins isn't instantaneous. KSP won't tell you where the long burn will go, but it's not going to follow the orange dashed guide trajectory. I went back to a save with the original kicks & departure all lined up.

Use mvSplitsNodeMagSeconds( 4, 30, 120 ) to split the 4th node, into chunks at most 30 m/s, 120 seconds apart - I left some buffer time for re-pointing.

NGjN8J4l.png

The purple dash line is an approximation of a prograde burn the same size as the original 'one big departure burn'. You can immediately see one of the ways Kerbin messes with your trajectory. We can compensate for this by burning earlier, rotating our trajectories clockwise - use mvDeltaTAllNodes( -10 ) to move all the kick nodes and all the departure nodes 10 seconds earlier, iterate until the vessel trajectory is over the guide.

Tu8pZ7ll.png

A wider view shows you that the green vessel Kerbol Ap is twisted. The Ap is also lower than we need, to fix this we need to add DeltaV to the end of our departure burn sequence of nodes - but we want to maintain the same scheme of 30 m/s per node 120 seconds apart. Use mvDeltaSplitsedNodeMagSeconds( 5, 30, 120 ). to add 5 m/s to the last node while respecting the 30/120 scheme. Iterate this until you are content. The function will add new nodes or remove 0 magnitude ones as necessary.

Here is the result of fixing the plan:

8VZUXNbl.png

I had to add 110 m/s. Not too bad, and you can see where your trajectory will end up. We can do better though. The vessel can do delta 36 m/s per 120 seconds I asked for only 30 to give some buffer time between maneuvers. MechJeb likes to hit the deltaV number precisely and will throttle down to make sure, we really just want to burn full throttle (such as it is) the whole time. Redoing the departure plan is just a restore save ( I'm looking at a 'plan' 'save stack' with undo / redo ) and run mvSplitsNodeMagSeconds( 4, 36, 120 ) - already you can see it looks better - 481,000 km higher Ap

TmF4PALl.png

It only takes 50 m/s to bring that up to where we want. I plan to make an 'execute departure' function that will physics warp, steer, and burn full throttle continuously. In the meantime turn down MechJebs OCD tolerance on deltaV, you'll have to keep physics warping at every node though.

 

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