Jump to content

Space Computer. Brought to you by kOS and hopefully many nerds.


Payload

Recommended Posts

http://www.youtube.com/watch?v=EKt4XgSyrz0]



Here's my own test with the updated script only change I made to it was to kick my fairings off when its burn was done. Thing flys nice and steady for me even with me running FAR and DRE hell mechjeb cannot fly this rocket this straight so I'm impressed with it. Edited by Kalista
Link to comment
Share on other sites

I think I might have set apoapsis to 70k... which is when timewarp kicks in. Not sure how your script works with that.

You misunderstand. I'm just adding to your point about physical warp kicking in when you are focused on the kOS window. My point is that it also happens if KSP.exe itself is out of focus. I know it isn't yours to solve.

Understood.

Okaaaay. Look, I don't wish to offend you or start an argument, but you have a weirdly abrasive attitude going on and it makes it really difficult to engage with you.

You asked for feedback on a script that aims to launch rockets. So I did. It's not a criticism. It's not me bashing you or your work. It's me gratefully learning for you and (I thought) repaying that with some real world testing/reporting.

When you put something into the public's hands, they will apply it under what are often less than optimal conditions. Nonetheless, I have the same issues with any craft I launch, bottom-heavy or otherwise. They can all be launched manually without incident or brute-forcing. I do not have FAR installed.

I'll leave you to it. Best of luck gathering feedback.

You can't build a rocket like that. Straight up. It's common knowledge that things that are controllable by humans may not be by a computer. I'm just giving you hints here. Launch a wide variety of crafts it can do. It probably wont do so well launching a rocket that is built ignoring all physics like they don't matter. That is far worse than "less than optimal". I can't believe that thing actual did as well as it did. Another problem that is not your fault at all is the fact that deployed coms dishes like that have about FIVE times the drag of any normal part. They should just get ripped off, instead they have a ridiculous breaking strength and they are trying to pull the top of your rocket down. Because the bottom is unnecessarily heavy, that adds up to a combo that is not dynamically stable. That is like putting the fletching on the tip of the arrow instead of the end.

It pretty easy to see if you have a good design or not. Watch the control indicators on the bottom left. If they are constantly swinging to the limit then you have an issue there that is beyond the control stability of the system. You can't just say that it failed to launch a poorly designed rocket properly. What do you expect me to be able to do about it? It doesn't launch rovers into space either. It wasn't designed for that. It is designed to be a starter script that you can tweak to launch your style of crafts. The default values are set to launch a reasonably large number of rockets perfectly fine. What you have here is a case that is far out from the norm. I do appreciate the feed back but saying that the program can't launch that rocket is like calling an auto manufacturer to complain that the coffee cup you bought doesn't fit into the cup holders. Certainly if they are fully adjustable cup holders that you just haven't taken the time to adjust, that seems a little wacky.

First. Adjust the TWR limit. I noticed that your rocket has a TWR of 6.0 as it hits the edge of the atmosphere. You can stop the TWR limit from cutting out at 10k if you so desire. Look at line 190. See where it says "when altitude > turn1 then

{ set throttleLimit to 0. set tThr to 1. }." Delete the set throttleLimit to 0. line and the set tThr to 1 line. Then add set tTWR to 3. Then it will hold 2.0 TWR until you reach 10k and then increase it to 3. It may be that you need the control authority of full thrust all together. Try setting the throttle limit to off.

It's not that I care about genuine criticism. But you are trying to launch one of the poorest rocket designs that I have seen in a while. I bet with some tweaking it can launch that rocket. Maybe not optimally, but hell the thing has very meager payload and you have it sitting on top of KSP equivalent to the Saturn 5. I'd say that is a pretty edge case. Yes roll control is not added in yet and that is causing some instabilities right of the bat. But the rocket did recover from that. It just didn't have the control authority to keep it going straight up or to make the G-turn.

Average rockets have a TWR of 2.0 approaching 3-4. Not a TWR of 6 by the time you hit 20k. I'm asking if there is something you need to make your rocket easier to fly. Is there some setting that you need that is missing? Is there a part of the script that isn't functioning correctly? That is what I mean by feed back. Not this darned thing won't control my UNIQUE rocket because it's way out from norm and I haven't bothered to change one single setting.

It is also not possible to launch into an orbit that is lower than 80k with my script unless you have changed the limits your self.

I will say this one time and be done with it. This is not Mechjeb. It was never designed to be a MechJeb replacement. It is designed to be a framework that others can use to avoid having to write out an entire script when most things will just require a small change in settings. It is intended that you have some knowledge of this system and for you to be able to make changes where they are needed to fly any rocket to orbit. If you don't want to be bothered to take the time to learn how to use it. Then you need to use Mechjeb.

I can handle building crappy rockets to test with my self. I built one with a TWR of 15 off the pad just to test my TWR hold. It still managed to orbit and steer that with perfect authority.

Finally, I seem harsh because I'm Old. I have no time to mince words nor do I have any desire to do so. If the truth angers you so much then I am the wrong person to discuss it with.

Link to comment
Share on other sites

http://www.youtube.com/watch?v=S3_rtxWIUww]



