Sign in to follow this  
hansman1982

MechJeb Ascent

Recommended Posts

I was wondering what everyone else had found to be the most fuel efficient ascent path to set in MechJeb.

Mine is set:

2.5 KM begin turn

70 KM end turn

100KM Orbit Altitude

45%-ish angle

This is where I set it on every flight (sans special test flights) and seems to give me the best out there. Maybe I am wrong though.

Share this post


Link to post
Share on other sites

Mine is:

10 KM begin turn

70 KM end turn

angle:40%

Orbit altitude:the one you choose.

EDIT:the final path angle(or something alongs those lines):0 degrees

all option(maintaint speed under terminal velocity,corrective steering,avoid overheat etc... )are enabled BUT the option limiting the acceleration.

Edited by goldenpeach

Share this post


Link to post
Share on other sites

9.5 begin turn

55 end turn

final path thingy: 5

angle: >=< 50%

Maintain V under terminal velocity and avoid overheat. :)

Share this post


Link to post
Share on other sites

I modify it according to my TWR and speed at different part of the launch. However, my baseline is 10km start 70km end 45%. Starting your turn so early will make you stay in the atmosphere too long and you'll end up wasting fuel.

Share this post


Link to post
Share on other sites

It all depends on the rocket! Sometimes a gradual ascent curve gets a weak launch stage up so a powerful insertion stage can finish things. Sometimes the rocket has an absurd TWR all the way up (or a weak insertion stage), and a rapid-start ascent curve results in an almost-orbit before even getting to circularizing anything.

Usually I aim to start the turn at 10km, and end the turn at between 60-75km depending on what orbital height I'm after. For very low (75-85km) orbits, the turn usually ends at 60-65km.

Share this post


Link to post
Share on other sites

start 8-10Km (depending on first stage separation altitude) end 55-65Km final path 0 angle 39% If I have lower TWR on the pad I increase turn start height from 8-10. Lower TWR higher up and I increase end turn point from 55-65Km

Share this post


Link to post
Share on other sites

I actually wrote some Python code to help answer this exact question! =) It simulates a bunch of ascents and reports the attributes of the best one.

http://www.reddit.com/r/KerbalSpaceProgram/comments/1tavqb/finding_the_best_ascent_profiles_with_a_script/

One thing the script taught me is that limiting your acceleration (to a fixed number, not just to terminal velocity) can help. If you achieve a high apoapsis too soon, you miss out on the benefits of a slow and steady horizontal climb and end up spending a lot of delta-V to circularize.

You can run the script for yourself, but I'll go ahead and tell you that your gravity turn is ending too high. Assuming your ship has a drag coefficient of 0.2 (MechJeb can show you this), try limiting acceleration to 2.2 g's (21.6 m/s) and using a turn from 8.12 to 45.64 km, with a shape of 57.1%. (Your final flight path angle should always be 0 degrees.) My script says this'll result in a delta-V of around 4399.76 m/s (with losses of 1415.29, 902.19, and 44.14 m/s to gravity, drag, and steering) to get to a 100 km orbit.

(Note: My script also assumes you have MechJeb's "corrective steering" setting -off-, though it doesn't make a huge difference.)

Share this post


Link to post
Share on other sites

Which version of python do I need to use the codes?

I tried with version 3.4 (the one I use for coding) but I know that there is no backward compatibility: do I need to use the version 2.7.3?

EDIT: I'm very interested in those code: finding the perfect(or almost perfect) ascent parameters has bugged me since the first time I used mechjeb!

Share this post


Link to post
Share on other sites
Which version of python do I need to use the codes?

I tried with version 3.4 (the one I use for coding) but I know that there is no backward compatibility: do I need to use the version 2.7.3?

It works fine for me using Python 2.7, 3.3, or 3.4. What happened when you ran it with 3.4?

Share this post


Link to post
Share on other sites

Sorry, I actually use 3.3

For ascent.py nothing seem to happen: I press f5(from the IDLE window) and the program seem to finish instantly.

For learn-ascent.py: I get this(copy-pasted):

usage: learn-ascent.py [-h] [-a accel] [-d drag] [-p poolSize]

[--profile filename]

planet alt0 alt1

learn-ascent.py: error: the following arguments are required: planet, alt0, alt1

Traceback (most recent call last):

File "/Users/standar/Downloads/KSP-scripts-master/learn-ascent.py", line 288, in <module>

args = parser.parse_args(sys.argv[1:])

File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/argparse.py", line 1705, in parse_args

args, argv = self.parse_known_args(args, namespace)

File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/argparse.py", line 1740, in parse_known_args

namespace, args = self._parse_known_args(args, namespace)

File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/argparse.py", line 1959, in _parse_known_args

', '.join(required_actions))

File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/argparse.py", line 2353, in error

self.exit(2, _('%(prog)s: error: %(message)s\n') % args)

File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/argparse.py", line 2340, in exit

_sys.exit(status)

SystemExit: 2

(end of the copy-paste)

For rockets.py I get an "invalid syntax" error.

For planet.py nothing seem to happen, same thing for physics.py, engine.py and LinkedList.py

For Iko-mission.py I get this(copy-pasted):

Traceback (most recent call last):

