Jump to content

[1.9-1.10] Throttle Controlled Avionics


allista

Recommended Posts

3 hours ago, Jarin said:

I also seem to have gotten TCA double-installed or something. Ever seen an issue like this? I'm sometimes seeing doubling in the engine control list as well. 

TitkPEd.png

 

Someone here reported a similar problem and it was indeed a twin install of some sort, if I remember correctly.

Check your logs: in the beginning there should be a listing of all the dlls and plugin folders.

Link to comment
Share on other sites

5 minutes ago, allista said:

Someone here reported a similar problem and it was indeed a twin install of some sort, if I remember correctly.

Check your logs: in the beginning there should be a listing of all the dlls and plugin folders.

Ah, thanks. Found it. Had managed to make a copy of the TCA folder inside another mod folder somehow. Flubbed drag-and-drop at some point I guess. 

Link to comment
Share on other sites

What's the best method to use TCA to land a reentering stage with limited dV onto a target (i.e. KSC pad/runway)? I keep running out of fuel, and/or TCA tries to hover the whole way. I'm using Trajectories to get close

Link to comment
Share on other sites

I am an endless font of questions.

What triggers the target-relative maneuver options? I keep having them go gray when I really want to be using them.

PCV37kS.png
(they tend to activate when I'm really close, but I get nervous with low-TWR craft about having time to stop)

Edit: It also doesn't play nice with rockets that have a jet-style "spool up/down" period, like the ones in the OPT spaceplane pack. Had it blow past at high velocity on one attempt, and stop 30km shy on another. I think it's confused.

 

And question two! Is there a way to make the "match velocity" setting use RCS for station-keeping?

 

Edited by Jarin
Link to comment
Share on other sites

Maybe I'm just stupid, but I can't get this to work. I dragged and dropped it into the game directory, but it never comes up. I tried it with the toolbar mod installed, but the toolbar never came up, and without the toolbar there's still nothing. Is there some kind of installation, or starter guide? I just can't get this to work, no GUI comes up when I'm controlling my craft.

Link to comment
Share on other sites

I might be missing something but how do you set the mod to automatically be disabled when you load onto the runway?  I lloked in the glob and couldn'ty see a setting there.  Recovering a vehicle when it is disabled doesn't seem to persist.  Any ideas?

 

-Mike R

Link to comment
Share on other sites

49 minutes ago, msromike said:

I might be missing something but how do you set the mod to automatically be disabled when you load onto the runway?  I lloked in the glob and couldn'ty see a setting there.  Recovering a vehicle when it is disabled doesn't seem to persist.  Any ideas?

 

-Mike R

Try opening the TCA window in the VAB/SPH and setting it disabled there.

Link to comment
Share on other sites

13 hours ago, Jarin said:

I am an endless font of questions.

What triggers the target-relative maneuver options? I keep having them go gray when I really want to be using them.
(they tend to activate when I'm really close, but I get nervous with low-TWR craft about having time to stop)

Edit: It also doesn't play nice with rockets that have a jet-style "spool up/down" period, like the ones in the OPT spaceplane pack. Had it blow past at high velocity on one attempt, and stop 30km shy on another. I think it's confused.

 

And question two! Is there a way to make the "match velocity" setting use RCS for station-keeping?

Questions are good! :D

The greyed out options you're showing is something that is not meant to happen. The trigger is simple: the vessel should have a targetObject and that object should be a Vessel. In my understanding this should always be the case when you actually see something as a target in MapView (green orbit, all that). But it seems this is not the case, and sometimes the Vessel.targetObject is not set. I don't know, how that's possible, and I have not encountered this myself. Will investigate. Meanwhile, the easiest way to work around this is to re-set the target: click the target vessel, push "Untarget", then click again and push "Target vessel" (I'm not sure the button names are exact, but I hope you get my meaning).

Slow engines are problematic. As well as multi-stage acceleration/deceleration. I have tried to find analytical solutions, but it seems the only viable option is to actually simulate the vessel in flight to get meaningful numbers. I will continue to work on this problem.

Match Velocity uses RCS automatically when dV is low [0.1-0.5] m/s or when engines are not aligned with the needed thrust direction (i.e. the ship had no time to turn); below 0.1m/s of relative velocity no correction is made to conserve the fuel.

9 hours ago, CommissarRasher said:

Maybe I'm just stupid, but I can't get this to work. I dragged and dropped it into the game directory, but it never comes up. I tried it with the toolbar mod installed, but the toolbar never came up, and without the toolbar there's still nothing. Is there some kind of installation, or starter guide? I just can't get this to work, no GUI comes up when I'm controlling my craft.

Download the distributive from SpaceDock, unpack it inside the main KSP folder, not inside GameData. Then you should have the following folders: .../GameData/000_AT_Utils, .../GameData/ThrottleControlledAvionics. And don't forget to instal the ModuleManager, which is required. Everything should work after that.

7 hours ago, msromike said:

I might be missing something but how do you set the mod to automatically be disabled when you load onto the runway?  I lloked in the glob and couldn'ty see a setting there.  Recovering a vehicle when it is disabled doesn't seem to persist.  Any ideas?

-Mike R

@Jarin is correct: you have most of the switches in TCA window in Editor, starting from the "Enable" switch that does what you want.

Note, that these switches are saved per-ship. And TCA is disabled by default for new ships, so what you describe means that you have somehow enabled TCA for this particular ship you're talking about in Editor.

Edited by allista
Link to comment
Share on other sites

4 hours ago, allista said:

The greyed out options you're showing is something that is not meant to happen. The trigger is simple: the vessel should have a targetObject and that object should be a Vessel. In my understanding this should always be the case when you actually see something as a target in MapView (green orbit, all that). But it seems this is not the case, and sometimes the Vessel.targetObject is not set. I don't know, how that's possible, and I have not encountered this myself. Will investigate. Meanwhile, the easiest way to work around this is to re-set the target: click the target vessel, push "Untarget", then click again and push "Target vessel" (I'm not sure the button names are exact, but I hope you get my meaning).

