Search the Community

Showing results for tags 'krpc'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements
    • The Daily Kerbal
  • General KSP
    • KSP Discussion
    • Suggestions & Development Discussion
    • Challenges & Mission ideas
    • The Spacecraft Exchange
    • KSP Fan Works
  • Gameplay and Technical Support
    • Gameplay Questions and Tutorials
    • Technical Support (PC, unmodded installs)
    • Technical Support (PC, modded installs)
    • Technical Support (PlayStation 4, XBox One)
  • Add-ons
    • Add-on Discussions
    • Add-on Releases
    • Add-on Development
  • Community
    • Welcome Aboard
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
  • International
    • International
  • KerbalEDU Forums
    • KerbalEDU
    • KerbalEDU Website


  • Developer Articles

Found 6 results

  1. I am trying to build an interface to a control panel that uses joysticks to interface to KSP via the KRPC. I have everything working, reading the joystick values into a raspberry pi, and then having the pi connect to the KRPC server. I am trying to achieve a 10Hz or better rate for the controls. For my python code, I execute the calls on a loop. while(True): GetJoyStick() start = time.time() vessel.control.pitch = joystick_pitch vessel.control.yaw = joystick_yaw vessel.control.roll = joystick_roll vessel.control.thottle y= 1 vessel.control.forward = 0 vessel.control.right = 0 vessel.control.up = 0 end = time.time() print(end-start) I played around with some different settings in KRPC advanced settings in the KRPC interface, the best I could get was 45 RPC/sec. Here is a print statement of time for the update to occur as shown in the code above. Starting Controls/// 0.439182043076 0.435542106628 0.437279939651 0.441950798035 0.443905830383 0.400623083115 0.742579936981 0.438502073288 0.443440198898 0.435302972794 0.439296007156 0.623143196106 0.461045980453 0.442525863647 0.43900513649 0.439331054688 0.47675204277 0.439754962921 I am wondering if this is the best approach that I am taking. For a bank of switches, the rates are fine, but for joystick control, it can be a little laggy. Any help is appreciated. Thanks, Tom
  2. Is there any way to semi-accurately predict where a craft would land? Mechjeb does this and gives a latitude and longitude, but I do not understand how it works. I'm trying to write a script that lands a sub-orbital rocket back on the launch pad in python using kRPC. Also, what would be a good way to steer the rocket onto the launch pad? The standard space plane control surfaces wouldn't work for a rocket in freefall.
  3. I'm writing a python script using kRPC to propulsively land on Kerbin, but I can't find how to calculate the time to impact. Mechjeb and Kerbal Engineer do this, but I don't think kRPC can interact with them. With kRPC I know my current altitude, surface velocity, verticle velocity, horizontal velocity and terminal velocity. Is there an equation that I can use to get the time to impact?
  4. Hello everyone! I want to share with you my project called 'New Kepard'. It was inspired by New Shepard rocket landing: My goal was to recreate it in KSP using the kRPC mod which allows you to write your own scripts to control the vessel. The developement of the project took me much longer than I had originally thought (more than 100 hours). Writing the program which controls the rocket was not the hardest thing. Bugfixing, tweaking, testing and ensuring that the code is prepared for every possible flight scenario was what I spent the most of the time (~75%) on. I am now very happy that I made it to the end and didn't give up. I created two films about my project: The first one was edited to be similar to the original Blue Origin's video The goal of the second film is to show what my project is and how to use it Code and the craft are avaliebe to download on GitHub. I hope you like what I've done
  5. Time to fly rockets with kRPC and Python. I know very little Python and am hoping this will be a fun way of learning the basics. Like how when I was a kid at school and we'd write programs to make the turtle drive around, only with rockets. In future I will make this opening post prettier and more detailed and so on. I just want to get the thread started now My rules: All flight of unmanned vehicles, and most flight of manned vehicles, to be conducted using kRPC. Manual control inputs to be kept to a minimum. To focus on the Python coding, all rockets to be 'off the shelf' - the game's stock craft, craft from KerbalX or this forum, etc. Light non-structural modifications, for example changing science equipment, is allowed. Rossum Program The Rossum Program will be my first steps.
  6. kRPC Question

    Hi everybody! I've been playing with kRPC, and loving the fun of learning how to Python (which is how I justify playing more Kerbal) and have a question that's stumped me the last few days. I have a craft with a central LFO engine, surrounded by decoupler attached LFO booster stacks. I'm looking for a way to determine when the fuel tanks that are radially attached are empty. Currently, I can call resources in a specific stage, which includes the main engine, and I can call object instances of all engines. Neither of those, however, help me, because the total resource level will never equal zero before I need to jettison tanks, and I cannot seem to pinpoint a singular engine instance to test for whether the engine has_fuel. I can test if all the engines have fuel, returning true if any single one still does, which also doesn't get me a usable result. Finally, I've tried to mathematically calculate the usage of propellant based on the stats of the engines, but the central and radial engines are different rates, and I also have vernor engines that differ in consumption, so my attempt to compute a hard time limit on the burn without, of course, first just running the rocket on the stand (which kinda defeats the purpose I'm looking for) failed. Any help is appreciated! Thanks all for any insight, this has been a really good challenge, but I'm breaking down and asking for help. Cheers!