Jump to content

[1.9-1.10] Throttle Controlled Avionics


allista

Recommended Posts

10 minutes ago, Madeiner said:

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.

Oh, I would like it so much myself! :cool:

Unfortunately, it's so much more challenging than to simply control overall thrust/torque direction.

It's actually analogous to a problem of autonomous multipede robot; it would need complex ML/AI algorithms to coordinate its legs, not the "simple" optimization+control-theory problems I solve in TCA.

Also, there's the issue of interacting with IR (I suppose rotatrons belong there?); cross-mod interactions are generally difficult to establish and even more so to maintain.

Link to comment
Share on other sites

19 hours ago, allista said:

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.

Sorry, found out that my CKAN just trolled me out, it has chosen to download 3.4.1.1, I'm sorry that I did not pay attention to TCA version..

Link to comment
Share on other sites

18 hours ago, allista said:

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

please consider the differences between stock aero and FAR when implementing this - if you can't make it FAR-aware, please make this feature something we can toggle on/off or.. weird/bad things will happen. :)

Link to comment
Share on other sites

to make engines move you need to use another mod.  something like Infernal Robotics will do this or several mods have engines with built in movement.  but other than these 2 methods there is no way to move a part.   As it stands now your best bet is to use infernal robotics and steer your engines this way.  and just use TCA to keep the thrust balanced so you do not flip over or something.  I have never done this before, but I can "imagine" a setup where TCA will attempt to keep your craft level by adjusting the various engines thrust power.  Then as you point them around to produce lateral thrust TCA will keep the rest of the craft in balance to keep it upright.

Again I have never attempted this sort of a setup, but it may indeed be possible.

 

Link to comment
Share on other sites

36 minutes ago, Bit Fiddler said:

to make engines move you need to use another mod.  something like Infernal Robotics will do this or several mods have engines with built in movement.  but other than these 2 methods there is no way to move a part.   As it stands now your best bet is to use infernal robotics and steer your engines this way.  and just use TCA to keep the thrust balanced so you do not flip over or something.  I have never done this before, but I can "imagine" a setup where TCA will attempt to keep your craft level by adjusting the various engines thrust power.  Then as you point them around to produce lateral thrust TCA will keep the rest of the craft in balance to keep it upright.

Again I have never attempted this sort of a setup, but it may indeed be possible.

 

don't.  IR joints are too weak to handle thrust.  The only way to make them not that weak is to use KJR.  Which conflicts with IR and makes everything super weird.  I'm still looking for a use for IR.  You can't put docking ports on any of the IR parts, you can't put engines on them, and I can't for the life of me figure out what else it could be good for.

You want VTOL?  put a couple of antimatter reactors and thermal turbojets, facing downward, just on either side of your CoM, and use TCA to balance the thrust.  Doesn't work so well in open cycle mode, but in closed cycle mode, yes.

Link to comment
Share on other sites

On 6/17/2017 at 8:46 AM, allista said:

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

Ahhh, due to the high speed and weak engines it starts breaking very early. That makes sense, nice catch!

Link to comment
Share on other sites

Version 3.4.2 for Kerbal Space Program 1.3.0

Released on 2017-06-21

  • Improved navigation autopilot (Go To, Follow Path, etc.), especially for low TWR, slow-engine VTOLs and H/VTOL-planes.
  • Improved usage of Manual engines for translation/horizonal propulsion.
  • Cruise Control, when engaged, now uses forward direction instead of low current velocity. That is, ships slowly drifting backward will not try to rotate 180deg on the spot.
  • Added a button to collapse main window.
  • Fixed ATC+PersistentRotation.
  • Various bugfixes and small improvements.

 Download 

Link to comment
Share on other sites

23 minutes ago, allista said:
  • Fixed ATC+PersistentRotation.

