Jump to content

[1.9-1.10] Throttle Controlled Avionics


allista

Recommended Posts

I'm having issues with TCA and the new heat system... I've used TCA with KSP-Interstellar thermal turbojets for a while. After this new heating system however, I have a problem. Whenever TCA dictates that an engine should reduce its thrust to 0 (ie, in a 4-engine lander craft), instead of reducing the thrust to 0, the engine explodes. I guess that reduces it to 0 but.. if I use the alt-f12 cheat to ignore maximum heat, I see that heat production goes from 100 to 8x10^9 and the temperature of the part goes to double the max temp.. and it does this instantaneously, and only when TCA reduces the throttle to 0.. anyone else see this/have any idea how to fix it?

Link to comment
Share on other sites

Also how do I tune the parameters for engines such as the Interstellar thermal turbojets? ie engines that don't react instantly to throttle inputs.. letting it auto-manage doesn't usually work and it ends up overcorrecting quite a bit and destabilizing the craft :(

Link to comment
Share on other sites

  • 2 weeks later...

I'm running into a problem, I tried to reset a new key to toggle TCA, but it keeps going none.

Also, the text in the instructions window does not wrap and much of it gets hidden.

Edit: I'll just set the keybind in the config.

Edit2: Would it be possible to have it use RCS to kill horizontial velocity?

Edited by smjjames
Link to comment
Share on other sites

So.. still having the trouble with slow-reacting engines such as thermal turbojets/etc ... what settings do I need to change to not have TCA continually overcompensate for engine spooling?

Link to comment
Share on other sites

I'm having issues with TCA and the new heat system... I've used TCA with KSP-Interstellar thermal turbojets for a while. After this new heating system however, I have a problem. Whenever TCA dictates that an engine should reduce its thrust to 0 (ie, in a 4-engine lander craft), instead of reducing the thrust to 0, the engine explodes. I guess that reduces it to 0 but.. if I use the alt-f12 cheat to ignore maximum heat, I see that heat production goes from 100 to 8x10^9 and the temperature of the part goes to double the max temp.. and it does this instantaneously, and only when TCA reduces the throttle to 0.. anyone else see this/have any idea how to fix it?

I can't think of a way TCA can affect this. The only thing it does is it sets the Thrust Limiter. It's the exact same limiter from the engine's context menu that you can set manually. So I bet the problem is in the KSPI turbejets themselves. But you can test it by manually lowering the Thrust Limiter to zero, not using TCA.

I'm running into a problem, I tried to reset a new key to toggle TCA, but it keeps going none.

Also, the text in the instructions window does not wrap and much of it gets hidden.

Edit: I'll just set the keybind in the config.

Edit2: Would it be possible to have it use RCS to kill horizontial velocity?

Thanks for the report. I'll try to manage the help text, though with the Unity's GUI framework it's always obscure how things work and how to obtain the desired result :confused:

As for the key binding: it's a known problem which I still cannot reproduce, so I guess it's a some kind of OS-Unity-Locale combination or such. Right now TCA should output some debug messages when you're trying to change the key. So I would ask you to try it once more and to publish the output_log.txt after that.

I'm thinking about some way to incorporate RCS thrusters as well, but they are not engines: the have completely different programming behind them and you cannot change their thrust at will without cheating (e.g. the one that MechJeb uses).

In any case, using any engines to kill horizontal speed implies considerable changes in TCA main computations, as you will need to optimize not only torque, but also thrust (both direction and magnitude).

well, that answers my question about the slow engines. hopefully it works with the Interstellar engines as well as the stock jets :) just updated to 2.3.0, will try it soon.

I hope it does :)

Sorry for not answering right away. I was on vacation and after that had worked on the new release.

Link to comment
Share on other sites

As for the key binding: it's a known problem which I still cannot reproduce, so I guess it's a some kind of OS-Unity-Locale combination or such. Right now TCA should output some debug messages when you're trying to change the key. So I would ask you to try it once more and to publish the output_log.txt after that.

I don't know why I didn't post an output log the first time, just didn't come to mind. Anyways, tried it again on the cleaner branchoff KSP and the log spammed out this line: "[TCA] TCA Selecting Key: Repaint, is key False, key code None".

Output log: http://sta.sh/0d6xv0ao7tf

