Jump to content

[1.0] XT Landertron - Smart Retrorockets for Landers and Spaceplanes v0.08 Oct 10


XanderTek

Recommended Posts

Presenting the XanderTek Landertron!

What's New: Version 0.08 has been updated for KSP 0.25. Landertrons can now be armed from an action group. Also, you can now decouple Landertrons when you're done using them, either from an action group or EVA. Finally, less horrible stuff should happen if you attempt to limit thrust via tweakables.

The idea was to make small SRBs designed to aid with parachute landings, but they actually work pretty well without a chute! Like the Soyuz capsule, they're designed to produce a short powerful burst just before landing to slow you down to a safe speed. The lander in the picture below can freefall from Kerbin orbit and land safely with the Landertrons firing a few seconds before impact.

T8xUhc9.png

Dependencies

  • Bahamuto Dynamics Animated Engines (These models are being used for the Landertron parts. You MUST have the models and textures from this mod in order to see the Landertron parts. Leave everything in the "BahaSP" folder. You can delete the cfgs and plugin if you don't plan to use the original parts.)
  • KAS (required for refueling)

Download Landertron Version 0.08

Please see this post for a 1.0 patch until I have a chance to release a new version

Note:

  • If you're still using the old Landertron parts (pre 0.07) you may want to hang on to them so that you don't lose any crafts. Otherwise remove all previous Landertron stuff and install this.
  • The only instance of Landertron.dll should be in the XanderTek/Landertron/ folder. In particular, if you use the HGR mod you might have an older version in that folder.

3rd Party Mods Using the Landertron Plugin

Home Grown Rockets (SoyJuice command pod)

BobCat Ind. Soyuz&Progress (Soyuz command pod)

Icon Colors

White - Idle

Blue - Armed

Green- Firing

Yellow- Out of power

Red - Going too fast! (the Landertrons lack the delta V to bring you to a stop, or you're pointed in the wrong direction)

Soft Landing

These engines function similarly to parachutes, though far more terrifying to watch. Once armed, they will continually estimate the braking distance required based on your current acceleration, velocity, mass, and orientation. The Landertrons will automatically fire at full throttle once you reach the activation height and have a downward velocity, then harmlessly jettison any excess fuel once the maneuver is complete. It's essentially what MechJeb calls a "suicide burn".

Instructions:

  • Place Landertrons symetrically around your lander with the nozzles facing downwards. Make sure they have enough delta-v to accomplish the task. Thrust should never be a problem. They can be used with or without parachutes.
  • Once in flight, arm the Landertrons by activating their stage or via an action group.
  • Try to shed any horizontal velocity as you descend, or just keep yourself pointed retrograde.
  • Sit back and let the Landertrons do their thing! You can right click on one of them to see an estimate of the height above the ground at which they will activate. Typically they will fire just a few dozen meters above the ground, and bring your lander to a stop just before it touches down.

It's... well... a very Kerbal way to land.

Short Landing

  • Intended for aircraft/spaceplanes.
  • Place these on your spaceplane with the nozzle facing forwards. Its best if their thrust vector lines up with your center of mass.
  • Arm after takeoff
  • As soon as you touch down, the Landertrons will fire until they run out of fuel or your forward velocity halts.

StayPut

  • Keeps you from bouncing when landing.
  • Place around your lander with the nozzles facing upwards. It's probably a good idea to reduce their thrust via tweakables.
  • Arm after takeoff
  • Once you touch down, they will fire until out of fuel. A special safety measure stops the engines if your lander tips over.

Switching Modes

Simply right click on the part while in the VAB/SPH and select the mode you want. The new mode will be applied to all Landertrons in the same symmetry. Soft Landing is default in the VAB, and Short Landing is default in the SPH.

Refuelling

Bring along some spare solid fuel, such as the included hexcan. Go EVA, grab a fuel can (using KAS) and attach it to a Landertron. The can will disappear, and the fuel will be added. Do this for each rocket you want to reuse. The rocket will retract, and the Landertron will be in the staging, ready to be activated again.

Future plans

  • Come up with some simple rules for how many Landertrons are needed (eg. Use 1 Landertron per ton of lander for a safe landing on Kerbin)
  • Balance these with other landing methods. They should be better in some situations and worse in others.
  • More parts and modes
  • ???
  • Profit!

Changelog:
0.08: Updated for 0.25. Action groups, decoupling added. Fix for thrust limits.
0.07c: Fixed folder name
0.07b: Added option to disable refueling via the part cfg
0.07a: Bug fixes for fuel mass calculations and activation height calculations.
0.07: Replaced models with Bahamuto's. Improved activation height calculations. Enabled auto-throttling. Added cfg option to hide in-game options. Reworked refueling.
0.06a: Fixed the Prevent Overheat bug, changed the method of turning the engines on and off, tidied up the code, improved staging after refuel, Landertron defaults to VSL mode in SPH.
0.06: New inline and mega parts. Tweakable heightmultiplier and offset. Color coded icons. Various bug fixes and improvements to the calculations.
0.05a: Changed a few default settings to eliminate bugs
0.05: Added VSL and StayPut modes. Improved calculations when the lander is not vertical. Reassigned parts in the tech tree and moved them to the Utilities tab.
0.04: Added EVA refueling ability and hexcan. Improved calculation when Landertrons are mounted on a slope. Code checks to see if a different mod has altered maxThrust
0.03: Improved the method of calculating height, added more parameters to the cfg, changed Landertron FX
0.02a: Bug fixes. Landertrons on different stages should operate independently now.
0.02: Added an "Activation Height" reading to the right click menu of the part. Improved the method for calculating acceleration. Replaced "offset" with "heightmultiplier" in the part.cfg. Attempted to accommodate more edge cases. Various bug fixes.

Copyright 2014, GNU GPL. A big thanks to TaranisElsu, Fractal_UK, stupid_chris, and the MechJeb team for some very nice code examples that helped me get up to speed, and an extra big thanks to Bahamuto for the wonderful models. There are a few lines of code taken from MechJeb and Bahamuto's animatedengine plugin. I believe I'm in compliance with all licenses.

Edited by XanderTek
Link to comment
Share on other sites

That.. Is actually kinda cool. Great for escape probes!

EDIT: Doesn't it need a plugin to function?

The .dll is included in the download. Escape pods sounds like a good use. I'll have to try it out on that SPACETECH one when I have a chance.

Link to comment
Share on other sites

Did you include the source in the download? It would be a shame to see this taken down due to missing source. It's pretty genious, actually.

I was planning to release the source but hadn't posted it yet. Didn't realize that was urgent. It's there now, below the main download link.

Link to comment
Share on other sites

If I can get the chance I will see what I can do for you about making a few model ideas.

Thanks! I'd certainly welcome some thoughts on how they should look. They're more or less directional explosives, so they don't necessarily need to look like a typical rocket. On the Soyuz capsule, they're only visible as small holes in the underside of the pod (you can see them briefly in this video). Which is fine I suppose, though not very imposing. At the very least, some black and yellow warning stripes would be nice.

I like the radial design, because it makes it easy to select how many you'll need for your specific task. It's not ideal for every situation though. Mounting radials on the Mk1 and Mk1-2 pods is tricky due to the sloped sides. I've been toying around with small bottom mounted ones, but that makes it tricky to attach the rest of the rocket to the lander. Perhaps with tweakables in 0.23 it will be possible to have a single inline part that contains a customizable number of Landertron engines.

Edited by XanderTek
Link to comment
Share on other sites

I've tried many ways of activating this but failed. During descent I activate the stage, and the activation height drops down to zero at about 200 meters altitude but nothing ever fires. I'm not sure what I'm doing wrong..

Hmm... the activation height is the distance above the ground where the engines will fire. It should never be zero if you're falling with any significant speed. Falling at terminal velocity on Kerbin, I usually have an activation height around 30m. Are you using a parachute as well? It's possible you're travelling downwards so slowly that the Landertrons are never needed. Also, please make sure you have the latest version (0.02a), as there were some bug fixes in there.

I apologize about any Kerbals who died in the testing process :( If you upload your craft file I'll take a look at it and see if I can figure out what's going wrong.

Edited by XanderTek
Link to comment
Share on other sites

Thanks! I'd certainly welcome some thoughts on how they should look. They're more or less directional explosives, so they don't necessarily need to look like a typical rocket. On the Soyuz capsule, they're only visible as small holes in the underside of the pod (you can see them briefly in this video). Which is fine I suppose, though not very imposing. At the very least, some black and yellow warning stripes would be nice.

I like the radial design, because it makes it easy to select how many you'll need for your specific task. It's not ideal for every situation though. Mounting radials on the Mk1 and Mk1-2 pods is tricky due to the sloped sides. I've been toying around with small bottom mounted ones, but that makes it tricky to attach the rest of the rocket to the lander. Perhaps with tweakables in 0.23 it will be possible to have a single inline part that contains a customizable number of Landertron engines.

Alright. I am working on a part for the airship mod but I will take a shot at this as soon as I can.

Link to comment
Share on other sites

It was the parachutes. I tried the same probe without deploying the chutes and it worked awesome. Thanks for the help!

Good, I'm glad you got it working. The Landertrons really should have been firing even with a parachute though. I dug into the issue some more and came up with a better way to perform some of the calculations. In the new version 0.03, they should fire so long as your descent speed is greater than 1 m/s.

Video of them in action? That would be nice.

Sure. I just added one to the original post.

Edited by XanderTek
Link to comment
Share on other sites

This is a very cool mod. Thanks for making it.

In my tests so far, it's working, but it is pretty nerve wracking.

I have a couple of questions:

Would it be possible to factor in the attachment angle of the landertrons? Specifically, this would allow easier placement on command capsules that aren't cylindrical, but rather conical.

Do the landertrons take in to account mods like KIDS? In other words, do the landertrons base their thrust calculations on the current thrust they actually can produce, or do they assume that they will produce their maximum thrust at all times? If you aren't familiar with KIDS and similar mods, they adjust the output thrust of engines based on ISP. KSP normally adjusts fuel consumption based on ISP. If it is the case that the calculations assume max thrust, would it be possible to pull the actual thrust value from the game engine rather than assuming full thrust?

Thanks again for this great mod.

Link to comment
Share on other sites

This is a very cool mod. Thanks for making it.

In my tests so far, it's working, but it is pretty nerve wracking.

I have a couple of questions:

Would it be possible to factor in the attachment angle of the landertrons? Specifically, this would allow easier placement on command capsules that aren't cylindrical, but rather conical.

Do the landertrons take in to account mods like KIDS? In other words, do the landertrons base their thrust calculations on the current thrust they actually can produce, or do they assume that they will produce their maximum thrust at all times? If you aren't familiar with KIDS and similar mods, they adjust the output thrust of engines based on ISP. KSP normally adjusts fuel consumption based on ISP. If it is the case that the calculations assume max thrust, would it be possible to pull the actual thrust value from the game engine rather than assuming full thrust?

Thanks again for this great mod.

Glad you like it. And yeah, definitely nerve wracking!

Angled Landertrons should be possible. It just requires some additional vector math that I haven't gotten around to figuring out yet. It does present some problems though: Surface mounting objects on those sloped pods often causes them to be angled in more than one axis, which could cause your lander to spin like crazy as it brakes (ok, that might be kinda fun...). Also, a significant amount of the rocket fuel would be wasted with the opposing rockets fighting against each other, which might make it a lot harder for the user to select the appropriate number of Landertrons. I'm still considering a good way to deal with this. A mounting plate that sits above or below the capsule might make more sense.

Currently, Landertrons assume they will be firing with the thrust listed as maxThrust in the part.cfg. I think I need to make this assumption because the calculation has to be run before the engines start up. Once they fire, I'm no longer doing thrust calculations, just waiting for the appropriate shutoff height/speed. Depending on how this KIDS mod works, I may be able to grab a number from it. Do you have a link? Googling "ksp kids" brings up nothing useful :P

Link to comment
Share on other sites

Glad you like it. And yeah, definitely nerve wracking!

Angled Landertrons should be possible. It just requires some additional vector math that I haven't gotten around to figuring out yet. It does present some problems though: Surface mounting objects on those sloped pods often causes them to be angled in more than one axis, which could cause your lander to spin like crazy as it brakes (ok, that might be kinda fun...). Also, a significant amount of the rocket fuel would be wasted with the opposing rockets fighting against each other, which might make it a lot harder for the user to select the appropriate number of Landertrons. I'm still considering a good way to deal with this. A mounting plate that sits above or below the capsule might make more sense.

Currently, Landertrons assume they will be firing with the thrust listed as maxThrust in the part.cfg. I think I need to make this assumption because the calculation has to be run before the engines start up. Once they fire, I'm no longer doing thrust calculations, just waiting for the appropriate shutoff height/speed. Depending on how this KIDS mod works, I may be able to grab a number from it. Do you have a link? Googling "ksp kids" brings up nothing useful :P

Here's a link for KIDS: http://forum.kerbalspaceprogram.com/threads/52882-0-22-Kerbal-Isp-Difficulty-Scaler-v1-2

There's a simpler, older mod that has the same functionality. It might be easier to work with: http://forum.kerbalspaceprogram.com/threads/37251-0-20-2-Project-Arcturus-Thrust-Corrector-Remission-and-Range-Safety?highlight=arcturus

I assume that there must be some way to pull the existing thrust prior to firing the engines because MechJeb and Engineer both produce correct numbers. Here's a link to Kerbal Engineer. Perhaps you could check the code to see how they adjust for the ISP: http://forum.kerbalspaceprogram.com/threads/18230-0-22-Kerbal-Engineer-Redux-v0-6-1-4

Any chance of a liquid fueled equivalent? I only ask because I'd like to use this kind of system but have multi-landing capability.

Thanks again for the mod.

Link to comment
Share on other sites

Ok, so with both KIDS and Arcturus it looks like they're constantly modifying the value of maxThrust. At least I think that's what's going on, I am new to KSP coding and KIDS is a pretty sizable program. That's the same variable I'm messing around with, and I suspect the result is that the Landertrons will fire as soon as they're armed. I'll see if I can find a different method for preventing the Landertrons from firing early. Have you tried using KIDS and my mod at the same time? It should be very obvious if the they're not working together.

The landertron module in the part.cfg should work on any engine. Currently they explode on shutdown, but I can make that optional. There may still be an issue engines that are slow to rev up, but in principle it should work fine on a liquid rocket. As far as reusability, it might be tough to get the Landertrons back into a later staging... I'll have to think about that.

Currently, you can have multiple sets of landertrons on different stages and they will operate independently. This should make it easy to do a few landings with the same pod, though it won't help if you're looking for a long term solution that gets refueled periodically. I'm not sure about actually adding a liquid fuel engine to the pack. Feels a bit overpowered. But I'll try to at least support the functionality in the plugin.

Link to comment
Share on other sites

Ok, so with both KIDS and Arcturus it looks like they're constantly modifying the value of maxThrust. At least I think that's what's going on, I am new to KSP coding and KIDS is a pretty sizable program. That's the same variable I'm messing around with, and I suspect the result is that the Landertrons will fire as soon as they're armed. I'll see if I can find a different method for preventing the Landertrons from firing early. Have you tried using KIDS and my mod at the same time? It should be very obvious if the they're not working together.

The landertron module in the part.cfg should work on any engine. Currently they explode on shutdown, but I can make that optional. There may still be an issue engines that are slow to rev up, but in principle it should work fine on a liquid rocket. As far as reusability, it might be tough to get the Landertrons back into a later staging... I'll have to think about that.

Currently, you can have multiple sets of landertrons on different stages and they will operate independently. This should make it easy to do a few landings with the same pod, though it won't help if you're looking for a long term solution that gets refueled periodically. I'm not sure about actually adding a liquid fuel engine to the pack. Feels a bit overpowered. But I'll try to at least support the functionality in the plugin.

I am currently running KIDS alongside your landertrons. They still seem to work fine, and they definitely don't fire immediately after arming. The only reason I even brought up the possible issue is that the landings seem kinda hard, but then again, I guess that's maybe just how the landertrons work.

So, in short, the landertrons do work with KIDS. I only assumed, due to the hard landings, that maybe the firing time and start were being calculated based on a maxThrust value that might not be accurate to what the rockets were actually putting out. SO, I assumed that maybe the landertrons were firing for a little too short a duration based on less thrust than they expected.

To be honest, I thought also that a liquid fueled version might be a little overpowered as well. Maybe, rather than adding some kind of overpowered rocket motor, you could make a part that would use existing stage engines to produce the retro-rocket landing. That sounds a bit complicated to me though.

Edited by Desrtfox
Link to comment
Share on other sites

The landing in that video does look a bit rough. Maybe you should have it turn on a bit earlier, and have it throttle down as the pod nears the ground so it doesn't start going upwards.

Solid rockets don't really throttle though, right?

Link to comment
Share on other sites

@Desrtfox

I've looked into it a bit more, and KIDS probably is affecting the landings. I'm working on improving that. Its a bit tricky, because I don't want to sacrifice the normal performance of the Landertrons, which is a very delicate thing. It should work at least somewhat better in the next version. For now, feel free to play around with the .cfg settings (heightmultiplier and offset) to force the Landertrons to fire earlier.

I'll keep thinking about liquid rocket options. While I would like this system to work with any engine, for now I think I'll focus on getting it working with a small selection of parts. It's a lot easier to deal with a few known setups than create something that works with any rocket in any situation. At some point I'd basically just be recreating the MechJeb landing autopilot.

One idea that I rather like is making the part storable and attachable via KAS, so that a Kerbal can get out of the lander and attach a new set of Landertrons. However without part symmetry, that might be a bit too hard to get working. Perhaps something a bit simpler: If the Landertrons didn't explode, and had an EVA option to add more solid fuel, would that satisfy your needs for a reusable lander?

@wasmic

For now, I'm working with the self-imposed restriction that Landertrons are solid fuel rockets, like the Soyuz capsule uses. That means once you start them up they can only fire at full throttle. Normally, SRBs can't be turned off. Here, I explode them when I need them to stop. In either case, there's no way to turn them back on. Yes, this could be a much gentler landing autopilot, but those already exist and that wasn't my main goal. I will keep working on fine tuning the landing process to make it as gentle as I can for this type of rocket. If the Landertrons aren't good enough for you on their own, I suggest adding a small RealChute parachute.

Edited by XanderTek
Link to comment
Share on other sites

@Desrtfox

I've looked into it a bit more, and KIDS probably is affecting the landings. I'm working on improving that. Its a bit tricky, because I don't want to sacrifice the normal performance of the Landertrons, which is a very delicate thing. It should work at least somewhat better in the next version. For now, feel free to play around with the .cfg settings (heightmultiplier and offset) to force the Landertrons to fire earlier.

I'll keep thinking about liquid rocket options. While I would like this system to work with any engine, for now I think I'll focus on getting it working with a small selection of parts. It's a lot easier to deal with a few known setups than create something that works with any rocket in any situation. At some point I'd basically just be recreating the MechJeb landing autopilot.

One idea that I rather like is making the part storable and attachable via KAS, so that a Kerbal can get out of the lander and attach a new set of Landertrons. However without part symmetry, that might be a bit too hard to get working. Perhaps something a bit simpler: If the Landertrons didn't explode, and had an EVA option to add more solid fuel, would that satisfy your needs for a reusable lander?

So, first, good point regarding MechJeb. Perhaps a more universal or even refuelable system might make the current landertrons OP. I wouldn't say that I have a need for a reusable system, it just seemed like the obvious next step. Perhaps though, it's better to leave them one shot, simple systems like they are now. In a way, that's helping them already to not be OP.

Link to comment
Share on other sites

I think that the reusable version, if you make it, should look kind of like the B9 aerospace separatrons but with a "vent nozzle" on the top angled 45° out, and a section along the side that is actually the fuel plug. The thought is that the rocket fires normally until touchdown, and then the vent nozzle pops open. With a much larger opening and no nozzle to speak of, the rest of the fuel burns off at a downright horrible ISP with the downward thrust dropped to almost nothing. (In fact, I think this behavior is preferable even for the one-shot version)

Actually this would be quite useful as we may not have been able to kill all lateral motion. With all the gas venting up and out it would produce a downward force that might be enough to keep all our feet on the ground for that crucial moment while the lander is trying to flip.

If you wanted to get really fancy, you could animate part heat for the nozzle, plug casing, and maybe even the vent nozzle (hell, the seals may not be perfect, and the part could "leak" combustion gas, damaging any part that's in the wrong place at the wrong time, quite kerbal I would say :)).In fact if you wanted that last extra bit of detail you could make the paint on the fuel plug char from the heat, giving a visual indication that it has been spent, and refreshing the texture when it's been refueled and is ready to go again.

An idea I had for placing the nozzles "underneath" the pod becomes easier with the vent valve. Just have a part made so that the vent sits flush against the surface and clip the main body of the part through with the nozzle clipping back out the bottom. That would make it impossible to refuel though, but you could have the vent and plug access both sit flush with the skin if you didn't want to keep that limitation.

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