Do you mean TCA? -- or the Air Traffic mod (or something else I'm not thinking of...)?

Regardless, thank you for continuing to maintain and build one of my favorite mods of *any* game!

Link to comment
Share on other sites

Just now, Beetlecat said:

Do you mean TCA? -- or the Air Traffic mod (or something else I'm not thinking of...)?

Regardless, thank you for continuing to maintain and build one of my favorite mods of *any* game!

Sorry, sometimes I fail to properly translate my commit messages (which are converted into changelog items automatically) into a human-readable form :D

ATC is the internal name for AttitudeControl TCAModule which superseeds stock SAS, hence the former issue with PR.

But you can really read this as TCA+PR, which is what it boils down to.

Link to comment
Share on other sites

Video showing some of the pros/cons of a tilt rotor aircraft.  as well as some weird shenanigans where I assume the 2 autopilot mods are fighting each other.   However it does seem that TCA is trying to "Stop" or "Anchor" the craft even when the buttons are not selected.  this causes the craft to do weird loops and such trying to negate the lateral motion.  and for some reason cruise mode does not work either.  it seems the same thing that tries to stop lateral motion in free flight also kills cruise mode.

 

however as you can see in a few spots, when it all works out, the transition from VTOL to Aerodynamic flight is very smooth.  If you press all the buttons in the right order you can easily transition from VTOL to Aerodynamic flight models.

 

 

Link to comment
Share on other sites

3 hours ago, Bit Fiddler said:

Video showing some of the pros/cons of a tilt rotor aircraft.  as well as some weird shenanigans where I assume the 2 autopilot mods are fighting each other.   However it does seem that TCA is trying to "Stop" or "Anchor" the craft even when the buttons are not selected.  this causes the craft to do weird loops and such trying to negate the lateral motion.  and for some reason cruise mode does not work either.  it seems the same thing that tries to stop lateral motion in free flight also kills cruise mode.

however as you can see in a few spots, when it all works out, the transition from VTOL to Aerodynamic flight is very smooth.  If you press all the buttons in the right order you can easily transition from VTOL to Aerodynamic flight models.

What pitch-torque providers do you have there? Because it looks like it tries to combat aerodynamic forces and fails due to insufficient pitch authority.

Link to comment
Share on other sites

Love this mod, must have for VTOL and Helicopters. I am running into one issue using way points. I click on a specific spot but as the craft approaches the way point seems to move 50+ meters from where I clicked. Is there any known issues? I can record a demonstration if you like.  Using the Latest build on 1.3.

//Edit

Ah, I see what is happening when I went to record. I am trying to land on a boat (The boat is not moving as I use Airpark to freeze it in a landed state) and the way point is selecting a point on the surface below the water and not the vessel. Is there a way to allow the waypoint to account for the surface of the water or a vessel?

Edited by gomker
Link to comment
Share on other sites

Hello to all and a big thanks to @allista for this great mod.

some time back there was some talk about some 'modules' or such to where there would be some smaller, less powerful and thus easier, subsets for this.

did that ever come about, or was that idea dropped.

again, many thanks for this and glad to see it still going on.

Cheers.

Link to comment
Share on other sites

A minute of narcissism :cool: 

Random Automatic Tests of remastered orbital autopilots

URL: https://www.twitch.tv/videos/154384791

Program: Jump To a random surface target

Place: Mun

Ship: simple rocket with 4 side-attached engines and a reaction wheel

Running time: 10h 23m, 119 repetitions

Results: 0 failures/crashes

6 hours ago, Bit Fiddler said:

both the cockpit, and strangely enough, the engines have reaction wheels running.

Yes, but are they strong enough to handle its moment of inertia + drag on wings and tail? Without enough forward motion control surfaces are no help.

Anyways, I don't know about the second autopilot and their co-existence with TCA, but I'm sure it's a bad idea to enable both at the same time.

And TCA needs static control authority for hovering, no way around it.

Edited by allista
Link to comment
Share on other sites

5 hours ago, gomker said:

Love this mod, must have for VTOL and Helicopters. I am running into one issue using way points. I click on a specific spot but as the craft approaches the way point seems to move 50+ meters from where I clicked. Is there any known issues? I can record a demonstration if you like.  Using the Latest build on 1.3.

//Edit

Ah, I see what is happening when I went to record. I am trying to land on a boat (The boat is not moving as I use Airpark to freeze it in a landed state) and the way point is selecting a point on the surface below the water and not the vessel. Is there a way to allow the waypoint to account for the surface of the water or a vessel?

Waypoints do account for the water (and are always set above it) and for static objects (buildings, etc.); and you can always edit a point manually -- either by mouse-dragging (left-click+drag changes location, middle-click+drag changes altitude), or via editor window (Edit button in the waypoint list, or right-click on a waypoint on the surface).

But, I would guess that's not what's happening in your case. The boat you're trying to land on is still a vessel, not a static; and TCA has the Collision Prevention System (CPS) module that tries to avoid collisions with other vessels by automatically correcting your course. It's CPS pushes your craft sideways, away from collision with the boat.

Currently, there's no automatic way to detect if a vessel is actually a landing target (or just sits on the way). So to land, you will need to go to Advanced Tab and disable CPS (using corresponding button). Don't forget to re-enable it afterwards, though :wink:

5 hours ago, drtedastro said:

Hello to all and a big thanks to @allista for this great mod.

some time back there was some talk about some 'modules' or such to where there would be some smaller, less powerful and thus easier, subsets for this.

did that ever come about, or was that idea dropped.

again, many thanks for this and glad to see it still going on.

Cheers.

It did come about: in Editor, when you build a new ship, you can open TCA window and push the Modules button; there you will see a set of tiers of modules with their dependencies on each other shown. You can deselect any of them; dependencies will be disabled automatically; and controls (and even whole tabs) of disabled modules will be absent in flight window.

Edited by allista
Link to comment
Share on other sites

Oh yes. I understand all the problems with that craft and the video.  it was purely to show the poster @Madeiner that tilt rotor aircraft are possible, and that transition from VTOL with TCA, to Aerodynamic with Kramax is really quite simple.   the problems sown in that video were intentional to point out the things that a player would come across in designing something similar.   I was not trying to point out any shortcomings in TCA, just problems to think about in design.  like how to synch the rotor tilt and the TCA enable to the gear switch etc.

 

 

Link to comment
Share on other sites

I am getting this error message:

Spoiler

[UIMasterController]: HideUI
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

------------------- initializing flight mode... ------------------
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Exception handling event onGameStateSave in class TCAGui:System.IO.IOException: Sharing violation on path C:\KSP\Kerbal Space Program 1.3.0.1804 Live\GameData\ThrottleControlledAvionics\Plugins\PluginData\ThrottleControlledAvionics\config.xml
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextWriter..ctor (System.String filename, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
  at KSP.IO.PluginConfiguration.save () [0x00000] in <filename unknown>:0
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

IOException: Sharing violation on path C:\KSP\Kerbal Space Program 1.3.0.1804 Live\GameData\ThrottleControlledAvionics\Plugins\PluginData\ThrottleControlledAvionics\config.xml
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextWriter..ctor (System.String filename, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
  at KSP.IO.PluginConfiguration.save () [0x00000] in <filename unknown>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
EventData`1:Fire(ConfigNode)
Game:Save(ConfigNode)
GameBackup:.ctor(Game)
FlightDriver:Start()
 
(Filename:  Line: -1)

[MessageSystem] Save Messages
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

KK: Save State
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

 

Is there a close missing for a write stream somewhere?.

I am using this version:

Spoiler

{
    "NAME":"ThrottleControlledAvionics",
    "URL":"https://raw.githubusercontent.com/allista/ThrottleControlledAvionics/master/GameData/ThrottleControlledAvionics/ThrottleControlledAvionics.version",
    "DOWNLOAD":"http://spacedock.info/mod/198/Throttle%20Controlled%20Avionics",
    "CHANGE_LOG_URL":"https://raw.githubusercontent.com/allista/ThrottleControlledAvionics/master/ChanegLog.md",
    "VERSION":
     {
         "MAJOR":3,
         "MINOR":4,
         "PATCH":2,
         "BUILD":0
     },
    "KSP_VERSION_MIN":
     {
         "MAJOR":1,
         "MINOR":3,
         "PATCH":0
     },
    "KSP_VERSION_MAX":
     {
         "MAJOR":1,
         "MINOR":3,
         "PATCH":0
     }
}

 

 

Link to comment
Share on other sites

49 minutes ago, Apaseall said:

I am getting this error message:

  Hide contents

[UIMasterController]: HideUI
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

------------------- initializing flight mode... ------------------
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Exception handling event onGameStateSave in class TCAGui:System.IO.IOException: Sharing violation on path C:\KSP\Kerbal Space Program 1.3.0.1804 Live\GameData\ThrottleControlledAvionics\Plugins\PluginData\ThrottleControlledAvionics\config.xml
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextWriter..ctor (System.String filename, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
  at KSP.IO.PluginConfiguration.save () [0x00000] in <filename unknown>:0
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

IOException: Sharing violation on path C:\KSP\Kerbal Space Program 1.3.0.1804 Live\GameData\ThrottleControlledAvionics\Plugins\PluginData\ThrottleControlledAvionics\config.xml
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextWriter..ctor (System.String filename, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
  at KSP.IO.PluginConfiguration.save () [0x00000] in <filename unknown>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
EventData`1:Fire(ConfigNode)
Game:Save(ConfigNode)
GameBackup:.ctor(Game)
FlightDriver:Start()
 
(Filename:  Line: -1)

[MessageSystem] Save Messages
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

KK: Save State
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

 

Is there a close missing for a write stream somewhere?.

I am using this version:

  Reveal hidden contents

{
    "NAME":"ThrottleControlledAvionics",
    "URL":"https://raw.githubusercontent.com/allista/ThrottleControlledAvionics/master/GameData/ThrottleControlledAvionics/ThrottleControlledAvionics.version",
    "DOWNLOAD":"http://spacedock.info/mod/198/Throttle%20Controlled%20Avionics",
    "CHANGE_LOG_URL":"https://raw.githubusercontent.com/allista/ThrottleControlledAvionics/master/ChanegLog.md",
    "VERSION":
     {
         "MAJOR":3,
         "MINOR":4,
         "PATCH":2,
         "BUILD":0
     },
    "KSP_VERSION_MIN":
     {
         "MAJOR":1,
         "MINOR":3,
         "PATCH":0
     },
    "KSP_VERSION_MAX":
     {
         "MAJOR":1,
         "MINOR":3,
         "PATCH":0
     }
}

 

 

As you can see, the exception occurs inside KSP.IO.PluginConfiguration class, to which I have no access (I don't directly handle file IO). But since it's an old bit of code which hadn't caused problems before, I would guess IO is handled correctly there. Also, as everything is handled in the main Unity thread, there can be no simultaneous access attempts. The only other explanation is that the lock on that file is held by another process. Maybe previous instance of KSP is still running? I know that's hardly probable, you never can tell. In any case, a reboot should either solve the issue or show us that there is indeed some nasty problem.

Link to comment
Share on other sites

I'm using version 1.3, and I can't get TCA to work. No icon on the normal toolbar, no option for it on Blizzy, and Y does nothing. The modules show up in the parts list, but I can't for the life of me find out how to get the actual menu open. Any pointers? I'm posting my output log below.

 

https://drive.google.com/file/d/0BwNilc2T52e4cGN1WUlPNmR1RGs/view?usp=sharing

 

Edit: I tested this on a fresh install of KSP version 1.3, and it still doesn't work, with or without Blizzy's toolbar. I even tried the 000_At_Utils folder from MKS just in case. There is simply no toolbar. The modules are showing up in game, but I'm seriously confused as they are listed as a part, yet can't attach to anything.

Edited by eldemarco
New information
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...