As for the OS-Unity-Locale thing: Windows 8.1, whatever Unity KSP is using, not sure what you're asking specifically for locale, but west coast US if it matters.

Edit: How do I get TCA to work in space? Would be great if it were possible to balance this while in space:

screenshot106_zps6w4ewoqx.png

Edited by smjjames
Link to comment
Share on other sites

I don't know why I didn't post an output log the first time, just didn't come to mind. Anyways, tried it again on the cleaner branchoff KSP and the log spammed out this line: "[TCA] TCA Selecting Key: Repaint, is key False, key code None".

Output log: http://sta.sh/0d6xv0ao7tf

As for the OS-Unity-Locale thing: Windows 8.1, whatever Unity KSP is using, not sure what you're asking specifically for locale, but west coast US if it matters.

Edit: How do I get TCA to work in space? Would be great if it were possible to balance this while in space:

http://img.photobucket.com/albums/v214/smjjames/screenshot106_zps6w4ewoqx.png

Thanks a lot! With this log I've finally nailed it.

And I suspect it is indeed the OS-Unity thing, because, unlike in other cases where Unity provides KeyCode with key-down event, in your case I get the None KeyCode and the character in ASCII that was pressed.

So I've wrote a workaround that detects this situation and tries to convert the character to the KeyCode. Unfortunately, it is easy to do with the alphabet characters, but converting other keys would require another two pages of code to manually map the characters to the code names (e.g. the '/' to 'Slash').

Here it is: https://github.com/qfeys/ThrottleControlledAvionics/releases/download/v2.3.0/ThrottleControlledAvionics.dll

Please, do try it and tell me if it works for you.

- - - Updated - - -

Edit: How do I get TCA to work in space? Would be great if it were possible to balance this while in space:

http://img.photobucket.com/albums/v214/smjjames/screenshot106_zps6w4ewoqx.png

TCA works perfectly in space.

The only options that are not available there are Vertical Speed Control and Kill Horizontal Velocity. For obvious reasons of not having either vertical or horizontal velocities :D

Link to comment
Share on other sites

Thanks a lot! With this log I've finally nailed it.

And I suspect it is indeed the OS-Unity thing, because, unlike in other cases where Unity provides KeyCode with key-down event, in your case I get the None KeyCode and the character in ASCII that was pressed.

So I've wrote a workaround that detects this situation and tries to convert the character to the KeyCode. Unfortunately, it is easy to do with the alphabet characters, but converting other keys would require another two pages of code to manually map the characters to the code names (e.g. the '/' to 'Slash').

Here it is: https://github.com/qfeys/ThrottleControlledAvionics/releases/download/v2.3.0/ThrottleControlledAvionics.dll

Please, do try it and tell me if it works for you.

- - - Updated - - -

TCA works perfectly in space.

The only options that are not available there are Vertical Speed Control and Kill Horizontal Velocity. For obvious reasons of not having either vertical or horizontal velocities :D

You're welcome, and sure I'll take a look at the DLL.

