Jump to content

[1.9-1.10] Throttle Controlled Avionics


allista

Recommended Posts

3 hours ago, ss8913 said:

Allista is correct; however, looking at your post it seems like you haven't installed the AT_Utils mod, which is, I believe, required for this mod, so... install AT Utils.

@allista I'm having a really weird problem... it's like the mod works and then suddenly stops, but it's at least reproducible.. my MOST controllable craft at the moment is a little Mk2 helicopter hybrid thing that I use to rescue ejected kerbals with.  I do VTOL test flights to the Island, and I've got a flag planted there to act as a 'target' for TCA, so here's how the flight goes (and it goes this way every time, reliably):

1. Set VTOL assist ON (defaults to ON)
2. Set Hover mode/autothrottle to hover at 200m
3. Set target to the flag at the island base
4.  Tell TCA to 'Stop' for now
5.  Fire up the rotor engines
6.  Push Y to engage TCA
7.  Craft takes off, hovers at 200m
8.  Raise gear
9.  Push "GO TO" on TCA
10. Craft flies normally
11.  Lower the hover altitude in preparation for landing, push STOP over the landing zone
12.  OK everything's fine so far right?  OK, at this point if I look at the right click menu for the engine, the thrust limiter is limited just above the point of neutral thrust (where thrust ~= weight of the craft).
13.  Once I get about 10m off the ground, the whole system fails and the maximum the thrust limiter will go to is just UNDER neutral thrust.
14.  Craft lands semi-hard but safely.
15.  TCA will not allow enough thrust to take off again.  Set the hover to whatever I want, the limiter maxes out at about 20kN too little thrust to take off.
16.  F5/F9 save/load doesn't fix it

So basically all the flights are one-way.  System works beautifully up until I get within 10m of landing, then poof, stops working and won't let me take off again...

Strange!

Want some screenshots or, better yet, a video of the whole thing.

But if I were to guess, the first thought would be: consuming fuel moves CoM which causes imbalance that TCA compensates.

Link to comment
Share on other sites

21 hours ago, allista said:

Please, remove the log from your post, the forum is not intended for posting of so much data.

Yes, especially when reading digest eMails, the whole log is in there, more than 90% of the eMail is to be scrolled down ...

Edited by Gordon Dry
Link to comment
Share on other sites

8 hours ago, allista said:

The problem with TCA is that its folder in your GameData is called "Throttle_Controlled_Avionics-3.4.1", while it should be called ThrottleControlledAvionics.

Aha! That must be when I unzipped it right into GameData. Thank you so much for diagnosing this for me.

8 hours ago, allista said:

JanitorsCloset throws a lot during its FixedUpdate (i.e. 3-4 times per frame). So it's better to remove this mod.

Wow, and double thanks for looking through those other exceptions. I'll get rid of JanitorsCloset (I don't really use it after all).

So great that you do this to support the mod and the game. It means a lot!

Link to comment
Share on other sites

28 minutes ago, scottadges said:

Aha! That must be when I unzipped it right into GameData. Thank you so much for diagnosing this for me.

Wow, and double thanks for looking through those other exceptions. I'll get rid of JanitorsCloset (I don't really use it after all).

So great that you do this to support the mod and the game. It means a lot!

You're welcome)

Be sure to check the folder structure then. Under the ThrottleControlledAvionics should be folders like Parts, Plugins, and so on. The archive tree starts from GameData.

Link to comment
Share on other sites

11 hours ago, allista said:

Strange!

Want some screenshots or, better yet, a video of the whole thing.

But if I were to guess, the first thought would be: consuming fuel moves CoM which causes imbalance that TCA compensates.

hm.. that could be... let me try another experiment with a larger craft using more than one engine and see if that helps, since with only one engine it doesn't have a way to centerbalance thrust.  Also, KSPIE's author has said he's going to improve the thermal turbojet/thermal ramjet reaction times, which should make them more usable with TCA.  I found that adding more reaction wheels does in fact help.. although with slow-cycling engines it only helps to a certain point.. and heavy craft are still a problem for me, I'm not sure HOW to adjust the P and I values to keep TCA from overcompensating control inputs on heavier craft.. any tips there?

