Jump to content

[1.9-1.10] Throttle Controlled Avionics


allista

Recommended Posts

i'm guessing the vertical speed control doesn't work with one engine?

It should if that engine is in the Main Engine or Balanced Thrust role. Why?

EDIT: I see what you mean. It's not the VSC, it's balancing that doesn't work with a single engine, because, well, you there's nothing to balance it with. I'll try to work around this somehow, but generally TCA works better with many engines; otherwise many steering vectors will lead to an inconsistent system of equations (that's what the "Engines Unoptimized" status means).

Edited by allista
Link to comment
Share on other sites

TCA v2.3.0.1 with several fixes for the latest bugs is released.

All download links are in the main post of the thread.

Changelog:

  • Fixed issues with engines' balancing when Vertical Speed Control is disabled.
  • Fixed handling of flameouted engines.
  • Fixed issue with changing TCA key on some OSes.

Link to comment
Share on other sites

How does it behave with MJ and Remote Tech?

I haven't tried it in space or in a non-atmospheric setting yet, but while it does fight MJ a bit when using SmartA.S.S. (or maybe it was just a result of the craft I was using), they behave well with each other in general. I don't use Remote Tech, so I can't answer that one.

Link to comment
Share on other sites

How does it behave with MJ and Remote Tech?

In previous versions there were some issues with using TCA and MJ's smart-ASS because of the indirect feedback loop the formed: in many craft designs this loop was positive and caused ever-increasing oscillations, until the Steering Gain was decreased considerably. But I haven't tested the issue for a long time, so you're welcome to try.

As for RT, I haven't done anything to integrate it, but I check the vessel.IsControllable stock property, so if RT sets it to false somehow, TCA shouldn't work when a vessel is uncontrollable due to RT mechanics. Yet again, you're welcome to test it.

Naturally, I would kindly ask you to post back if you test these things.

Can I use the RCS as maneuver engine?

Not yet. You may use RCS thrusters as usual, but TCA will know nothing about them, so you will need to balance them during construction.

Link to comment
Share on other sites

Few Comments/Questions:

1) Love it. Thank you.

2) Does it optimize the gimbals on engines? I have made a F35 knockoff that has highly gimballed engines (MRS mod I believe, the gimbals on the engines are nuts, I can flip a plane over and fly backwards with them. Think thrust vectoring on the F22), one in a forward mk2 cargo bay, and another in an aft bay. When using "kill Horizontal speed", it ends up going into an oscillating up/down pitch, eventually falling from the sky. It doesn't seem to make use of the gimbals, if it did, it would greatly reduce the amount of pitching required.

3) Another vote for RCS control. Along with #2, RCS plus gimbal usage would probably reduce the amount change required in thrusts, making for smoother flights.

Edited by gargamel
Link to comment
Share on other sites

Few Comments/Questions:

1) Love it. Thank you.

2) Does it optimize the gimbals on engines? I have made a F35 knockoff that has highly gimballed engines (MRS mod I believe, the gimbals on the engines are nuts, I can flip a plane over and fly backwards with them. Think thrust vectoring on the F22), one in a forward mk2 cargo bay, and another in an aft bay. When using "kill Horizontal speed", it ends up going into an oscillating up/down pitch, eventually falling from the sky. It doesn't seem to make use of the gimbals, if it did, it would greatly reduce the amount of pitching required.

3) Another vote for RCS control. Along with #2, RCS plus gimbal usage would probably reduce the amount change required in thrusts, making for smoother flights.

Gimbals are acting independently on control input and there's no way to influence them, except to limit the angle. But TCA re-reads thrust vectors of engines each p-frame, so when ModuleGimbal rotates these, optimization algorithm takes it into account automatically.

The autopilot that kills h-speed also calculates total thrust vector of a craft each frame (so it knows about gimballing), then tries to direct it against h-speed vector to some degree. It uses several heuristics to calculate that degree, namely: current speed, acceleration, available torque from engines, current TWR and moments of inertia of main axes. In order to understand the problem, I'll have to test your craft and crunch some figures for a while.

RCS have the same problem: you can't control them programmatically, they act on control input independently and don't even have limiters. The only thing you can do is to enable/disable them. So in principle TCA could balance them using PWM technique, but that will require a whole lot more computations then is performed now. A simpler option is to balance RCS during construction and then just use translate controls from the autopilot. I'm exploring both paths right now.

