Jump to content

[1.9-1.10] Throttle Controlled Avionics


allista

Recommended Posts

  • 2 weeks later...

Hi, Does anyone know how TCA could be implemented into Firesplitter modules?? Im not very good at reading code, but from what the cfgs state, TCA 'Engine Info' is added to engines with modules: ModuleEngine*(such as ModuleEngineFX) and TCA EngineInfo Module is added to parts with ModuleCommand. Im not too familiar as what Engine Info does and how it aids TCA. the TCAModule kinda stumps me as its added to parts with ModuleCommand. So if anyone could help me out that would be superb! The source code is rather confusing to me..

FireSplitter contains different engine modules such as: 

MODULE
{
    name = FSplanePropellerSpinner

and 

MODULE

{
    
    name = FSengineBladed
 

Link to comment
Share on other sites

  • 1 month later...

Need some help here.

I'm making an MMU, which consists of a command seat with monoprop in front and back, and rcs jets on both.  The monoprop in front is small (0.675) and the one in back is 1.25.

First, I had to put an engine on it, even though it isn't needed (an Ant), otherwise TCS wasn't being activated.

Second, while I can see that it is adjusting the thrust limiter of the ones in front, it's not doing a good job, when translating it still rotates because of mismatched thrust.

I can balance this in the VAB using RCS Build Aid, but am wondering why I need to put an engine on, and more importantly, why it isn't balancing.

Thanks in advance

Link to comment
Share on other sites

how to re-enable modules? 

i have a craft that when launched all the modules were green and everything worked fine.. since then it arrived to duna and there has been a couple updates.. now all the modules are yellow and nothing works. clicking on them wont turn them green.

unfortunately without tca the craft wont land because i am using tca for the vtol and landing.

 

Edited by aaronsta1
Link to comment
Share on other sites

On 1/9/2019 at 4:08 PM, linuxgurugamer said:

Need some help here.

I'm making an MMU, which consists of a command seat with monoprop in front and back, and rcs jets on both.  The monoprop in front is small (0.675) and the one in back is 1.25.

First, I had to put an engine on it, even though it isn't needed (an Ant), otherwise TCS wasn't being activated.

Second, while I can see that it is adjusting the thrust limiter of the ones in front, it's not doing a good job, when translating it still rotates because of mismatched thrust.

I can balance this in the VAB using RCS Build Aid, but am wondering why I need to put an engine on, and more importantly, why it isn't balancing.

Thanks in advance

Following up on this, I'm finding that TCA is not doing anything to balance the RCS.  I just tested with a pretty balanced shuttle (the fore is slightly more powerful than aft), and when trying to translate, the shuttle slowly start rotating.

I looked at TCA in the editor, and also reread the manual, which says:

Quote

###RCS balancing

If a vessel has RCS thrusters (and RCS is enabled), TCA automatically tries to change their thrust limiters, so that the torque generated conformed to the control input. In particular, when only translational controls are used, TCA tries to eliminate or at least minimize the undesired torque. Note, that with some physically unbalanced ship designs this may effectively disable RCS thrust almost completely.

so what do I need to do to get this to work properly?

Link to comment
Share on other sites

  • 2 weeks later...

@linuxgurugamer I've had that RCS problem ever since TCA 2.0 came out - the old version didn't touch the RCS thrust limiters at all, and for me, was more functional than the way it works now.  I do not believe the system can be defeated.
 

@allista assuming you're still maintaining this.. hm.. perhaps my issues stem from the fact that this mod is still listed as 1.4.5 max - I'm having issues on older ships in orbit, when refocused, TCA is disabled (the TCA toolbar icon goes to the 'book', and clicking it opens the manual, not the TCA window), and it *destroys* the framerate.  Relaunching the same ship works fine, this is only for things that have been up there a while.  Using any non-physics timewarp factor fixes the framerate mostly.. hm. didn't see the 1.4.5 limit on the forums/CKAN.  Perhaps I will try recompiling TCA against the 1.6.1 DLLs and see if that helps.  Hopefull you're still around, this is a great mod and I hope it continues :)

This is the error TCA is throwing:

[ERR 21:54:53.161] Exception handling event onVesselWasModified in class ModuleTCA:System.ArgumentException: An element with the same key already exists in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.String,ThrottleControlledAvionics.ModuleTCA].Add (System.String key, ThrottleControlledAvionics.ModuleTCA value) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.ToDictionary[ModuleTCA,String,ModuleTCA] (IEnumerable`1 source, System.Func`2 keySelector, System.Func`2 elementSelector, IEqualityComparer`1 comparer) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.ToDictionary[ModuleTCA,String] (IEnumerable`1 source, System.Func`2 keySelector, IEqualityComparer`1 comparer) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.ToDictionary[ModuleTCA,String] (IEnumerable`1 source, System.Func`2 keySelector) [0x00000] in <filename unknown>:0 
  at ThrottleControlledAvionics.ModuleTCA.set_TCA_Active (IShipconstruct ship) [0x00000] in <filename unknown>:0 
  at ThrottleControlledAvionics.ModuleTCA.check_priority () [0x00000] in <filename unknown>:0 
  at ThrottleControlledAvionics.ModuleTCA.onVesselModify (.Vessel vsl) [0x00000] in <filename unknown>:0 
  at EventData`1[Vessel].Fire (.Vessel data) [0x00000] in <filename unknown>:0

 

anyone have any ideas/seen this before?  I did do a full recompile of the mod against 1.6.1, it made no difference.

Edited by ss8913
Link to comment
Share on other sites

  • 4 weeks later...
On 1/14/2019 at 5:12 PM, linuxgurugamer said:

Following up on this, I'm finding that TCA is not doing anything to balance the RCS.  I just tested with a pretty balanced shuttle (the fore is slightly more powerful than aft), and when trying to translate, the shuttle slowly start rotating.

I looked at TCA in the editor, and also reread the manual, which says:

so what do I need to do to get this to work properly?

Don't take me wrong when i say this, @allista was online last on 10th jan. around a month now, maybe this is a call for at least a non official release again by your capable hands ;)

Link to comment
Share on other sites

8 minutes ago, Jiraiyah said:

Don't take me wrong when i say this, @allista was online last on 10th jan. around a month now, maybe this is a call for at least a non official release again by your capable hands ;)

Ummm, no?

I'm already in the middle of working on OSE Workshop and Kerbal Construction Time, I really don't have time for any others.

Link to comment
Share on other sites

2 minutes ago, linuxgurugamer said:

Ummm, no?

I'm already in the middle of working on OSE Workshop and Kerbal Construction Time, I really don't have time for any others.

man, considering how many mods you are maintaining and how fast you reply to forums, I should say, no wonder you reject, even a programming robot would be ashamed of himself if he was compared to you.

Link to comment
Share on other sites

3 minutes ago, Jiraiyah said:

man, considering how many mods you are maintaining and how fast you reply to forums, I should say, no wonder you reject, even a programming robot would be ashamed of himself if he was compared to you.

yes, well, I said the same think about KCT.  But this one is right now, outside of my consideration

Link to comment
Share on other sites

  • 4 weeks later...
On 3/17/2019 at 3:52 PM, asgeraj said:

Will you update this mod to 1.6.1?

It seems to be working ok for me. At least, T-SAS, orbital autopilot and to-orbit are working -- I haven't unlocked landing or ballistic hop yet. In general, though, anything using rockets seems to be fine.

It does seem to have some issues with VTOL jets; with Wheesleys it's very sluggish and often badly overshoots target altitudes, so a great deal of care is needed to not pancake, and with Panthers it immediately starts oscillating back and forth until it eventually cartwheels and then plummets into the ground, as if it's badly overcorrecting when attempting to level the craft. I'm not sure if this is an issue with 1.6.1 specifically or with TCA more generally, though, I've never used it with Panthers before.

Link to comment
Share on other sites

So far the only thing I've really got to work perfectly is the Manuever Auto pilot in space.  Even though TCA doesn't force gimbal the engines into the COM, it can still handle a shuttle with little problems and very little "Chasing the rabbit".

 

Course that's my next request:  Force the gimbal of an engine group into the COM, and then read that thrust trajectory to point the craft in the proper direction.  That way you don't have to throttle engines down to maintain balance, but this might be key for just shuttles.

Link to comment
Share on other sites

1 hour ago, ToxicFrog said:

It seems to be working ok for me. At least, T-SAS, orbital autopilot and to-orbit are working -- I haven't unlocked landing or ballistic hop yet. In general, though, anything using rockets seems to be fine.

It does seem to have some issues with VTOL jets; with Wheesleys it's very sluggish and often badly overshoots target altitudes, so a great deal of care is needed to not pancake, and with Panthers it immediately starts oscillating back and forth until it eventually cartwheels and then plummets into the ground, as if it's badly overcorrecting when attempting to level the craft. I'm not sure if this is an issue with 1.6.1 specifically or with TCA more generally, though, I've never used it with Panthers before.

This is actually normal. Most jets aren’t responsive enough to use for VTOL applications, unless it’s specifically made for it.  Wheesleys in particular are a terrible option, no where near responsive enough. 

TCA works pretty much flawlessly for me in 1.6.1. I had to do some cleanup in a few of the CFG files after rooting around in the log, but now it seems to work fine. 

Link to comment
Share on other sites

3 hours ago, MaxPeck said:

This is actually normal. Most jets aren’t responsive enough to use for VTOL applications, unless it’s specifically made for it.  Wheesleys in particular are a terrible option, no where near responsive enough. 

TCA works pretty much flawlessly for me in 1.6.1. I had to do some cleanup in a few of the CFG files after rooting around in the log, but now it seems to work fine. 

The "TCA3 New Features" video in the OP uses Wheesleys to good effect. I've found them usable, if not as responsive as they seem there, as long as I take some care -- ascend or descend slowly, and make sure my entire course is above any obstacles in my path, i.e. don't ask it to do sudden altitude changes. They definitely handle worse than rockets, though. The main incentive for using them is that it's very easy to build a plane that can run them continually at max throttle for hours -- you can't do that with rockets.

Panthers are a total deathtrap, I'm not sure if the thrust response is even slower than Wheesleys or if the thrust increases as they swing through the air (IIRC at least some jets do that), but trying to balance a vehicle on Panthers guarantees the death of everyone on board.

I think my next attempt is going to be a VTOL supersonic transport -- use TCA to take off, then MechJeb to fly to the destination, then TCA to stop and land, using Panthers for the cruising engines and Wheesleys for the takeoff/landing engines. Unless TCA can handle the cruising mode as well? Then I wouldn't even need MechJeb.

Link to comment
Share on other sites

I’ve had pretty good success doing that, although I use Kramax instead of Mechjeb for forward flight.  You can bind TCA to an action key in the editor through your aircraft’s command pod. I’ll typically have a key bound to toggle TCA and to transition engines from VTOL to flight modes.  I’ll get my forward speed to about 75m/s in TCA and then level the nose, punch the transition key, activate Kramax, and we’re off to the races.  Remember to give yourself plenty of time to lose forward speed before you get to your destination- TCA doesn’t like high-speed braking maneuvers.  I’ll typically start slowing down about 10km from where I’m going and make the transition back to VTOL mode at about 100 m/s.  Come in too fast and you’ll tumble unless you’ve spammed RCS wheels. 

Oh - and panthers are okay for VTOL in afterburner mode.  The key to using any of those advanced engines is to turn off their gimbals.  TCA and gimbals do NOT play nicely together. 

Edited by MaxPeck
Link to comment
Share on other sites

  • 1 month later...
9 minutes ago, dxeh said:

Hero for you 1.7 update. thnx!

Was working in 1.6 though

Glad to hear! :)