Link to comment
Share on other sites

3 minutes ago, ss8913 said:

I'm not sure HOW to adjust the P and I values to keep TCA from overcompensating control inputs on heavier craft.. any tips there?

Try to lower the Steering Gain value first. This will make the craft more sluggish, but may eliminate oscillation. Also try to change ship's design so that slow engines produce less torque (use smaller levers and more squarish engine placement for torque uniformity): less torque => less response to slight thrust oscillations.

Oh! And I can provide you with the beta version of the TCA-3.5 that features new attitude control system based on a double PID cascade that linearizes much better than the single PID in use now. I need someone to test it! :cool:

Link to comment
Share on other sites

On 6/12/2017 at 3:52 PM, allista said:

Try to lower the Steering Gain value first. This will make the craft more sluggish, but may eliminate oscillation. Also try to change ship's design so that slow engines produce less torque (use smaller levers and more squarish engine placement for torque uniformity): less torque => less response to slight thrust oscillations.

Oh! And I can provide you with the beta version of the TCA-3.5 that features new attitude control system based on a double PID cascade that linearizes much better than the single PID in use now. I need someone to test it! :cool:

sure, I'd be happy to test it.  Also you were right about the CoM shift causing the single-rotor helicopter design to exhibit that behavior.  changed the rotor to 'unbalanced thrust' and it works.

Link to comment
Share on other sites

Hello,

I have a H/VTOL configuration problem with TCA. No problem with VTOL but I cannot HTOL with TCA or use TCA in normal fly with V-engines off.

My question is: how to configure TCA correctly to VTOL then fly horizontal normally with V-engines off and at last re-VTOL on arrival ?

There are some images about my craft : http://imgur.com/a/F4dv3

(1: plane config; 2: vertical take off with only v-engines; 3: horizontal flight but v-engines running; 4: v-engines manually switched off => control lost)

Thanks for any help.

Vive_moi

Link to comment
Share on other sites

45 minutes ago, Vive_moi said:

Hello,

I have a H/VTOL configuration problem with TCA. No problem with VTOL but I cannot HTOL with TCA or use TCA in normal fly with V-engines off.

My question is: how to configure TCA correctly to VTOL then fly horizontal normally with V-engines off and at last re-VTOL on arrival ?

There are some images about my craft : http://imgur.com/a/F4dv3

(1: plane config; 2: vertical take off with only v-engines; 3: horizontal flight but v-engines running; 4: v-engines manually switched off => control lost)

Thanks for any help.

Vive_moi

set your horizontal-thrust engines to 'unbalanced thrust'.  Turn off the [default] options in TCA for 'VTOL assist', 'stablizer', 'CPS', etc.. when flying horizontally or engaging TCA will make it want to kill horizontal velocity, which wreaks havoc when trying to fly a plane normally.  Unless you turn off 'VTOL assist,' then it's ok.

Link to comment
Share on other sites

41 minutes ago, Vive_moi said:

Hello,

I have a H/VTOL configuration problem with TCA. No problem with VTOL but I cannot HTOL with TCA or use TCA in normal fly with V-engines off.

My question is: how to configure TCA correctly to VTOL then fly horizontal normally with V-engines off and at last re-VTOL on arrival ?

There are some images about my craft : http://imgur.com/a/F4dv3

(1: plane config; 2: vertical take off with only v-engines; 3: horizontal flight but v-engines running; 4: v-engines manually switched off => control lost)

Thanks for any help.

Vive_moi

Unfortunately, TCA is not suitable for plane-like horizontal flight - all its functionality is intended for VTOLs, rockets, landers and such.

