Jump to content

[Tool] KRP: Kerbal Rapid Prototyping


bitzoid

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.

Link to comment
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
Link to comment
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(' ... '))`.

Link to comment
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).

Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 3 weeks later...
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...