Jump to content

Throttle Controlled Avionics 1.4.1 [0.90] (5 January '15)


qfeys

Recommended Posts

Due to change of developers, this is no longer the main thread of this mod.

Find the main thread here.

Throttled Controlled Avionics

V1.4

This is the final version

All development will be ceased

This recently developed avionics package will start tweaking the throttle of individual engines to provide a new level of attitude control to rockets and other craft with multiple engines. Above that, it will make sure that your thrust is always neatly balanced towards the center of mass. Now it becomes possible to:

Shoot peaces of art into space

APbKG6k.png?1

Have rockets with engine out capebilities

X6q6tD1.png?1oXLyN4L.png?1

Fly balanced VTOL's

Bc8aLQ9.png?1

And fly absolutly unbalanced VTOL's

HpJaqT7.png?1

You can also fly THIS

gcl5JQz.png?1

Seriously, who designed this thing?!?

Now, new in 1.4:

Reaction control engines detection

Now you can put engines literally all over your vehicle. This system will make sure that only the appropriate engines fire, while all the others will keep stabilizing you.

FL5vFuU.png?1

If you want to try this for yourself, feel free to download it at CurseForge.

Download

Don't use this. Use the link on top to 1.4.1 instead.

Warning: for this mod you need Blizzy78's toolbar. Find it here.

Changes in 1.1:

  • Incorperation of blizzy's toolbar
  • Countious update of the engines
  • and some little things

Changes in 1.2:

  • Save op to 3 different settings
  • A nice indicator in the toolbar that tells you whether TCA is working or not
  • TCA is now standard off
  • And there is an in game manual
  • For other modders: There are now 2 public functions you can call: "public bool IsActive()" and "public void SetActive(bool)". With them you can toggle whether TCA is on or off.

Changes in 1.3, all made by Zenka (Open source FTW):

  • Checks whether engines are ignited or not, so engines that are not yet staged or deactivated buy GUI or actiongroup are unavailable for the calculations.
  • Support engines of the type ModuleEnginesFX (like RAPIERs) along normal engines.
  • Supports parts with multiple engine parts (such as RAPIERs)
  • No longer stops looking for engines after finding an SRB.

Changes in 1.4:

  • Detection of reaction control engines
  • Multiple command pod support
  • Enable and disable TCA with 'y'
  • Will properly disappear on 'F2'
  • Requires electric charge to be present (But will consume non)

With 1.4 the development of this mod ends. This last version took me way to long and at many points I felt like I didn't want to continue. This was my first project that was not a school assignment and I am really happy about it, but now I want it to be finished so I can focus on other things. Maybe you'll see me again later with something else.

If you would like to look at the code, it is on Github here. If you would like to make changes, send me a pm. I should read that at least a couple of times a week.

Much thanks to blizzy78 for the toolbar I could make use of and to Zenka for the 1.3 update.

Also thanks to all the other modders who's code I could look into. I learned a lot from you. (I love open source)

Instructions: Extract the zip. Merge the GameData folder with that one of your KSP install. Be aware you need Blizzy78's toolbar. Find it here.

HINT: The more engines you place, the more your craft is stabilized.

FAQ:

1. How does this mod work?

It first calculates the torque each engine is capable of and when a steering command is given, by yourself, by SAS or by anything else, it adjusts the throttle based on this torque. All throttleable engines should be usible. Also the thrust is assumed on the y-axis of the engine, which might not be true for modded engines. If anyone knows a more elegant solution, let me know. It is also worth nothing that my mod doesn't balances your craft, SAS balances your craft, and my mod picks up SAS.

2. What do the sliders do.

Sensitivity: This sets the aggressiveness of the mod. With this to max, complete engines will completely shut down, even on minor corrections. The minimum does almost nothing to balance things out. I don't know what the ideal amount is, so let me know what your experiences are.

Mean Thrust: This is what the thrust is of all the engines when no control input is given.

  • 100 means that all engines burn max, and when an input is given, some burn less.
  • Less, eg 80, means that thy will standard burn at 80%, and when an input is given, some will thrust less, others will thrust more.This will give you more control.
  • More than 100, eg 120, means that all the engines will thrust at max, and when a small input is given, nothing will change. Only when a throttle change of more than 20% is asked, the engines will react. This might be handy when you think your standard control mechanisms (gimbals, reaction control, control surfaces) are most of the time sufficient.

I hope this clarifies some things and that you may have a lot more fun with it.

For more help, you can consult the in game help (The button with the question mark in the top left of the TCA screen).

Cheers

This file and source code is licensed under creative commons (CC BY-SA 4.0)

Edited by qfeys
Link to comment
Share on other sites

This looks very nice. I look forward to trying it out. I'm curious, does it handle SRB's? By that, I mean does it properly factor in their thrust? Obviously it can't, and shouldn't, alter their throttle, but it would be nice if it will factor in their thrust and adjust any liquid engines accordingly. Also, how does it handle engines with large gimbal ranges?

Link to comment
Share on other sites

This looks very nice. I look forward to trying it out. I'm curious, does it handle SRB's? By that, I mean does it properly factor in their thrust? Obviously it can't, and shouldn't, alter their throttle, but it would be nice if it will factor in their thrust and adjust any liquid engines accordingly. Also, how does it handle engines with large gimbal ranges?

It doesn't handle SRB'x. The way it works is it takes the steering commands and sends them to the engines. So if you engage SAS and light some SRB's, The SAS will send steering commands to sabelise, and these will be picked up by the mod and send towards the engines

will this fubar mechjeb's controls? or ksp interstellar's engines?

As said: The engines will pick up any command send by anything and try to execute the torque. It should work on any part with the module "ModuleEngines" and that can throttle, but I haven't test it on other mods. If someone would, I would like to hear the results.

Link to comment
Share on other sites

This looks SO useful. I'll download it as soon as I finish my current mission.

What you have made is a feature that should have been implemented to the stock game months ago. I take my imaginary hat off to you.

Link to comment
Share on other sites

It needs some simple gui tweaks.

- Some distinction if it is toggled or not (like SAS icon changing colour), prefferably using toolbar plugin (is it possible to change icon ingame?), so the player coudl tell just looking at it without need to activate mod settings window.

- Shortcut key for quick activation.

Link to comment
Share on other sites

Finally somebody makes a simple thrust controller that just works, thank god!

Omg, using this it is possible to create a sort of Asparagus Staging that only ejects one single booster at a time.

Yes but it's pointless because the rest of the engines will then have less effective thrust, which means you will be carrying extra dead weight for thrust you can't use.

Edited by jacobgong
Link to comment
Share on other sites

@jacobgong: true if you drop them on a circular manner

but if you manage to interexchange fuel flow to the opposite sides, you gain because you will drop the booster of the oposite side after.

This can be done using struts and/or not having a main booster on the middle, which is not needed for most smaller ships.

Link to comment
Share on other sites

@jacobgong: true if you drop them on a circular manner

but if you manage to interexchange fuel flow to the opposite sides, you gain because you will drop the booster of the oposite side after.

This can be done using struts and/or not having a main booster on the middle, which is not needed for most smaller ships.

When you drop a booster that is off-centre, regardless of how many other off-centre boosters you have, you will also loose net thrust equivalent to the booster you just dropped, regardless of which booster you drop next. Preferable you will drop the opposite booster next because if you don't, or don't have an even number of boosters, you end up loosing more thrust.

Link to comment
Share on other sites

@qfeys:

This is looking like it would be a perfect pair to my velocity control mod for landing skycranes of any configuration, but it looks like our math calculations don't quite agree.

When I combine the two mods it looks like your calculations are causing mine to think the engines are slightly less powerful then they are by a percent or two.

I think this can be fixed through the two sliders however, but I'm not 100% clear on what they do. What exactly does "thrustfactor" and "Mean Thrust" do? Thrustfactor defaults to 40, but I could move it all the way up to 1096.

If I can figure out some numbers that work, I'm going to recommend this mod in my thread also. I'd also love to be able to show a "TAC Enabled" status on my mod, but that would require you to make your isActive variable public so my mod can see it. (If you don't want to I'll still recommend your mod, I just won't be able to show your mod's status on mine.)

D.

Link to comment
Share on other sites

@qfeys: I have a few KW engines on my first stage that don't seem to be recognized by this plugin. My other engines (Kosmos and AIES) are recognized just fine and the plugin works great.

What is the plugin looking for in the part config to determine if it can recognize and control an engine? (Also, great plugin. Thanks a lot.)

Link to comment
Share on other sites

Two things I'd like:

- Ability to enable the mod per engine, either through Tweakables, Action Groups, or both

- Support for B9 VTOL engines

Omg, using this it is possible to create a sort of Asparagus Staging that only ejects one single booster at a time.

Can someone try doing this and post the results relative to standard symetric ejection Asparagus?

It should be less efficient than dual asparagus, as your engines won't be running at 100% thrust.

Link to comment
Share on other sites

It should be less efficient than dual asparagus, as your engines won't be running at 100% thrust.

I'm sure that there are workarounds to that which wont add that much weight to the craft.

It can only be less eficient if proven, i hardly ever fly with engines at 100% trust, i don't see that as being a big issue.

Also, it will not lose the power of one engine for every other it drops because gimbal.

If i find time, i will test this.

Link to comment
Share on other sites

Okay -- I tried this out. It does indeed work as advertised. Caution for using it on launch, though: because it is throttling engines differentially, in an asparagus configuration this throttling leads to slightly different rates of fuel consumption. Hence one side of your asparagus runs out of fuel before the other, causing the vessel to begin vibrating, potentially violently if you're lucky, and to spin out of control if you're unlucky. This can be fixed by judicious use of TAC Fuel Balancer, but you need to be actively managing it after every staging event to set the next 2 tanks to balance with each other.

Another somewhat of an issue is that in fact this mod gives you SUCH effective control that it can confuse MechJeb into overcorrecting -- has anyone else run into that issue?

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