Jump to content

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


qfeys

Recommended Posts

Hi, I still have the issue in TCA 1.2 that it overwrites my predefined thrust factor value for each engine (the build in factor). Could you somehow apply your changes ontop of that thrust factor change?

Fabian

One way it could do this is by examining the thrust limiter values when the rocket is first put on the pad, and remembering those as the "normal" thrust levels for each engine instead of always considering that to be 100%. And if the player modifies a thrust limiter while in flight, it would need a way to recognize that and update the stored value. (It might be best for the player to do such tweaks while the plugin is inactive though!)

Link to comment
Share on other sites

Yeah -- The icon does indicate it's active. and using it with arrow keys or joystick with SAS enabled or not doesn't make much of a difference. The craft's rockets never appear in the mod panel's list. It does also load and save the three different preset options. I'll do some experimenting.

Edit: pulled all mods and it works fine on that same craft. Such fun! :D I'll have to reintroduce them and see what's causing the issue.

Edit: Edit: It looks like HotRockets! was the culprit. It's a phenomenal effects mod, so I hope some means of getting these two to play well is found. :)

The only way to fix this is for TCA to take moduleEnginesFX into cosideration. Currently, it will only work on engines with moduleEngines, but since some engines (including HotRockets!, but also other mods) use moduleEnginesFX, it doesn't register the engines from these mods.

Link to comment
Share on other sites

  • 2 weeks later...

The best way to fix moduleEnginesFX compatibility is to use an "EngineWrapper" class. That way a module can recognize ME or MEFX automatically. See source code of my AJE (signature) or HoneyFox's EngineIgnitor.

Has the author abandoned this project? Can someone take over and do it?

Link to comment
Share on other sites

The best way to fix moduleEnginesFX compatibility is to use an "EngineWrapper" class. That way a module can recognize ME or MEFX automatically. See source code of my AJE (signature) or HoneyFox's EngineIgnitor.

Has the author abandoned this project? Can someone take over and do it?

I wonder that myself. I've done some work inside the mod for my personal purposes. Including supporting moduleEnginesFX support (for the RAPIERS for example).

However, I've done that rather ugly; so the enginewrapper class sounds like a better solution.

I'll see if I can contact qfeys about activity and weather he's ok with me posting my own version.

Link to comment
Share on other sites

I've seen your message and replied. I would like to put your code in the official version.

About the development. I was planning to make a new version in a couple of weeks, but I don't know what features that you all want. So If anybody who knows a cool feature for TCA would post that, I will try to implement it.

Link to comment
Share on other sites