So what you should do is to disable TCA once the transition to horizontal flight is over. To facilitate this, TCA may be toggled along with the vertical engines using an action group. And transition itself may be handled with appropriate engines profile setup.

I can make a video example when I'm home.

Link to comment
Share on other sites

hello @allista

First of all, I want to thank you for your excepcional work!.

I've updated to the latest version of TCA for KSP 1.2.2 (v3.4.1). Unfortunately I could not find the icon anywhere, nor on stock toolbar, neither on @blizzy78's Toolbar.

Update parts were present on VAB and Research window.

As a developer myself, I've tried to drop some light on the issue and after digging on output_log.txt, I've found the following lines:

AssemblyLoader: Exception loading 'ThrottleControlledAvionics': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 

Additional information about this exception:

 System.TypeLoadException: Could not load type 'ThrottleControlledAvionics.EngineWrapper' from assembly 'ThrottleControlledAvionics, Version=3.4.1.1, Culture=neutral, PublicKeyToken=null'.

With the folowing line on the causes 

 System.IO.FileNotFoundException: Could not load file or assembly '000_AT_Utils, Version=1.4.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: '000_AT_Utils, Version=1.4.3.0, Culture=neutral, PublicKeyToken=null'

 

Seems like the last update to TCA is built with AT_UTILS 1.4.3, but that version is rated on CKAN as KSP 1.3.0.

Is there, by any chance that you could upload a new version of AT_UTILS or TCA that works on 1.2.2?  

I'm still tied to 1.2.2 by many mods 

 

 

Thanks in advance! and keep the good work going! :)

Link to comment
Share on other sites

26 minutes ago, allista said:

Unfortunately, TCA is not suitable for plane-like horizontal flight - all its functionality is intended for VTOLs, rockets, landers and such.

So what you should do is to disable TCA once the transition to horizontal flight is over. To facilitate this, TCA may be toggled along with the vertical engines using an action group. And transition itself may be handled with appropriate engines profile setup.

I can make a video example when I'm home.

1. TCA is, by default, toggled with the Y key.

2. Planes/other craft with multiple 'horizontal' engines that are far enough apart can sometimes induce some yaw/pitch oscillation.  Turning off all the 'helper modes' and turning TCA ON, can in fact stabilize that and balance thrust around CoM, so I'd disagree with allista that it's not useful for plane-like horizontal flight - spaceplanes in orbit can benefit greatly from TCA - it's not really necessary in atmosphere, as the aerodynamic forces will dampen the oscillations induced by slightly-off-balance engines (this is more of an issue with certain engines than others) .. but I've found TCA to be useful  when getting spaceplanes up out of the atmosphere in closed-cycle mode (above 20km altitude or so).

Link to comment
Share on other sites

11 hours ago, allista said:

Unfortunately, TCA is not suitable for plane-like horizontal flight - all its functionality is intended for VTOLs, rockets, landers and such.

So what you should do is to disable TCA once the transition to horizontal flight is over. To facilitate this, TCA may be toggled along with the vertical engines using an action group. And transition itself may be handled with appropriate engines profile setup.

I can make a video example when I'm home.

Hi @allista,

I would love to see his, been experimenting with H/VTOL, and cant seem to get the hang of it completely. Trying to use Quiz Tech gimballing VTOL engines (two VTOLs in the wings one gimballing H/VTOL on the back), but I cannot make the transition work.

Link to comment
Share on other sites

9 hours ago, DrScarlett said:

Hi @allista,

I would love to see his, been experimenting with H/VTOL, and cant seem to get the hang of it completely. Trying to use Quiz Tech gimballing VTOL engines (two VTOLs in the wings one gimballing H/VTOL on the back), but I cannot make the transition work.

@Vive_moi, @DrScarlett, here you go!

 

Link to comment
Share on other sites

21 hours ago, Sherpard2 said:

hello @allista

First of all, I want to thank you for your excepcional work!.