I'd actually re-set the target several times when I took that screenshot. The buttons did enable in time, but it was at about 30 seconds until encounter when they came on.

Link to comment
Share on other sites

4 hours ago, Jarin said:

I'd actually re-set the target several times when I took that screenshot. The buttons did enable in time, but it was at about 30 seconds until encounter when they came on.

Now I see it too. Thanks for the report! Fixed it.

Link to comment
Share on other sites

Allista, did you catch my question? I was looking to find out the best way to land a reentering falcon-type stage on target using TCA. When I use go-to and land, it always tries to hover, or maintain a very low vertical speed.

Link to comment
Share on other sites

8 minutes ago, dlrk said:

Allista, did you catch my question? I was looking to find out the best way to land a reentering falcon-type stage on target using TCA. When I use go-to and land, it always tries to hover, or maintain a very low vertical speed.

Oh, sorry, I thought I answered this one, but apparently not :confused:

Well, I'm not sure, to be honest. There are two options I can imagine:

  1. You can use the Land-from-orbit autopilot (the first Land button, on a row with the other orbital autopilots). But it will probably detect the lack of fuel and will say: "Emergency landing, will decelerate as much as possible before impact", meaning that it will only try to use engines to kill the speed near the ground, wherever that will be. No precision targeted landing in that mode.
  2. You could try to do it "manually", by enabling Level (to point engines downwards), then at some point enabling Hover+Follow Terrain (for relative altitude) and setting needed altitude to 0 (this will allow fast descent to ~100m, then soft landing, if you have the fuel). Finally, you can change Level to Stop to kill horizontal velocity when needed. The whole process may be automated with a macro; which will also help to decide when to start braking -- macros have conditions on altitude and static pressure.