Last video test I'll do with this version this time same rocket fired at a 60 degree orbit. Thing was more accurate and used less fuel than mechjeb does on the same rocket. You did a hell of a job on this one payload if not for needing it for telemachus mechjeb would be scrubbed off my harddrive for my probe launches. Heck I even have the micrometeorite mod to try to throw it an extra curveball and it still fires them off on target. Edited by Kalista
Link to comment
Share on other sites

Last video test I'll do with this version this time same rocket fired at a 60 degree orbit. Thing was more accurate and used less fuel than mechjeb does on the same rocket. You did a hell of a job on this one payload if not for needing it for telemachus mechjeb would be scrubbed off my harddrive for my probe launches. Heck I even have the micrometeorite mod to try to throw it an extra curveball and it still fires them off on target.

Man FAR is weird. Even with your TWR locked to 1.5 it is still getting up to speed pretty fast and it's hitting that dynamic pressure more than I expected. I'm glad it's working out for you. I hadn't specifically tested it against Mechjeb to see how fuel efficiency was compared and I never intended it to be used with far. I do know that it's inclination launches are more accurate than Mechjeb. I had assumed that the extra accuracy was costing me fuel. It's good to know that it isn't.

Edited by Payload
Link to comment
Share on other sites

Using mechjeb in that same launch it will stutter the entire way up bleeding off fuel much faster since its overcorrecting itself the entire time. Yours since its pretty smooth after 10km uses next to no fuel since its basicly flying straight as an arrow afterwards. Far as the speed of the rocket yeah it tends to go up fast I've since locked the TWR to 1.5 till turn 4 to attempt to compensate but overall it flies exactly how i want it to.

Link to comment
Share on other sites

Well anything about how the controls are handled I can't take credit for. I would have to give that credit to Kevin Laity. All I have done is tell the program what to do. How it handles that is squarely down to him. I know absolutely nothing about how Mechjeb works internally. It may have something to do with the way the PID is handled. Kevin's acts more like a traditional PID controller. I think it has a little bit of ringing compared to mechjeb but it seems to make course corrections in a much better way. In Kevin's blog he said he has fixed the ringing so I'm eager for the next release. We are getting surface prograde info so it's time for some fancy landing.

Link to comment
Share on other sites

What i can't wait to be released is RCS translations so I can set up a progress style cargo ship to go up dock with my space station then undock and return to kerbin intact. Will be extremely handy with mission controller. Bonus points if he can get the mod to do resource transfers so my cargo ships 100% automated.

Link to comment
Share on other sites

On the first page is the code you need to copy to a .txt file in KSP/plugins/plugindata/archive the second code is the launch script that your prob after. Then load up the game bring up KoS window and type in switch to archive. run whateveryounamedthetxt. It should boot the script follow its instructions and it should launch without a hitch.

Link to comment
Share on other sites

New update seems to of broken the script attempting to run it now gives me an expression error on line 9 :'(

Hmm seems to work here. I'll have a look. Maybe I fat fingered a key on the paste.

Hold on I haven't tried the new update yet. I only installed it before I went to bed. Lets see.

Yep it's broken now. Ugghh. I just redid the whole steering system. Looks like I'm going to have to do it again.

Edited by Payload
Link to comment
Share on other sites

Well sadly we are going to have to revert to the older version of kOS now. I tried updating the script and that is not gonna work. The new PID changes to the steering have wrecked the ability of kOS to control even modest rockets. Though I can set a new heading. The craft wont hold it now anyway. Sorry guys. We are just going to have to use kOS 0.5 until this gets fixed. I'll make a notice on the front page.

Link to comment
Share on other sites

Do you also plan on updating the part itself? Id like a tiny radial part like EngRedux uses.

You could always do like I did and just add the module code to all command pods so you always have access to it and don't have another part cluttering up your craft just add this line near the bottom of the parts .cfg


MODULE
{
name = kOSProcessor
}

then the part functions like the original part plus any other features it has.

Link to comment
Share on other sites

You could always do like I did and just add the module code to all command pods so you always have access to it and don't have another part cluttering up your craft just add this line near the bottom of the parts .cfg


MODULE
{
name = kOSProcessor
}

then the part functions like the original part plus any other features it has.

THANK YOU for this. I gave you a rep point as well. I asked the same question, in the official thread, that Mokokid asked. Works for MechJeb as well.

Edited by Apollo13
Link to comment
Share on other sites

THANK YOU for this. I gave you a rep point as well. I asked the same question, in the official thread, that Mokokid asked. Does this idea also work for MechJeb?

Yes I have kOS and mechjeb slapped onto every command pod I have and telemachus into the stock antenna. Long as you have the dll in the right spot it should work with most ( will work for kerbal engineer so if you dont want kOS on command pods but want it on a radial you could slap the module code into any part you wanted ).

Link to comment
Share on other sites

Yes I have kOS and mechjeb slapped onto every command pod I have and telemachus into the stock antenna. Long as you have the dll in the right spot it should work with most ( will work for kerbal engineer so if you dont want kOS on command pods but want it on a radial you could slap the module code into any part you wanted ).