I've updated to the latest version of TCA for KSP 1.2.2 (v3.4.1). Unfortunately I could not find the icon anywhere, nor on stock toolbar, neither on @blizzy78's Toolbar.

Update parts were present on VAB and Research window.

As a developer myself, I've tried to drop some light on the issue and after digging on output_log.txt, I've found the following lines:


AssemblyLoader: Exception loading 'ThrottleControlledAvionics': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 

Additional information about this exception:

 System.TypeLoadException: Could not load type 'ThrottleControlledAvionics.EngineWrapper' from assembly 'ThrottleControlledAvionics, Version=3.4.1.1, Culture=neutral, PublicKeyToken=null'.

With the folowing line on the causes 


 System.IO.FileNotFoundException: Could not load file or assembly '000_AT_Utils, Version=1.4.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: '000_AT_Utils, Version=1.4.3.0, Culture=neutral, PublicKeyToken=null'

Seems like the last update to TCA is built with AT_UTILS 1.4.3, but that version is rated on CKAN as KSP 1.3.0.

Is there, by any chance that you could upload a new version of AT_UTILS or TCA that works on 1.2.2?  

I'm still tied to 1.2.2 by many mods 

 

Thanks in advance! and keep the good work going! :)

So, what I see here is: you have "assembly 'ThrottleControlledAvionics, Version=3.4.1.1", and "assembly '000_AT_Utils, Version=1.4.3.0", both of which are compiled against KSP-1.3 and cannot work with KSP-1.2. So it seems you've updated TCA as well as AT_Utils. You need to downgrade from SpaceDock: https://spacedock.info/mod/198/Throttle Controlled Avionics/download/3.4.1

Also be aware that AT_Utils is a library common to all my mods, so you cannot upgrade them (TCA, GC, CC, Hangar) independently, as any of them ships required version AT_Utils.

Link to comment
Share on other sites

On 6/12/2017 at 3:52 PM, allista said:

Try to lower the Steering Gain value first. This will make the craft more sluggish, but may eliminate oscillation. Also try to change ship's design so that slow engines produce less torque (use smaller levers and more squarish engine placement for torque uniformity): less torque => less response to slight thrust oscillations.

Oh! And I can provide you with the beta version of the TCA-3.5 that features new attitude control system based on a double PID cascade that linearizes much better than the single PID in use now. I need someone to test it! :cool:

Whoa - can I test that also please?  I've been having issues maintaining consistent attitude with some of the VTOL craft in the WildBlue mods in the current TCA, and would like to try it with the beta and see how that performs.

Link to comment
Share on other sites

7 minutes ago, panarchist said:

Whoa - can I test that also please?  I've been having issues maintaining consistent attitude with some of the VTOL craft in the WildBlue mods in the current TCA, and would like to try it with the beta and see how that performs.

Yep. I'll set it up tonight.

Link to comment
Share on other sites

Hi @allista,

 

thanks for the excellent video, many enlightening bits in there for me!! Including some tools and functionality I didn't know about, like the visual aid when setting bearing. Really useful.

I have one question. I wouldn't necessarily even need to come out of TCA mode if I could fly the plane at it's max speed. But in my test plane, when I go to cruise mode and bump up the speed, at some point the plane starts to pitch wobble as if some helper is trying to slow down the plane with the VTOL engines. Any idea what could cause that? My plane handles ok in free flight and in TCA VTOL landing and takeoff otherwise. Only thing I think I am doing different is not use VTOL mode.

And also a random question here. Have you ever considered adding a 'plane mode' (or maybe 'aerodynamic lift' mode) to the smart engines? Something that would allow us to keep TCA running whilst piloting (or auto piloting) the plane with the VTOLs off and closed? I do not know how much you are actually going into aerodynamics when you calculate thrust, and whether that matters at all.

Thanks in advance,

Dr. Scarlett

Link to comment
Share on other sites