But as all my mods depend on AT_Utils library, I update ALL of them once I made some serious changes in it. Just to be on the safe side.

Link to comment
Share on other sites

  • 2 weeks later...

Version 3.5.4 for Kerbal Space Program 1.7.0

Released on 2019-05-08

  • Improved Land (from orbit) and Ballistic Jump autopilots with adaptations for new aerodynamic model of KSP 1.4.5+
  • Fixed stucking in "Testing aerobrakes" phase of the landing when no aerobrakes are present.
  • Other minor fixes in landing logic.

 Download 

Link to comment
Share on other sites

On 11/18/2018 at 11:31 PM, Jesusthebird said:

Hi, Does anyone know how TCA could be implemented into Firesplitter modules?? Im not very good at reading code, but from what the cfgs state, TCA 'Engine Info' is added to engines with modules: ModuleEngine*(such as ModuleEngineFX) and TCA EngineInfo Module is added to parts with ModuleCommand. Im not too familiar as what Engine Info does and how it aids TCA. the TCAModule kinda stumps me as its added to parts with ModuleCommand. So if anyone could help me out that would be superb! The source code is rather confusing to me..

FireSplitter contains different engine modules such as: 

MODULE
{
    name = FSplanePropellerSpinner

and 

MODULE

{
    name = FSengineBladed
 

ModuleTCA is the core, the brain that does all the calculations and controlling; that's why it is installed into command modules.

TCAEngineInfo is just a metadata storage that associates with an engine part and stores things like TCA engine groups and roles.

As for FS engines (and any other custom engines for that matter), adding support for them is (almost) equivalent to reimplementation of the core code of TCA, as it heavily relies on the knowledge of the stock ModuleEngine implementation; namely, its interface and the math behind its functionality. Because to work well TCA often needs to predict in real time engine's behavior.

Link to comment
Share on other sites

On 1/10/2019 at 12:08 AM, linuxgurugamer said:

Need some help here.

I'm making an MMU, which consists of a command seat with monoprop in front and back, and rcs jets on both.  The monoprop in front is small (0.675) and the one in back is 1.25.

First, I had to put an engine on it, even though it isn't needed (an Ant), otherwise TCS wasn't being activated.

Second, while I can see that it is adjusting the thrust limiter of the ones in front, it's not doing a good job, when translating it still rotates because of mismatched thrust.

I can balance this in the VAB using RCS Build Aid, but am wondering why I need to put an engine on, and more importantly, why it isn't balancing.

Thanks in advance

This turned out to be a regression due to ModuleRCS implementation changes introduced somewhere between 1.5 and 1.7.

So thanks for pointing this out: I've managed to fix it :cool:

https://github.com/allista/ThrottleControlledAvionics/issues/65

Link to comment
Share on other sites

Version 3.5.5 for Kerbal Space Program 1.7.0

Released on 2019-05-14

  • Added ability to change UI color scheme at runtime
    • To access the Color Scheme dialog, right-click the GC toolbar button
  • Advanced Tab: AutoSave and Launcher/Toolbar options are now persistent.
  • Fixed RCS balancing (issue #65)
  • In-editor TCA window is now available for vessels with RCS thrusters only (issue #66)
  • Improved landing trajectory rendering using UnityLineRenderer:
    • Lines are thicker and smoother
    • Deceleration trajectory is colored according to predicted hull temperature
  • Other minor fixes.

 Download 

Link to comment
Share on other sites

52 minutes ago, allista said:
  • Improved landing trajectory rendering using UnityLineRenderer:
    • Lines are thicker and smoother
    • Deceleration trajectory is colored according to predicted hull temperature

Fantastic!! can't wait to see how this looks ;)

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