Jump to content

Could MechJeb Fly a Real Rocket?


Skript88

Recommended Posts

This is indeed theoretical If that wasn't obvious, I do not plan to fly a real rocket and slap a mechJeb unit on the side.

Assuming that It was provided with all the inputs it required and it was given enough control over the rocket, then I would assume that something like mechJeb would be able to fly a rocket in a real Enviroment.

But perhaps there are some values that MechJeb Is able to get in game  that would be impractical to measure on a real rocket, or the fact that kerbal aerodynamics are much different than real aerodynamics and something MJ does would just not agree with our atmosphere.

I don't know enough about the mechJeb plugin to know for sure, But what I would imagine would be difficult would be getting the height from sea level as I am not sure if this is or how it would be measured for a real rocket.

What do you guys think would this work?

Edited by Skript88
Link to comment
Share on other sites

If you produced a Hyper-Mechjeb for a super-realistic KSP mod, then built it in real life and showed it to Elon Musk, then he would somehow make it fly the Falcon Heavy to Duna Mars. So, yes. It could work, if you upgraded it and showed it to Mr. Musk.

Link to comment
Share on other sites

5 hours ago, Gaarst said:

All rockets are flown by programs, even manned ones. The programs flying these rockets are (many) orders of magnitude more complex than MJ.

Sorry but I don't buy that at all. More complex yes, but by orders of magnitude ? lol. MJ is not exactly a 100 lines piece of code... 

Link to comment
Share on other sites

2 minutes ago, sarbian said:

Yes line count is not an amazing metric but optimal control is not magnitude harder than some of the code of MJ.

I would argue with that, especially since optimal control is not enough, but I'll leave it be in the perspective of sheer pointlessness of this argument.

Link to comment
Share on other sites

I am happy to exchange on that subject and @Boris-Barboris mod does implement a control method far more closer that those used on plane and rocket than what is in MJ. But I strongly disagree on the order of magnitude

Edit : and I would not ride a rocket controlled by my code :)

Edited by sarbian
Link to comment
Share on other sites

1 minute ago, sarbian said:

But I strongly disagree on the order of magnitude

I just tend to measure complexity in man-hours, and I'm quite sure the difference on this parameter is on the scale of 100-1000. What part of MJ do you love the most btw? I'm genuinely interested.

7 minutes ago, sarbian said:

 does implement a control method far more closer that those used on plane and rocket

Not really, I found modern control theory quite unapplicable to the task, so I had to improvise - hence the development time.

Link to comment
Share on other sites

7 minutes ago, Boris-Barboris said:

I just tend to measure complexity in man-hours, and I'm quite sure the difference on this parameter is on the scale of 100-1000. What part of MJ do you love the most btw? I'm genuinely interested.

I would say the landing prediction/simulation because the current code is mostly mine and worked quite brilliantly before the aero change. Not all that complex but it was satisfying to see the ship land 1m of the target even with parachute (I had some external contribution here). The current sim is not as precise as before :( I am sure it s a stupid mistake somewhere in my cube code but it takes ages to debug...

Edit : and the whole sim is garbage free :)

Edited by sarbian
Link to comment
Share on other sites

Lots of naysayers here. While it's obviously not configured to fly the Falcon 9 into orbit and land the booster, it's still just a PID controller in the end just like any other rocket guidance system so with proper tuning I have no doubt that it could fly a simple rocket decently well. Maybe not a real mission or anything like that but so long as the inputs and outputs for the rocket's instruments and gimbals/fins are set up the same way as KSP's, I see no reason why it couldn't fly a real rocket along a mini ascent path. I doubt it would get anything to orbit without some serious guesswork and luck but it could at least control a rocket along a given path, maybe something small like SpaceX's Grasshopper or the test vehicle Falcon 9R, minus the actual landing of course.

Edited by the_Demongod
Link to comment
Share on other sites

12 hours ago, Boris-Barboris said:

Ah, MPC-like stuff is fun, yes )    Maybe something from here can help you with stock aero forces, i too had to scratch my head a lot too.

I will have a look but my main problem is that the code runs in a thread and I have to implements the cube myself to avoid calling Unity code from a thread. So my problems is most likely here. I "just" have to write something to compare my code result to the actual numbers.

Link to comment
Share on other sites

Well many real life rockets have been flown to orbit with the initial part of the ascent simply being a "pitch program" that just tells the rocket to point to a certain pitch after a certain amount of time. That's all it needs because they know ahead of time how the vehicle is going to behave.

Then to complete orbit it will switch to powered explicit guidance, which MJ doesn't do but isn't all that much more complicated (people have written kOS scripts that do it). So no, it's not that crazy an idea.

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