not to detract from @allista and his awesome mods.  as I would love to see TCA replicate and thus remove the need for me to load additional Auto pilot mods.  however in the mean time try Kramax autopilot.  If TCA would duplicate this mod that would be great but in the meantime they do work very well together.  use the vtol assistance to get you up and moving then as the video shows toggle TCA and the vertical engines off.  then use Kramax for all your aerodynamic flight autopilot needs.

With TCA/Kramax/MJ loaded you have an autopilot system that will cover all your autopilot needs.  they all play very well together, and can easily transition from one AP to the next depending on the stage of flight you are in. 

So yes, we can only wish that TCA would replicate and thus remove the need for the other 2...  but i am happy with the results I get from switching between these three as needed.

Edited by Bit Fiddler
Link to comment
Share on other sites

5 hours ago, DrScarlett said:

Hi @allista,

 

thanks for the excellent video, many enlightening bits in there for me!! Including some tools and functionality I didn't know about, like the visual aid when setting bearing. Really useful.

I have one question. I wouldn't necessarily even need to come out of TCA mode if I could fly the plane at it's max speed. But in my test plane, when I go to cruise mode and bump up the speed, at some point the plane starts to pitch wobble as if some helper is trying to slow down the plane with the VTOL engines. Any idea what could cause that? My plane handles ok in free flight and in TCA VTOL landing and takeoff otherwise. Only thing I think I am doing different is not use VTOL mode.

And also a random question here. Have you ever considered adding a 'plane mode' (or maybe 'aerodynamic lift' mode) to the smart engines? Something that would allow us to keep TCA running whilst piloting (or auto piloting) the plane with the VTOLs off and closed? I do not know how much you are actually going into aerodynamics when you calculate thrust, and whether that matters at all.

Thanks in advance,

Dr. Scarlett

To be honest, I've also encountered this strange behaviour (with spontaneous pitching to slow down) several times; but for now I was unable to find a pattern and haven't debug it thoroughly. So thanks for that observation, I'll look into it in detail now.

As for the aerodynamics: TCA really doesn't consider aerodynamic forces much, relying on its PIDs to compensate for them. Currently, the only place where lift and drag are included into calculations is the TWR (and many its functions I use internally); so, for example, when the lift is big, current TWR will be higher and engines would lower their thrust. But to use it fully TCA would have to consider things like orientation of lifting surfaces, AoA and so on; aerodynamics is huge and far from my area of expertize. So I second @Bit Fiddler: it's best to use dedicated plane autopilots for planes.

Link to comment
Share on other sites

8 hours ago, DrScarlett said:

I have one question. I wouldn't necessarily even need to come out of TCA mode if I could fly the plane at it's max speed. But in my test plane, when I go to cruise mode and bump up the speed, at some point the plane starts to pitch wobble as if some helper is trying to slow down the plane with the VTOL engines. Any idea what could cause that? My plane handles ok in free flight and in TCA VTOL landing and takeoff otherwise. Only thing I think I am doing different is not use VTOL mode.

Found it.

When you're using navigation (go to, follow route), the module that handles this calculates ETA and braking time constantly to know when to start to decelerate. But braking time calculation depends on an estimation of the available braking thrust, which is the force that the ship/plane can muster in the direction opposite to the horizontal velocity. So far so good. But currently it assumes (of course) there's only one thrust provider -- engines. And VTOL engines on a plane are slow and weak; which, taken into account, amounts to very little braking thrust "available". So what happens is  this: a plane using its aft engine accelerates rapidly to a considerable speed, which lowers the vertical thrust needed to counter gravity due to lift. The estimated braking thrust (small as it is) lowers further; and at some point the estimated braking time becomes greater than ETA. Autopilot decides that it needs to decelerate already, or it will skip the destination.

Working on a solution to include lift+drag into these calculations...

Edited by allista
Link to comment
Share on other sites

Quick question: is there anyway TCA can be set to move rotatrons for engines, instead of rotating the entire craft? I'd like to have my VTOL move its engines and keep the craft level.

Edited by Madeiner
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...