Edited by allista
Link to comment
Share on other sites

Does anyone want to test several new features?

:cool:

Here's a BETA version with the following changes:

  • Horizontal Speed autopilot now considers reaction wheels when it calculates its 'attack angle'.
  • Single-engine crafts are 'optimized' differently: if the engine generates no torque, its limiter is set to 100%, otherwise it is set to 0%. This allows to use the Vertical Speed, Horizontal Speed and Altitude autopilots with single-engine balanced crafts.
  • Improved balancing of engines that are almost aligned with the CoM. Such engines are mostly left alone by optimization and thus should have ~100% thrust.
  • Improved Vertical Speed Control for slow engines. No more bouncing.
  • Added Maintain Altitude option with Above Terrain suboption.
    • This is an autopilot that manipulates vertical speed to maintain current ASL altitude.
    • The suboption makes the autopilot use the height from the current terrain (hills, mountains, buildings (yep, they are also 'terrain' in KSP terms)).
    • Using main throttle control you may gradually change the altitude. Using 'full throttle' (default Z) and 'cut off throttle' (default X) you may change the altitude by 10m increments.

Link to comment
Share on other sites

SOunds fun! :cool:

Decided to challenge it with Kerbins mountains and highlands.

screenshot130_zpsrzlinpz7.png

screenshot131_zpsppltgtyf.png

TERRAIN! TERRAIN! TERRAIN!

screenshot132_zpsphrv1tv1.png

TERRAIN! TERR-BOOM!

screenshot133_zpsopiuvqpz.png

screenshot134_zpscg3upegv.png

Other than the fact that 200m might be kind of low, the response time with the ducted fans isn't great.

Edited by smjjames
Link to comment
Share on other sites

SOunds fun! :cool:

Decided to challenge it with Kerbins mountains and highlands.

Other than the fact that 200m might be kind of low, the response time with the ducted fans isn't great.

Thanks!

Well, that is expected: ducted fans should have some considerable response time, right?

Besides, 200m above and 260m/s horizontal speed... let's say you're facing a 20deg slope; then time to crash at level flight is 2.11 secs. Even if you're going up at 10m/s (which is a current limit), it's still seconds...

But the problem noted. I'll think about how to prevent such situations. Either limit the horizontal speed, or increase the vertical speed above the limit.

Edited by allista
Link to comment
Share on other sites

Thanks!

Well, that is expected: ducted fans should have some considerable response time, right?

Besides, 200m above and 260m/s horizontal speed... let's say you're facing a 20deg slope; then time to crash at level flight is 2.11 secs. Even if you're going up at 10m/s (which is a current limit), it's still seconds...

But the problem noted. I'll think about how to prevent such situations. Either limit the horizontal speed, or increase the vertical speed above the limit.

Yea those VTOL fans have a super slow reaction time. They are also long overdue for some balance with the new aero and heat changes.

Link to comment
Share on other sites

Thanks!

Well, that is expected: ducted fans should have some considerable response time, right?

Besides, 200m above and 260m/s horizontal speed... let's say you're facing a 20deg slope; then time to crash at level flight is 2.11 secs. Even if you're going up at 10m/s (which is a current limit), it's still seconds...

But the problem noted. I'll think about how to prevent such situations. Either limit the horizontal speed, or increase the vertical speed above the limit.

If you're going slower, yeah it would work better, and like goldenpsp said, those ducted fans are badly in need of rebalancing.

I had an idea earlier and I have no idea if it's even possible, would it be possible for it to look ahead a distance in order to predict sudden changes in slope?

Also,

YEE-FREAKING-HA! (okay, I know a surface speed of 223.7m/s isn't extremely fast as things in KSP go)

screenshot136_zpsd4rpjpwd.png

And then rapid disassembly a minute (or 20 seconds?, pretty sure it's a minute) later, yes, the kerbals survived the speedboating cockpit.

screenshot137_zpscujsgbr4.png

Link to comment
Share on other sites

I had an idea earlier and I have no idea if it's even possible, would it be possible for it to look ahead a distance in order to predict sudden changes in slope?

Technically it is possible using raycasts (which is relatively cheap, as Unity and KSP do it). I already thought about it, but haven't got to it yet.

- - - Updated - - -

Basically-- you just hit R and they are already *are* maneuver engines... ;)

That was my thought, yea) But still it would be nice to have them balanced all the time. Even with RCS Build Aid it is a pain in the ass to manually balance thrusters. Rocket fuel depletes quite fast and the CoM moves...

