bitzoid

[Tool] KRP: Kerbal Rapid Prototyping

Recommended Posts

Hi there.

I wrote a small tool to allow for rapid prototyping of rockets before actually building them, as I like to tinker with the components until I get just the dv and accelearation per stage I want. Although I play without mods, I believe this does something similar to KER, but without the need to actually build the rocket.

As the tool was getting more and more useful to me, I thought maybe other people might like it. So I made it public (and FOSS) and uploaded it to gitlab. I would love to get some feedback. It runs on python3 and I tested it under GNU/Linux, but I don't see why it shouldn't run on Windows/Mac.

 

At its core it consists of a rather intuitive language for speciying staged rockets:

1t + t400 + reliant, 200kg + 2*rocko64 + mainsail

(That's a stage 0 of 1t payload, an FL-T400 liquid fuel+oxigen tank and a LV-T30 Reliant engine, on top of a Stage 1 with 0.2t additional payload, two Rockomax Jumbo tanks and a Mainsail)

It then prints all stats I found useful about the rocket (such as delta-v). There is a comprehensive README with more information, oh and it has auto-complete so you don't have to memorise all component names.

 

This is what the output looks like for a rocket I built to go to Jool and back again:

example_jool_output.png

 

Also, I'm new here, btw. Hi to all.

  • Like 4

Share this post


Link to post
Share on other sites

Welcome to the forums! Looks interesting - I've downloaded but not sure if I'll get a chance to look at it or not.

Share this post


Link to post
Share on other sites
On 12/21/2018 at 10:05 PM, wasml said:

Welcome to the forums! Looks interesting - I've downloaded but not sure if I'll get a chance to look at it or not.

I'd certainly appreciate feedback. I'm currently implementing a .craft parser for it because I was bored in the train. Because why not?!

 

If you already downloaded the krp.py file, you're basically done, because there isn't the need to install it. You can start the script directly:

./krp.py t400+terrier

:)

Edited by bitzoid

Share this post


Link to post
Share on other sites

It looks like this add-on is a tool, and so it has been moved to the suforum of Tools Comma Add-on Discussions. 

Share this post


Link to post
Share on other sites

do you mind If I create a shell script installation script that check dependencies and stuff?

p.s. is it python 2 or 3?

Edited by lapis

Share this post


Link to post
Share on other sites
4 minutes ago, lapis said:

do you mind If I create a shell script version of this?

 

I don't mind, and also it's FOSS, so you're free to do so anyway (as long as you share-alike).

But I'm curious: do you have a reason for porting it to a shell? (which one?) Python should be as portable if not more.
You can even invoke it interactively and call `info(parse(' ... '))`.

  • Like 1

Share this post


Link to post
Share on other sites

I meant an installation script for all the required modules and stuff

bash shell

 

Edited by lapis

Share this post


Link to post
Share on other sites

Huh, I didn't even realise there were modules that needed extra installing. Yeah it should definitely say so in the makefile -- my FAIL. Could you tell me which modules you had to include to run it? I could add them to the README and/or Makefile.

However, installing python modules would be system-dependent. If you want to supply a portable install rule/script, feel free to either send me a pull-request or just the diff and I add it to the repository (with attribution).

Share this post


Link to post
Share on other sites

termcolor Is what Is missing, I am going to make an install script that is for people who don't want to build it from source, and so it will add a shell command so you can have the ability to run krp in any directory(well easier at least) by typing krp 

Edited by lapis
  • Like 1

Share this post


Link to post
Share on other sites
44 minutes ago, lapis said:

termcolor Is what Is missing, I am going to make an install script that is for people who don't want to build it from source, and so it will add a shell command so you can have the ability to run krp in any directory(well easier at least) by typing krp 

That's pretty much what "make install" is for even though it doesn't actually install it system wide, yet (because I was to lazy to do that properly, tbh). So it's great if you can provide it. Note however, that there are two .py files by now.

To answer your other question, it needs python3. And perhaps I should add a switch to deactivate colours. Some people hate colours for some reason.

 

Edit: termcolor is no longer mandatory, although very highly recommended. Added python3-termcolor to the README. Thanks lapis.

Edited by bitzoid
  • Like 1

Share this post


Link to post
Share on other sites

So, instead of going to Dres, I released KRP1.4 which can now generate plots of parametised rockets among other features.weird.jpg

 

(Yes, the depicted vessel is maximally useless -- nobody would ever need 13824 ant engines :). It is an example for what you can plot.)

Edited by bitzoid
  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now