MechJeb2

MechJeb2

4M Downloads

Whishlist: Prescribed ascent profile from an external source

gruneisen opened this issue ยท 4 comments

commented

Provide the ability to read in an external ascent profile, in the form of a text file or equivalent. The purpose of doing so would be to interface an external solution for pitch vs. range, altitude, or time. In my case, this would be the output of a Simulink solution which has optimized for efficiency and payload. Additionally, an arbitrary, user prescribed profile could be generated in a spreadsheet program and output to a text file and may not need to be the result of an optimized external simulation.

commented

Holy crap, I've been trying to figure out how to generate an optimal ascent profile so that my KOS launch script can follow it. If you have something like that @gruneisen, I'd be very interested in hearing more.
May I also suggest that what you seem to be talking about is more in KOS's wheelhouse?

commented

Holy crap right back at you, @austinjames314 -

The breadth and depth of the KSP mod universe never ceases to amaze me - I had not idea what KOS is or what it could do. This CERTAINLY seems like the right mod to be using w/ my solution.

In regards to the ascent profile, I'd be more than happy to share it with you. It's very much WIP right now and barely functioning, but it is yielding some very interesting results. The sophisticated model I'm currently working on is in Simulink - if you have access to that solver, I'd be more than happy to send it to you. I can walk you through the model set-up and optimization routines if you like. Additionally, my first pass on this was an EXCEL spreadsheet which is MUCH simpler. It does not find an optimum solution in any way shape or form - all it does is solver the equations of motion and follow prescribed pitch vs. altitude set points. It served as a pretty simple way of determining an ascent profile vs. time that could be plugged into MechJeb's interface one-click-at-a-time. This is easily share able. Let me know which you'd like!

Some final notes on my simulations as they're written. The do not consider the mechanics of the rocket itself - this means they do not understand the gimbal range, rate, or moment of inertia of the rocket. Instead, they assume the pitch of the rocket to be something that can be directly manipulated. Its a simplification that has let me get off the ground and I intend on adding the next layer of physics in soon.

They do solve and integrate the equations of motion in two dimensions (so you cannon consider yaw right now) and handle a NASA atmosphere model for drag.

Just wanted to give a little more info on the limitations of the current models.

Thanks!

commented

Alas no, I don't have access to Simulink, or Matlab or anything.

My problem is I don't know where to start on the math for calculating an ascent profile. My plan so far was to output the flight data during a good ascent (found by trial and error) using KOS, and then try using a PID controller running on KOS to see if making other rockets try and fly the same profile would be better than guessing / trial and error for setting up a gravity turn.

Would it be possible to calculate the profile on the fly in KOS? How computationally intensive is it?

Maybe we should move this conversation here: KSP-KOS/KSLib#20

commented

I'll go head and close this issue and we can continue on the KOS Github