Turns out that it was EXTREMELY poorly balanced (to the point where even TCA and MJ has problems, plus those engines weren't strong enough I guess. In short, it was due to design problems.

Edit: Yes the fix works, and as expected (I guess?) blocks itself when you try to use a non-alphabet character.

Edited by smjjames
Link to comment
Share on other sites

Edit: Yes the fix works, and as expected (I guess?) blocks itself when you try to use a non-alphabet character.

What do you mean by 'blocks itself'? It's intended behavior is to revert things on pressing the wrong key, displaying an on-screen error message.

Link to comment
Share on other sites

What do you mean by 'blocks itself'? It's intended behavior is to revert things on pressing the wrong key, displaying an on-screen error message.

That's what it was doing. I interpreted that as blocking itself from doing something it can't do, like a non-alphabetical character.

Link to comment
Share on other sites

That's what it was doing. I interpreted that as blocking itself from doing something it can't do, like a non-alphabetical character.

Great! :cool:

The fix will be included in the next release. Meanwhile, everyone who experiences this problem may use the patched dll, which is available as a download option in the current release on GitHub.

Link to comment
Share on other sites

I'm thinking about some way to incorporate RCS thrusters as well, but they are not engines: the have completely different programming behind them and you cannot change their thrust at will without cheating (e.g. the one that MechJeb uses).

In any case, using any engines to kill horizontal speed implies considerable changes in TCA main computations, as you will need to optimize not only torque, but also thrust (both direction and magnitude).

I just realized something, you CAN change their thrust, via TweakableEverything! I was tweaking down the combo SAS/RCS part from FTT and realized 'Waaiiit a minute!, it is possible because theres already a mod that does it!' Not really my exact thoughts, just a general realization of 'Wait, the answer is right there!'.

The tweakable gives RCS thrusters the same thrust limit sliders as engines do, so, maybe....

Link to comment
Share on other sites

I just realized something, you CAN change their thrust, via TweakableEverything! I was tweaking down the combo SAS/RCS part from FTT and realized 'Waaiiit a minute!, it is possible because theres already a mod that does it!' Not really my exact thoughts, just a general realization of 'Wait, the answer is right there!'.

The tweakable gives RCS thrusters the same thrust limit sliders as engines do, so, maybe....

Indeed, you can change their thrust simply because it is defined via variable in a part.cfg. What MJ and TE are doing is they dynamically change this value. But from the stock point of view this is cheating, otherwise stock RCSes would have had their own thrust limiters. Their absence indicate (as I see it) the idea that these thrusters have such technical limitation. I.e. they are optimized for short powerful blows with constant thrust, not for continuous but variable thrust.

Still, I will try to figure something out with RCS...

Link to comment
Share on other sites

I am puzzled ... I've downloaded the latest version, but whatever the craft I am using, it kills the thrust levels to 0 while pushing the throttles to 100% ... unless the engine is in manual control. Has anyone experienced something similar?

- - - Updated - - -

Still, I will try to figure something out with RCS...

How about pulse width modulation? If you PWM the RCS over a total cycle of say 0.5 seconds, that could work...

Link to comment
Share on other sites

I am puzzled ... I've downloaded the latest version, but whatever the craft I am using, it kills the thrust levels to 0 while pushing the throttles to 100% ... unless the engine is in manual control. Has anyone experienced something similar?

It pushes throttle to 100% when you enable Vertical Speed Controll with Main Throttle option. In that case, you need to set some positive vertical speed for engines to begin their work.

How about pulse width modulation? If you PWM the RCS over a total cycle of say 0.5 seconds, that could work...

Yep, that was the first thing I thought about. The implementation, however, is not trivial, because currently all TCA calculations are performed in one physical frame.

Link to comment
Share on other sites

The implementation, however, is not trivial, because currently all TCA calculations are performed in one physical frame.

How about using an average of the last 10 physical ticks? It would only prevent RCS PWM for a very short period on initial vessel load.

Link to comment
Share on other sites

How about using an average of the last 10 physical ticks? It would only prevent RCS PWM for a very short period on initial vessel load.

Thanks)

I'll think it through when I start to work on it :rolleyes:

Link to comment
Share on other sites

Ok I just tested with a craft in the SPH instead of the VAB... I think I misunderstood the purpose of this mod ... This mod does not seem to balance correctly vertically launched vehicule stacks (like Buran / STS) ... Right?

Link to comment
Share on other sites

Ok I just tested with a craft in the SPH instead of the VAB... I think I misunderstood the purpose of this mod ... This mod does not seem to balance correctly vertically launched vehicule stacks (like Buran / STS) ... Right?

Well, it should. I haven't tested it with Buran, but others did and reported that it worked well. Could you describe/show the design of the craft you're using?

Link to comment
Share on other sites

Ok I just tested with a craft in the SPH instead of the VAB... I think I misunderstood the purpose of this mod ... This mod does not seem to balance correctly vertically launched vehicule stacks (like Buran / STS) ... Right?

Actually, you've just found a bug which I confirm. Without vertical speed control in some circumstances balancing does not work. I'll release the fix ASAP.

Link to comment
Share on other sites

Well, it should. I haven't tested it with Buran, but others did and reported that it worked well. Could you describe/show the design of the craft you're using?

S7C4TSU.png

Here's the description of the issue... This happens with every vertical stack I've used so far, so I made the one above specifically to test the issue. The center engine is in Manual Control. The 3 RAPIERs are defined as Main Engines. As soon as I activate TCA, it cuts out all of the Main Engines to a thrust limiter value of 0. However, if I wiggle the Vertical Speed Slider to define a vertical speed then push it all the way to the Set point: OFF setting, it sometimes works to reignite (non-null thrust limiter values) and balances the engines.

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