TCA is made to be a universal system that have to work for many different kinds of ships. This "specialization" prevents it from being fine-tuned for a particular situation, especially a marginal one. So in any case, you will have to use trial-and-error approach, to learn the best strategy for you case.

Link to comment
Share on other sites

Thanks, that got it working for me just fine. Though I am still having some trouble with maneuvers. To test this mod out, I've been doing some simple Mun landing missions, but I can't seem to get the landing part working.

My lander is pretty standard, and when I give the computer a land order, it computes a de-orbit to hit that target. But then it just doesn't land. No matter how much fuel is in the tank it says 'not enough fuel for powered landing' and after that it doesn't engage the engine and just lets the craft slam into the surface wherever the landing zone was.

Link to comment
Share on other sites

8 hours ago, CommissarRasher said:

Thanks, that got it working for me just fine. Though I am still having some trouble with maneuvers. To test this mod out, I've been doing some simple Mun landing missions, but I can't seem to get the landing part working.

My lander is pretty standard, and when I give the computer a land order, it computes a de-orbit to hit that target. But then it just doesn't land. No matter how much fuel is in the tank it says 'not enough fuel for powered landing' and after that it doesn't engage the engine and just lets the craft slam into the surface wherever the landing zone was.

That sounds awful :(

What engines do you use? Stock or from a mod?

Edit: better yet, if you have a near-stock KSP, you could share the .craft file and/or the savegame so that I could replay the events with debugging options turned on.

Edited by allista
Link to comment
Share on other sites

Here's my craft, it's pretty vanilla, think the only other thing I used was KW rocketry, maybe something else.

If you can't get it working, the actual lander is the archetypal '3 person module on a fuel can with a poodle engine' that everyone has built at least once.

 

http://www.mediafire.com/file/yx3gbv3ge16geah/Munar+Lander.craft

Edited by CommissarRasher
Forgot to include something
Link to comment
Share on other sites

On 1/13/2017 at 4:17 PM, CommissarRasher said:

Here's my craft, it's pretty vanilla, think the only other thing I used was KW rocketry, maybe something else.

If you can't get it working, the actual lander is the archetypal '3 person module on a fuel can with a poodle engine' that everyone has built at least once.

 

http://www.mediafire.com/file/yx3gbv3ge16geah/Munar+Lander.craft

Got it. Landed it on the Mun. Have a video, but it's just another boring fully-automated landing.

And I think I know what's the problem is: the lander has a single CoM-coaxial engine with gimbal that is set to Thrust&Maneuver.

Details: As soon as some maneuvering starts, engine's gimbal starts to move the nozzle around; this sometimes produces unwanted torque, so TCA tries to optimize engine's limit, but because there's only one engine (so no counter-torque available) its limit is "optimized" down to zero. The landing autopilot sees this and decides it doesn't have enough thrust to land... Yes, this is not an optimal method of deciding if a ship still has some fuel; but it's computationally cheap. I'm working on alternatives...

Solution: Switch that engine to UnBalanced mode.

Spoiler

In the next version there will be in-Editor helper for engine modes; and in flight such engines will be forced to UnBalanced mode automatically.

 

Link to comment
Share on other sites

TCA v3.3.4 for KSP 1.2.2 (2017.01.15)

ChangeLog:

Spoiler
  • Added Engine Profile Autoconfiguration in Editor.
  • Added Smart Engines mode for orbital flight:
    • In this mode engines are automatically grouped by thrust direction (e.g. all aft engines and all forward engines).
    • Then, when a big change in thrust direction is needed for a maneuver (say, 90 or 180 deg), an appropriate group is selected and enabled, while other groups are disabled.
    • There are 3 methods of selecting the appropriate group:
      1. Min. rotation: the selected group is the closest to the needed direction.
      2. Min. maneuver time: if groups differ in total thrust, the selected group is the group that has the smallest maneuver time, including time needed to change ship's attitude.
      3. Fuel efficiency: for small delta-V this falls back to Min. maneuver time; for large delta-V the total Isp of the group is also considered, and the group with the largest Isp has much more chance to be selected.
  • Improved TimeWarp interaction with user/mods:
    • Now TCA detects if something trying to decrease time warp and surrenders its control. This allows KAC, for instance, to make its gradual dewarping. And it allows a user to press DECREASE_TIMEWARP (default ',') or STOP_TIMEWARP (default '/') buttons and take control over the warp.
    • An on-screen message will inform you of any such event.
  • Added Launch Clamps handling by Rendezvous and ToOrbit autopilots. If you forgot to configure proper stage order for the clamps, TCA will automatically release them when needed.
  • If a ship has only one active engine and this engine is coaxial with the CoM, TCA automatically changes its Role to UnBalanced. This prevents much of a surprising and undesired ship's behaviour.
  • Fixed TCA Modules availability in Science Sandbox mode.
  • Improved Rendezvous autopilot's performance in case of escape trajectories and ultra-high altitude orbits (near SOI boundary).
  • BrakeNear autopilot now informs you about too large approach distance and waits for confirmation.
  • Fixed inappropriate active/inactive state of MatchV/BrakeNear buttons.
  • Miscellaneous bugfixes.

 

Link to comment
Share on other sites

Any idea why TCA is throwing NRE's?      

NullReferenceException: Object reference not set to an instance of an object
  at ThrottleControlledAvionics.WayPoint.Equals (ThrottleControlledAvionics.WayPoint wp) [0x00000] in <filename unknown>:0 
  at ThrottleControlledAvionics.NavigationPanel.WaypointOverlay () [0x00000] in <filename unknown>:0 
  at ThrottleControlledAvionics.TCAGui.draw_gui () [0x00000] in <filename unknown>:0 
  at AT_Utils.AddonWindowBase`1[T].OnGUI () [0x00000] in <filename unknown>:0

LOG             output_log             Mod List

Link to comment
Share on other sites

1 hour ago, Motokid600 said:

Any idea why TCA is throwing NRE's?      


NullReferenceException: Object reference not set to an instance of an object
  at ThrottleControlledAvionics.WayPoint.Equals (ThrottleControlledAvionics.WayPoint wp) [0x00000] in <filename unknown>:0 
  at ThrottleControlledAvionics.NavigationPanel.WaypointOverlay () [0x00000] in <filename unknown>:0 
  at ThrottleControlledAvionics.TCAGui.draw_gui () [0x00000] in <filename unknown>:0 
  at AT_Utils.AddonWindowBase`1[T].OnGUI () [0x00000] in <filename unknown>:0

LOG             output_log             Mod List

Wow! Bug report of a pro! :cool:

Thanks a lot, I'll look into it.

Link to comment
Share on other sites

2 hours ago, allista said:

Wow! Bug report of a pro! :cool:

Thanks a lot, I'll look into it.

Lol. After four years of coming to this forum for solutions you eventually learn a thing or two to help people help you.

Edit: By the way. Love the mod. Wish i used this alot earlier. It works. So im not too sure to what extent the NRE is impacting it. Not seeing a performance impact either. However it did spam that NRE for a period of time it seems so i figure it couldn't hurt to have it checked out.

Edit2: Yea ive been playing with it for hours now im having a blast, lol. I dont know whats going on those NREs show up in the logs, but i dont seem to experience them in-game. So *shrug* Questions about some of the funtionality. Im looking for something that can pilot a VTOL with a claw down onto another craft to pick it up and fly away. TCA seems a little shy when it comes to obstructions and slopes. Anyway to override this?

Edited by Motokid600
Link to comment
Share on other sites

4 hours ago, Motokid600 said:

Lol. After four year of coming to this forum for solutions you eventually learn a thing or two to help people help you.

Edit: By the way. Love the mod. Wish i used this alot earlier. It works. So im not too sure to what extent the NRE is impacting it. Not seeing a performance impact either. However it did spam that NRE for a period of time it seems so i figure it couldn't hurt to have it checked out.

Found and fixed this. Thanks again.

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