File "/Users/standar/Downloads/KSP-scripts-master/lko-mission.py", line 1, in <module>

import rockets

File "/Users/standar/Downloads/KSP-scripts-master/rockets.py", line 253

except engine.WeakEngineException, e:

^

SyntaxError: invalid syntax

(end of copy-paste)

With Iko-100.py I get this(copy-pasted,again):

Traceback (most recent call last):

File "/Users/standar/Downloads/KSP-scripts-master/lko-100.py", line 1, in <module>

import rockets

File "/Users/standar/Downloads/KSP-scripts-master/rockets.py", line 253

except engine.WeakEngineException, e:

^

SyntaxError: invalid syntax

(end of copy-paste)

With eve-mission.py I get(copy-pasted, like the other):

Traceback (most recent call last):

File "/Users/standar/Downloads/KSP-scripts-master/eve-mission.py", line 1, in <module>

import rockets

File "/Users/standar/Downloads/KSP-scripts-master/rockets.py", line 253

except engine.WeakEngineException, e:

^

SyntaxError: invalid syntax

(the end)

It's possible that I did something wrong as I launched them by pressing f5 from the IDLE window(and the program window(the window where the outputs get printed)) successfully appeared with avery scripts.

Hope it help you and have a nice(insert the proper word from the list: day,evening, night,morning)!

Share this post


Link to post
Share on other sites
Sorry, I actually use 3.3

For ascent.py nothing seem to happen: I press f5(from the IDLE window) and the program seem to finish instantly.

For learn-ascent.py: I get this(copy-pasted):

usage: learn-ascent.py [-h] [-a accel] [-d drag] [-p poolSize]

[--profile filename]

planet alt0 alt1

learn-ascent.py: error: the following arguments are required: planet, alt0, alt1

...

What you should be doing is running learn-ascent.py (from the command line, not IDLE) with arguments, as shown in the example in my Reddit post:

> python learn-ascent.py Kerbin 0 100

Let me know if that doesn't work. =)

Share this post


Link to post
Share on other sites
Doesn't MJ adjust the ascent settings based on the rocket now?

Nope. The option you're thinking simply adjusts start and end altitudes for the gravity turn based on the body you're on.

Share this post


Link to post
Share on other sites
What you should be doing is running learn-ascent.py (from the command line, not IDLE) with arguments, as shown in the example in my Reddit post:

> python learn-ascent.py Kerbin 0 100

Let me know if that doesn't work. =)

I have a problem: when I type that and press enter, python tell me this: "SyntaxError: invalid syntax" and highlight "learn" in red.

I had copy-pasted "> python learn-ascent.py Kerbin 0 100" from your post if it can help you.

Share this post


Link to post
Share on other sites
I have a problem: when I type that and press enter, python tell me this: "SyntaxError: invalid syntax" and highlight "learn" in red.

I had copy-pasted "> python learn-ascent.py Kerbin 0 100" from your post if it can help you.

You seem to be running this from IDLE, not from the command line. You need to run it from the command line.

1. Open a command prompt. (On Windows, this is cmd.exe.)

2. Browse to the directory where these python scripts are.

3. Run "python learn-ascent.py Kerbin 0 100" (with no quotes).

If this doesn't work, please take a screenshot and attach it.

Share this post


Link to post
Share on other sites

It worked perfectly!

Thank you for your help!

and helping me realize that my mechjeb ascent parameters were far from optimal.

EDIT: if the drag coefficient change during launch, which one should I take for the scripts(the drag coefficient at launch, in orbit, the max drag coefficient, the minimal one...)?

I know that the drag coefficient don't change a lot during launch(unless I try to deploy chutes during launch) but what would be the "best" drag coefficient to take in theory?

Edited by goldenpeach

Share this post


Link to post
Share on other sites

This script is interesting, but I have a lot of questions about its use. There seem to be several scripts included, as well as parameters that can be changed to suite whatever vehicle you are launching. I didn't see a comprehensive manual or readme for this.

Share this post


Link to post
Share on other sites
This script is interesting, but I have a lot of questions about its use. There seem to be several scripts included, as well as parameters that can be changed to suite whatever vehicle you are launching. I didn't see a comprehensive manual or readme for this.

7th January 2014, 11:58

Do not necro, Necro is kill.

Share this post


Link to post
Share on other sites

Yeah but I'm not sure where else I could ask this question. It is relevant to thread. I don't see a point in starting a whole new thread for something like this.

Share this post


Link to post
Share on other sites

i use rss so mine set to:

5km start turn

145km end turn

150km orbit hight

40% turn sharp

decouple last stage while closing toward the AP then use OME about 60~210m/s by different orbit

almost every flight like that

Share this post


Link to post
Share on other sites
One thing the script taught me is that limiting your acceleration (to a fixed number, not just to terminal velocity) can help.

I am finding this to be really true! Usually I'd stick to the terminal velocity limit in MechJeb, but limiting the acceleration is making for a much smoother ascent. I am not attaining my apoapsis so early and then having to coast for so long. Plus I was able to halve the number of rockets because I did not need such high acceleration to keep up with the terminal velocity limit. Been achieving a 100x100 orbit with less than 4400d/V.

Share this post


Link to post
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.

Sign in to follow this