Just tried with MechJeb before you posted. Works great. Thanks, again.

Link to comment
Share on other sites

Kalista,

KOS did not work when I included it as you suggested. MechJeb worked, but not KOS. On the Launchpad, I right-clicked the command module and clicked the "Activate terminal". A gray area the size of the terminal appeared, but it did not activate; no text, no prompt, the gray area was not solid.

Upon reverting to the VAB, the light-gray, transparent terminal continued to display. When I moused over any part, there was no pop-up for the part. When I tried to quit the game, I did not get the "Yes, Really", "No, not really" buttons. I had to terminate via the Task Manager.

When I added the KOS part and went to the Launchpad, everything worked fine.

Link to comment
Share on other sites

Kalista,

KOS did not work when I included it as you suggested. MechJeb worked, but not KOS. On the Launchpad, I right-clicked the command module and clicked the "Activate terminal". A gray area the size of the terminal appeared, but it did not activate; no text, no prompt, the gray area was not solid.

Upon reverting to the VAB, the light-gray, transparent terminal continued to display. When I moused over any part, there was no pop-up for the part. When I tried to quit the game, I did not get the "Yes, Really", "No, not really" buttons. I had to terminate via the Task Manager.

When I added the KOS part and went to the Launchpad, everything worked fine.

What version of kOS are you using ? And if you backed up to .5 did you remove .6 ? In those test videos I have you can see me using the terminal directly off the probe core and having it working only thing I can think off offhand is if you have 2 versions running or something is conflicting with it.

Link to comment
Share on other sites

You could always do like I did and just add the module code to all command pods so you always have access to it and don't have another part cluttering up your craft just add this line near the bottom of the parts .cfg


MODULE
{
name = kOSProcessor
}

then the part functions like the original part plus any other features it has.

Yes thank you Kalista this is great.

I have another question for the masses. Questions... rather. I tried asking this in the official thread, but its hard to get a clear answer. It seems most people in that thread assume you already have basic programming knowledge.. I do not. So bare with me.

All I want to learn is how to create a launch to orbit script that complies with the design of the rocket im using it for. After watching Kevin's introductory video and studying this page I tried to create my own script and load it into kOS. Here it is.


clearscreen.
print "3". wait 1.
print "2". wait 1.
print "1". wait 1.

lock throttle to 1.
lock steering to up + R(0,0,180).
stage.
print "Lift Off!".

wait until altitude > 9600.
lock steering to up + R(0,0,180) + R(0,-25,0).
print "Pitching over..".

wait until surfacespeed > 500.
lock steering to up + R(0,0,180) + R(0,-50,0).

wait until surfacespeed > 750.
lock steering to up + R(0,0,180) + R(0,-75,0).

wait until surfacespeed > 1000.
lock steering to up + R(0,0,180) + R(0,-100,0).

wait until altitude > 40000.
stage.
print "Fairing Jettison.".

wait until stage:liquidfuel < 5.
stage.
print "Stage One seperation!".

wait until apoapsis > 69000.
lock throttle to 0.
lock steering to prograde.
print "MECO 1. Waitng for cicularization burn..".

wait until eta:apoapsis < 3.
lock throttle to 1.
print "Burning..".

wait until periapsis > 70000.
lock throttle to 0.
print "MECO 2. Orbit Achieved.".

I thought it would work.. and it does. To an extent. The rocket launches up to the gravity turn, but the code stops functioning ( mostly ) at this line down.


wait until surfacespeed > 500.
lock steering to up + R(0,0,180) + R(0,-50,0).

Nothing works after this line with the exception of


lock steering to prograde.

19 lines down... So what going on here? KOS doesn't kill the program so I do not think anything is wrong with my terminology, but my chronology. Now I imagine its the problem with wait until surfacespeed, but altitude is no way to go about performing a gravity turn and Id rather go by the speed.

Other that why is it most of the script does not work, but bits and pieces do?

Edited by Motokid600
Link to comment
Share on other sites

I don't see any syntax issues there right off. I do wonder what you are using surface speed for though. You also have to realize that if you cut your engines when you get an apoapsis of 69k you will never make it out of the atmosphere. You will still be in the atmosphere and your speed will reduce rapidly. Also 69k is still in the atmosphere. It doesn't end until 69500.

I would be more apt to try.

 when altitude > setAlt then doSomething.

Altitude works just fine. It's how the launch script on the front page works. Surface speed probably should too if you set it based on the rocket. I would suggest verticalspeed over surfacespeed though.

Once you hit your target apoapsis and shut down, you will lose speed and the apopapsis will drop. You will need to goose the engine a bit to keep your apoapsis at the set height until you get out of the atmosphere.

Say you were shooting for an apoapsis of 80k. You will need to do something like this.


until altitude > 69500
{
if apoapsis < 80000 { lock throttle to 0.1. }.
if apoapsis > 80000 { lock throttle to 0. }.
}.

The loop will break when you get out of the atmosphere and then you can prepare for your circ burn.

EDIT:

OHH I think I know what your problem is. You still have power when you go to wait for apoapsis? I think you might be running out. Does the kOS screen go blank?

Edited by Payload
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...