I was wondering (sorry haven't tried it yet).

Does this mod properly control thrust for engines above the center of mass?

I've found the stock game when thrust vectoring side mounted engines above the center of mass, the game thrust your engines in the same direction (should be opposite) as it does when below your center of mass. With reaction wheels turned off, this causes your steering to be reversed.

With thrust control on and and vectoring and reaction wheels off, does this control in the proper direction for above CoM side mounted engines?

Link to comment
Share on other sites

I've seen your message and replied. I would like to put your code in the official version.

About the development. I was planning to make a new version in a couple of weeks, but I don't know what features that you all want. So If anybody who knows a cool feature for TCA would post that, I will try to implement it.

hotkey for toggling tca.

this hotkey woudl also toggle sas on, beause its useless without it.

that woudl make your mod nearly perfect.

Link to comment
Share on other sites

I was wondering (sorry haven't tried it yet).

Does this mod properly control thrust for engines above the center of mass?

I've found the stock game when thrust vectoring side mounted engines above the center of mass, the game thrust your engines in the same direction (should be opposite) as it does when below your center of mass. With reaction wheels turned off, this causes your steering to be reversed.

With thrust control on and and vectoring and reaction wheels off, does this control in the proper direction for above CoM side mounted engines?

As far as I know, the control should not invert above the CoM. An engine placed left of the CoM will give always the same torque, regardless of the height it's placed on. The torque is only dependent of the so called moment arm. (wikipedia)

Link to comment
Share on other sites

  • 3 weeks later...

I made a suggestion to incorporate this functionality as an unlockable research achievement. The same would apply to your mod. Also interested how the two mods interact?

http://forum.kerbalspaceprogram.com/threads/77710-0-23-5-Gimbal-Auto-Trim-1-0-%28April-24%29?p=1117342#post1117342

hotkey for toggling tca.

this hotkey woudl also toggle sas on, beause its useless without it.

that woudl make your mod nearly perfect.

+1.

Edited by colmo
Added quote
Link to comment
Share on other sites

100% Pure Awesome Sauce!

This is the first throttle steering mod that has properly delivered. KCA had arguably better engine control, but lacked in simplicity of use. It also has not been updated and no longer works, so where I was previously left with no solution, now I can use TCA - I may actually start playing some more KSP again...

I was just able to get this test rig flying and TCA handled using either cockpit and switching between them in flight!!

In the front cockpit, the x axis controlled roll, in the top cockpit, x axis controlled yaw. PERFECT!

VKnyuQl.png

(FYI, the front cockpit is the root object.)

I find it is a little twitchy though (as in the throttle controlled pitch / roll etc), and can be slow to react to (actual) throttle changes - anyone else seeing that? Bad settings maybe or just something you have to iron out.

Also, this mod is absolutely epic with my fork of Enhanced Navball (See post after that one for download link). You can use this to add additional prograde/retrograde markers that are rotated by 90 degrees. That way, you can fly a VTOL craft plane style (forward cockpit), but still see the retrograde marker on the navball to assist with vertical landing.

Link to comment
Share on other sites

OK, a few things I have noticed:

The sluggishness seems to only happen when SAS is on - it is with SAS on that I also see the engines strobing their thrust rate a lot.

I tried replicating the above craft in the VAB.

With the root part as the top cockpit, TCA did not work in horizontal cockpit mode when SAS was on. With SAS off, it controlled the engines on OK, but with SAS on it went nuts.

Intersetingly, my fork of Enhanced Navball also does not work properly with a vertical cockpit root part when in the horizontal cockpit.

Link to comment
Share on other sites

>.< Wish my computer with KSP on it wasn't in for repair. This looks fantastic. Sounds like it'll make trying to get slightly unbalanced loads into orbit far less punishing.

One question: Does it play well with MechJeb? MJ has a (really bad) habit of stomping on and completely ignoring steering limits imposed by anything other than itself, including tweakables and FAR's flight controls. If it does though...oh man, that'd make long burns with wonky spacecraft a dream. If not well...guess it's time to do everything manually. ... Ew.

I've been planning on doing a grand tour with a ship that is going to at least be a little wonky, if not severely so. Kinda want it to bring along a spaceplane to bring crew to the surface of every planet and back, but don't really want to stick it on the front of the ship nor have two of the damn things.

Link to comment
Share on other sites

mindstalker & qfeys: What mindstalker is talking about is VECTORED thrust, not parallel axis thrust. It's a terribly old bug in the engine code that nobody at Squad ever bothered to look at. I was complaining about it back in 2012, but soon realized it was a lost cause, and assumed had been fixed when they fixed the screwball PID controller settings. I really wouldn't bother trying to get a fix in now, Squad just doesn't do that kind of stuff.

If I remember right, the idiot code was hardwired into the old engine "Part" code, and apparently just got copypasted into the PartModule scheme. Unless someone has rewritten the thruster classes since I last looked at them, it'll be impossible to dig out the thrust vectoring section, so only solution would be to rewrite the thruster classes from scratch. Lots of problems there, as the GUI dependencies(stack icons/bars/etc) were rolled into a new system that was all marked private, so someone would have to rewrite most of the staging display code as well. Oh yeah, same thing goes for the VAB catalog blurbs. Very glad I gave up modding this game.

Edited by kellven
Link to comment
Share on other sites

Just finally (!!) tried it today, do a great job on poor/"spaceballs :confused: approved :confused:" designs :)

And I got an exception:

ArgumentException: Getting control 1's position in a group with only 1 controls when doing Repaint

Aborting

at UnityEngine.GUILayoutGroup.GetNext () [0x00000] in <filename unknown>:0

at UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0

at ThrottleControlledAvionics.ThrottleControlledAvionics.WindowGUI (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

Which make GUI "not displayed" (I have only the main button, which is drawn over the small question mark one) by default, using hide control mode (F2), I got the window as expected.

KSP 0.23, last toolbar (0.7.1) release, some other mods which may be or not unrelated to the issue.

Link to comment
Share on other sites

I have a feature request: Retro-rockets!

What I would like to be able to is:

- declare some rockets (supposedly pointing the "wrong" way) as retro-rockets

- these would be set to zero trust when TCA has no control inputs

- however, when TCA gets control inputs, they would be used to steer

This would be nice, because as I understand, with TCA in it's current form, you waste giant amounts of fuel when you have active retro-rockets. But without any active retro-rockets, TCA can only balance out a payload as long as it's CoM is inside the silhuette given by the thrust vectors of the engines. With the proposed feature, TCA could balance for a CoM even outside the "thrust-silhuette" by firing the retro-rockets as needed. Of course you waste a bit of fuel at that point, but sometimes you may want to do that to carry a payload on the side of your ship.

For example, the Starfuries from Babylon 5 regularly use their forward thrusters (-> retro-rockets) to steer, and are able to carry big payloads docked to their bottom because of that. (okay, the latter capability is only shown on very few occasions, and I don't remember if they did the CGI "correctly")

Link to comment
Share on other sites

I found quite a funny bug: TCA allow to control ship which has ran out of electriccharge ! Allowing to save it from a deadly crash. Kind of cheating (I see people coming).

Also, the toolbar/display issue has gone (maybe some voodoo kraken in play) but window is always displayed even using F2 key.

Link to comment
Share on other sites

@qfeys, are you working on any of the recent suggestions? If not I can take a look at them.

Things I would like to look at:

-TCA requires power, like SAS does.

-The window should hide when using F2

-Hotkey for toggling TCA (and SAS)

-Awareness and handling with engine facing outward or inverted:

Assigning engines would be quite a hassle. For now I use action groups for such things, but it would be nice of TCA did that for me.

When I look into it, I will try to keep the elegance of the mod intact. Meaning, it will know if engines are facing the wrong way, for it uses that information to determine which engine to use for steering. So it would know if they are no help at forward thrust and disable them.

Same goes for side engines that you could use for giant RCS.

@Colmo, I'm guessing you need to bind TCA to a part to incorporate it to the tech tree. In my mind, TCA _should_ be part of stock SAS. Which, at this point, you get for free as well. I'll make it qfeys' call :P

@evilC. I haven't noticed sluggishness when in SAS, for when you turn, SAS is temporarily disabled. When SAS is on, TCA will use the output of SAS to control the thrusters (much the same like it does with user input).

About changing orientation of the craft mid-flight. It 'should' do fine. I'll take a look at that.

@phoenix_ca: I haven't tried it with MJ, and it depends how MJ controls its crafts. If it generates SAS-output or user-input then it might work.

Also, I started using this mod for a big long range spacecruizer as well, including a snub-spaceplane. Although it is quite unbalanced and impossible to keep pointing in the right direction manually; it flies beautifully with TCA.

About thrusters above CoM, it works for me. TCA does not do anything with the thrust vectoring. So if KSP borges that up, it's up to them to fix it.

@Kelven, there might be quite a few weird things about KSP and its codebase, but don't give up modding it :) The only way is upwards.

Edited by Zenka
Link to comment
Share on other sites

  • 3 weeks later...

Okay, I hadn't been reading this thread for quite some time, and now I've seen that there are enough things to work on. I would actually like to publish it shortly after 0.24 comes out, what seems to be in a couple of weeks. The things I would like to implement are:

  • Close the screen on F2 and activate TCA on hot key (tbd, give your suggestions)
  • Set the standard throttle of engines with "very wonky" directions to be 0, so they are only used for steering. I am thinking to use a slider to determine the "wonkyness".
  • About using power, I'm not quite sure. TCA doesn't have any "moving parts" so to speak, so the actual power usages would be minimal. Also using power is a part property, and I'm trying to stay away from parts. What I might be able to do is check if there is any electric charge available. no charge is used, but if the computers shut down, all engines go to 100%, unless the steering engines, who go to 0%. Please give feedback on this idea.
  • I had also been thinking of placing TCA in the tech tree. I would put it on "Flight control". I'm not yet sure if I can do this, but please discuss.

To be clear, I have not given up on development, I was just waiting on 0.24 as I thought that is was coming out soon. All your feedback is welcome. If there are any more idees you would like to see, please leave it here.

Also I will right now transport TCA to curseForge.

qfeys

Link to comment
Share on other sites

Didn't know about this mod until now and will try it immediately since it sounds amazing.

Please keep going with it!

I've seen in the help text that you calculate everything from the root part instead of the current command part. Don't know if that's still true. If not please ignore the following.

What came to my mind was that maybe vessel.GetTransform().up/left/forward could help if you only need the current vectors (I think it's based on current command part)? Anyway, since I have no idea what I'm doing you maybe could ask the MechJeb team since they seem to have sorted that out somehow?

Edited by marce
Link to comment
Share on other sites

Thanks for the update.

So the upshot of what you talked about RE: "wonkyness" would mean that TCA would not use those engines for thrust, only maneuvering? (ie a rocket RCS).

If so, great! I tried doing such a thing but it did not end well :)

If you are looking to make improvements there, I think there are things that could be done along a similar lines to make jet VTOLs more feasible.

Most jet engines do not spin up and down quickly enough and so TCA has problems dealing with this - I was thinking if you could keep a small number of bigger jets spooled up all the time to maintain height, but designate some smaller engines that will fluctuate more rapidly to only control rotations / translations, then things could work a lot smoother.

So maybe:

"non-wonky" (ie full down) = use this engine for main thrust

"partly wonky" (ie diagonal down) = augment thrust but mainly control

"totally wonky" (ie side mounted) = control only

Also, anything you can do to allow you to switch between horizontal pod and vertical pod (ie use current pod as mentioned above instead of root part), that would be great!

This combined with PWB Fuel Balancer to keep your CoM at a designated point is going to be such a killer combo!

Link to comment
Share on other sites

This combined with PWB Fuel Balancer to keep your CoM at a designated point is going to be such a killer combo!

Oh! That sounds even better than the TAC balancer. Such logic! :)

And ironically enough, Throttle Controlled Avionics would mean you *don't* need to balance the fuel as well, the throttles are adjusted for the wonky CoG shifts... ;)

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