Link to comment
Share on other sites

Technically it is possible using raycasts (which is relatively cheap, as Unity and KSP do it). I already thought about it, but haven't got to it yet.

If you decide to add such a capability, I think it would be great if it requires some sort of radar part that uses electricity. (at least as an options - certainly there could be an easy mode that didn't require an additional part).

Link to comment
Share on other sites

If you decide to add such a capability, I think it would be great if it requires some sort of radar part that uses electricity. (at least as an options - certainly there could be an easy mode that didn't require an additional part).

Then the whole "Altitude Above Terrain" thing should be provided with such part. I don't know if I want to add parts development to my current working schedule.

Link to comment
Share on other sites

Then the whole "Altitude Above Terrain" thing should be provided with such part. I don't know if I want to add parts development to my current working schedule.

Yea honestly, we have enough parts in this game. It can already be a challenge keeping part counts down at times.

Link to comment
Share on other sites

Yea honestly, we have enough parts in this game. It can already be a challenge keeping part counts down at times.
Then the whole "Altitude Above Terrain" thing should be provided with such part. I don't know if I want to add parts development to my current working schedule.

True. It was just an idea that popped up in my head and it's easy enough to just nose up when you see incoming terrain rise.

Link to comment
Share on other sites

Then the whole "Altitude Above Terrain" thing should be provided with such part. I don't know if I want to add parts development to my current working schedule.

Well, then maybe the whole radar part idea can wait until someone says, "I want to do a radar part."

Yea honestly, we have enough parts in this game. It can already be a challenge keeping part counts down at times.

pffffff.

(Admittedly, this "pffffff" is coming from a KSP player who only uses one mod that just adds parts, because I just couldn't resist Nertea's .... Mark IV spaceplane bits. Well, then there's also Universal Storage, but I don't really think of it as just a part pack.)

Link to comment
Share on other sites

pffffff.

(Admittedly, this "pffffff" is coming from a KSP player who only uses one mod that just adds parts, because I just couldn't resist Nertea's .... Mark IV spaceplane bits. Well, then there's also Universal Storage, but I don't really think of it as just a part pack.)

I didn't explain myself well enough. IMO we don'e need another "useless" part that only serves to unlock some functionality. It is also the reason I use Mechjeb for all, as I grew tired of having to add the MJ module to ships which served no real purpose other than to increase my part count by 1, given I already had to unlock the MJ functionality via the tech tree.

Link to comment
Share on other sites

I didn't explain myself well enough. IMO we don'e need another "useless" part that only serves to unlock some functionality. It is also the reason I use Mechjeb for all, as I grew tired of having to add the MJ module to ships which served no real purpose other than to increase my part count by 1, given I already had to unlock the MJ functionality via the tech tree.

Ah, I understand your meaning. It's not about how many parts are available, it's how many parts you have to put on your rocket. I can understand that.

Link to comment
Share on other sites

Here's the next

BETA version.

It uses relative, rather than absolute vertical speed when the Altitude Above Terrain is enabled, thus having improved response time of Altitude Control :cool:

It also has a completely rewritten main TCA architecture (modular instead of a single MonoBehaviour), so it may contain some new bugs :confused:

Please, test it as much as possible.

Link to comment
Share on other sites

OK so I'm still having some issues with TCA... when I turn TCA on, my throttle goes to full blast and I can't stop it with throttle inputs. This is new in 2.3.x - I just push "Y" or click ENABLE and it ... does this. Until I check and uncheck "throttle controls vertical speed". Then it kind of goes back to normal although the upper-right button continues to say "vertical velocity control." More puzzling is that when I actually have the "throttle controls vertical speed" *checked*... it doesn't. Doesn't seem to respond to the throttle at all in this mode. So the only way I can get TCA to do anything useful is to enable it, then check and uncheck vertical speed control, then it mostly kinda sorta acts like it did before 2.3 - albeit it IS a bit more stable now.

It should be noted that I'm using thermal turbojet engines (fully upgraded) from the KSP Interstellar Extended mod. It does seem to work better with the engines in closed cycle mode, but they respond quicker in general in that mode so that's likely why. I'm not sure if there's any specific compatibility issues between TCA and KSPIE's engines, but I thought I'd mention it just in case.

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