Jump to content

[1.9-1.10] Throttle Controlled Avionics


allista

Recommended Posts

22 hours ago, smjjames said:

Dang, sorry to hear about that, was wondering what happened with the sudden absence.

Anyway, been using an older beta version for a while due to a docking port related bug which I had somehow thought was a stock bug, resulting in it getting missed for so long. I've detailed it both on the spreadsheet and here on the thread.

@smjjames, thank you so much for the support here at the forum that you provided this whole time! It's awsome :D

About docking port, yea, I'll be looking into it.

Link to comment
Share on other sites

On 12/22/2015 at 5:15 PM, Speadge said:

damn this mod is fantastic!

Too sad, that JetEngines are hard to support due their responsetime

On 12/28/2015 at 2:18 AM, inigma said:

I don't really understand why they can't be supported. There must be some mathematical equation that would keep jet engine based VTOLs under a very stable hover control.

On 12/29/2015 at 4:19 AM, Speadge said:

i think its cause every engine needs different times to throttle up.. even some rockets burn 100% on ignition, others need 5 seconds

The equation for stationary state is indeed simple:

Sum(torque) = needed-torque
AND
Sum(thrust) = needed-thrust (for hover = -Mgr)

The problem with stationary states, though, is that they don't take into account the time it takes for the system to reach them.

To put it simply, at each moment I can know exactly what thrust each engine should provide. The question is: will they comply? With rocket engines the answer is "yes, almost instantly". But with jets and the likes it's "yes, but only asymptotically; and the error will become acceptable only after some time." But if you (or SAS, or any other autopilot) change the right side of the equations, the system is out of stationary again.

Suppose you're trying to rotate. You say to  TCA: provide me the torque of 50kN/m in that direction, please. OK, says TCA, and translates your request into the proper thrust limits. But the engines are lazy beasts and give you the requested torque slowly in a timespan of ~10s. But during that time the ship has already turned enough, and you yell: "stop, stop, give me the zero torque!", and after a few seconds, because the roll had already went to far: "ooh no, not zero, but 100kN/m in the opposite direction!". But the engines still flipping you over...

So, in order to manage slow engines TCA needs not only to calculate the needed thrust limits, but also to predict your actions. And for that there's no equations.

In TCA3 I have solved this issue to some extent by changing the thing you request to be not the torque, but the needed direction. This way TCA can calculate when to start to change engines' thrust to stop the rotation when needed. But the intrinsic sluggishness of the system as a whole cannot be decreased.

Edited by allista
Link to comment
Share on other sites

I solved jet and KAX huey rotor hovering trough kOS script. Not torque only amount of vertical thrust needed for hovering. Also works with only one engine, while TAC can provide support only with 2 or more engines.

Two important things - minimal throttle is not zero, it is ~0.85 TWR, while maximum throttle is calculated for 1.2 TWR. Delay between two iterations for PID controller is 0.5 sec. kOS comes with it's own PID library that already have option to set minimum and maximum limit for PID output - quite usefull feature.

My kOS script is not so advanced as TAC mod, it does not take in account torque and actual vector direction, it assume that pilot already positioned craft verticaly - still need to learn a lot how vectors were defined in unity game engine and more specific in KSP and kOS to be able for better version of script.

Anyway, if it can help to improve already awesome TAC mod, it is available in this archive, along with craft files.

Forgot to say, kOS is aware of each celestial body in kerbin universe, that comes handy when you need to calculate gravity acceleration on each celestial body, for powered landing feature.

Link to comment
Share on other sites

TCA3 BETA v36 2015.12.12

This is a Release build, meaning there's no color debug lines protruding from each vessel and much less spam in logs.

 

Quote

v36
* Fixed throttle-blocking logic that disabled engines on MatchVel, but not reenabled them on disabling the program.
* Working on the markdown maual for TCA3 in a separate file not hardcoded into plugin:
    * Added markdown parser that compiles a rich-text TCA manual into a separate window with tabs for sections. 
    * Added MAN toolbar button; the button is now always visible and summons Manual by default.
    * Added help button to EnginesProfileEditor.
* When TCA is Enabled, force update active profile, lest TCA shut off the engines in midflight.
* Added exhaust damage safe offset

 

Edited by allista
Link to comment
Share on other sites

On 12/17/2015 at 7:13 PM, Talavar said:

 No hover, I simply set different engines to maunal, main engine, etc.. and launched and pressed y. affter about 15seconds, my srb's stopped firing with 1/2 fuel remaining... Then I tried to change the engine configuration after reverting flight, but it kept reverting back to the old settings. I tried different groups, no groups, etc,etc. no fixes, it always went back to the old setting.. it's like it wasn't remembering my new settings.

Thank you for your report. I've found the problem in the code and, hopefully, fixed it. Will include it in the next beta.

Link to comment
Share on other sites

This mod is fantastic, makes flying the USI Honeybadger an absolute breeze, (in formation too!). Cheers for all the hard work :D

I have a question - well, more of an observation and possible bug report/feature request - about the cruise control and waypoint autopilot: no matter what I set the horizontal speed limit to or how severely I pitch forward (that is how to tell TCA to go faster in these modes, yes?), my atmo craft never seem to reach anything near the speed I can achieve by using 'level' 'hover' mode for my main lift engines (the honeybadger electric prop VTOL engine in balanced thrust mode) and manual engine control for rear thrusters (stock jets, the best ones).

The autopilots do use the manual engines to bring it up to speed from a standstill so I know it is taking them into account, but I'm getting ~40m/s to 250m/s+ much slower acceleration compared using manual thrust control or CC (while TCA keeps me fixed vertically, which is brilliant!). I can temporarily up the speed by pitching forward, which engages the manual engines as I assume it is supposed to, but the system always ends up drifting back down to a slower pace fairly quickly.  Cruise control works as expected with pitching forward to increase thrust output (I must have misremembered that), but 'goto' and 'follow route' seem to suffer from a severe case of moving like a tortoise when they could be going full steam.

I guess I'm just not sure how this lift and thrust system is supposed to work for TCA (I don't think my craft is non-standard from the others I've seen on the honeybadger and onther VTOL threads, like this one). It seems like a bug, or maybe something that hasn't been implemented yet, or maybe a speed sanity check that I want to ignore... :Pbecause keeping my massive flying bricks in the sky in formation, with manual thrust control is spot on. 

If you need a demonstration I'd be happy to put up a video or something, unfortunately I've lost the craft file so it may take some time to put it back together :P I put it back together.

 

EDIT: I went back with the remade craft and checked a few things, seems my memory was a bit wrong as to what was happening: Cruise control works fine but there is still very slow acceleration issue with the waypoint autopilot.

Edited by MakeItSoAC
updated bug report
Link to comment
Share on other sites

 

On 2/12/2016 at 5:18 PM, MakeItSoAC said:

This mod is fantastic, makes flying the USI Honeybadger an absolute breeze, (in formation too!). Cheers for all the hard work :D

I have a question - well, more of an observation and possible bug report/feature request - about the cruise control and waypoint autopilot: no matter what I set the horizontal speed limit to or how severely I pitch forward (that is how to tell TCA to go faster in these modes, yes?), my atmo craft never seem to reach anything near the speed I can achieve by using 'level' 'hover' mode for my main lift engines (the honeybadger electric prop VTOL engine in balanced thrust mode) and manual engine control for rear thrusters (stock jets, the best ones).

The autopilots do use the manual engines to bring it up to speed from a standstill so I know it is taking them into account, but I'm getting ~40m/s to 250m/s+ much slower acceleration compared using manual thrust control or CC (while TCA keeps me fixed vertically, which is brilliant!). I can temporarily up the speed by pitching forward, which engages the manual engines as I assume it is supposed to, but the system always ends up drifting back down to a slower pace fairly quickly.  Cruise control works as expected with pitching forward to increase thrust output (I must have misremembered that), but 'goto' and 'follow route' seem to suffer from a severe case of moving like a tortoise when they could be going full steam.

I guess I'm just not sure how this lift and thrust system is supposed to work for TCA (I don't think my craft is non-standard from the others I've seen on the honeybadger and onther VTOL threads, like this one). It seems like a bug, or maybe something that hasn't been implemented yet, or maybe a speed sanity check that I want to ignore... :Pbecause keeping my massive flying bricks in the sky in formation, with manual thrust control is spot on. 

If you need a demonstration I'd be happy to put up a video or something, unfortunately I've lost the craft file so it may take some time to put it back together :P I put it back together.

 

EDIT: I went back with the remade craft and checked a few things, seems my memory was a bit wrong as to what was happening: Cruise control works fine but there is still very slow acceleration issue with the waypoint autopilot.

Slow acceleration is intentional and its rate is configurable through TCA.glob file. The prime reason is aerodynamics of hover-only crafts (like the ones in my videos, without aft engines). To accelerate, they need to pitch, but pitching changes the lifting force; in particular, incoming airstream starts to push the craft downward. If it pitches too low trying to accelerate faster, it may become uncontrollable and even flip over, depending on the current speed.

And in a navigation to the target scenario there's also a matter of slowing down near the destination: the closer you are too it, the slower you should go to brake in time.

I'll try to figure out how to correct this behavior in the aft-engines case without decreasing the robustness of autopiloting. 

Edited by allista
Link to comment
Share on other sites

47 minutes ago, allista said:

 

Slow acceleration is intentional and its rate is configurable through TCA.glob file. The prime reason is aerodynamics of hover-only crafts (like the ones in my videos, without aft engines). To accelerate, they need to pitch, but pitching changes the lifting force; in particular, incoming airstream starts to push the craft downward. If it pitches too low trying to accelerate faster, it may become uncontrollable and even flip over, depending on the current speed.

And in a navigation to the target scenario there's also a matter of slowing down near the destination: the closer you are too it, the slower you should go to brake in time.

I'll try to figure out how to correct this behavior in the aft-engines case without decreasing the robustness of autopiloting. 

Ah right, that clears things up a lot, thanks! I think that aft-engines are already working very well at the beginning and end of the flight as they are used for acceleration and braking as required, its only in the long haul between distant targets that it really becomes apparent. By then its generally pointed in the right direction thought so I just set it to cruise or hover and throttle up. 

Seeing that this strategy is working for me for now I'll just keep truckin, but it would be great to see it go full speed on auto and leave my pc while my convoy ships goods around :)

 Thanks for all of your hard work, seeing what your mod does as it balances thrust reaffirms my belief that it would be impossible for me to fly VTOLs without it :P

Link to comment
Share on other sites

 v37 2016.02.15

This is a Release build, meaning there's no color debug lines protruding from each vessel and much less spam in logs.

Quote

v37
* Fixed rendezvous bug that was caused by changing VesselRanges on vessel load.
* Fixed SRB problem.
* Increased ExhaustSafeDist after smjames's tests.
* More or less finished Basics, Profiles, Attitude and VSC sections of the INSTRUCTIONS.
* Renamed "Use Throttle" to "AutoThrottle" for consistency.
* Fixed AppLauncher showing white square instead of the icons.
* Fixed the bug with the Editor window not becoming Available on vessel load.

 

Edited by allista
Link to comment
Share on other sites

First off I'd like to say I really like this mod a lot.  I have been testing the version 3 beta for about a week now, and the only problems I've had with it were mistakes made on my part.  I have a couple of questions / requests.  Is there a way to type in a course and speed for the cruise setting?  Also is there a way to type in the coordinates for a waypoint?  If not that would be my request. 

Thank you for coding a very useful mod.

Link to comment
Share on other sites

32 minutes ago, drtarr1962 said:

First off I'd like to say I really like this mod a lot.  I have been testing the version 3 beta for about a week now, and the only problems I've had with it were mistakes made on my part.  I have a couple of questions / requests.  Is there a way to type in a course and speed for the cruise setting?  Also is there a way to type in the coordinates for a waypoint?  If not that would be my request. 

Thank you for coding a very useful mod.

No, currently there's no way to type in the lat-lon coordinates for a waypoint. The only two ways to add a waypoint is to directly click on a surface (in map view or in flight) or select a target vessel and add it as a waypoint. I'll think about adding this feature.

As for the cruise control, there's the Fly macro that does exactly the thing: you can type in the bearing in degrees and the needed speed in m/s. Aside from that, in cruise control mode the needed speed is controlled by pitching and direction by turning the nose of the vessel.

Link to comment
Share on other sites

On 2/14/2016 at 3:52 PM, MakeItSoAC said:

Ah right, that clears things up a lot, thanks! I think that aft-engines are already working very well at the beginning and end of the flight as they are used for acceleration and braking as required, its only in the long haul between distant targets that it really becomes apparent. By then its generally pointed in the right direction thought so I just set it to cruise or hover and throttle up. 

Seeing that this strategy is working for me for now I'll just keep truckin, but it would be great to see it go full speed on auto and leave my pc while my convoy ships goods around :)

 Thanks for all of your hard work, seeing what your mod does as it balances thrust reaffirms my belief that it would be impossible for me to fly VTOLs without it :P

I've tried to account for lateral engines to provide faster acceleration in goto/waypoint navigation. Could you test it with your scenario and, if it's not too much trouble, with some hover-only crafts?

https://www.dropbox.com/s/rnrur5gpv6sfkwx/ThrottleControlledAvionics-v2.3.0.37-fast_accel-test.zip?dl=0

Link to comment
Share on other sites

14 hours ago, allista said:

No, currently there's no way to type in the lat-lon coordinates for a waypoint. The only two ways to add a waypoint is to directly click on a surface (in map view or in flight) or select a target vessel and add it as a waypoint. I'll think about adding this feature.

As for the cruise control, there's the Fly macro that does exactly the thing: you can type in the bearing in degrees and the needed speed in m/s. Aside from that, in cruise control mode the needed speed is controlled by pitching and direction by turning the nose of the vessel.

I haven't played with the macro's yet, but that sounds like it will do what I want it too.  As far as the waypoints go, I can live with it like it is.

Link to comment
Share on other sites

On 2/15/2016 at 5:55 AM, allista said:

I've tried to account for lateral engines to provide faster acceleration in goto/waypoint navigation. Could you test it with your scenario and, if it's not too much trouble, with some hover-only crafts?

https://www.dropbox.com/s/rnrur5gpv6sfkwx/ThrottleControlledAvionics-v2.3.0.37-fast_accel-test.zip?dl=0

Awesome! It works incredibly well up until 208m/s where my frame rate starts tanking. Limiting the thrust to <200 eliminates the issue. Also tested with the stock lift only rocket engine VTOL (+a couple extra engines) and it didn't seem to be affected at all, however I wasn't able to reach the same speeds to test if the framerate tanked in that setup. If you would like me to do some other specific tests just let me know :)

I did notice another bug while testing this relating to returning to a previously landed craft (from space centre or vessel swapping when in range) with TCA enabled, where TCA cannot take control of the engines. I have to turn off TCA, get my engines working manually by throttling up, then turn TCA back on again to engage it. 

Cheers :)

Link to comment
Share on other sites

3 hours ago, MakeItSoAC said:

Awesome! It works incredibly well up until 208m/s where my frame rate starts tanking. Limiting the thrust to <200 eliminates the issue. Also tested with the stock lift only rocket engine VTOL (+a couple extra engines) and it didn't seem to be affected at all, however I wasn't able to reach the same speeds to test if the framerate tanked in that setup. If you would like me to do some other specific tests just let me know :)

I did notice another bug while testing this relating to returning to a previously landed craft (from space centre or vessel swapping when in range) with TCA enabled, where TCA cannot take control of the engines. I have to turn off TCA, get my engines working manually by throttling up, then turn TCA back on again to engage it. 

Cheers :)

Thanks!

I assume the reason you couldn't get to such speed is the drag. Hovercrafts are innately slower than planes, cause they have to divide their thrust between lift and linear propulsion, and the more they pitch to accelerate, the more drag they experience. That's why helicopters are often have their propellers tilted forward, so they themselves don't have to.

The fps problem is strange though; there's nothing special about 200m/s, and I haven't had any problems with fps connected with speed O.O

As for the engines that don't start: are they airbreathing? If so, they might be in the flameout state due to the lack of air intake. It happens when TCA sets thrust limits to zero upon landing. I've tried to work around it, but with little success.

Edited by allista
Link to comment
Share on other sites

8 minutes ago, allista said:

The fps problem is strange though; there's nothing special about 200m/s, and I haven't had any problems with fps connected with speed O.O

Hmmm it may have been an issue with OpenGL and mach effects, just tested on dx11 and the frame drop is muuuuuuch less pronounced. I think I'm going to put it down to an unrelated game engine issue. 

15 minutes ago, allista said:

As for the engines that don't start: are they airbreathing? If so, they might be in the flameout state due to the lack of air intake. It happens when TCA sets thrust limits to zero upon landing. I've tried to work around it, but with little success.

Indeed they are. I did notice sparks on vessel load but didn't put 2 and 2 together. All engines are stuck with a thrust limit of 1 when reloaded. As long as its a known issue I'm content to just keep working around it in-game for now :)

Link to comment
Share on other sites

3 minutes ago, Buster Charlie said:

Love this mod, have only used it so far for hover landing tests near the launch pad.

 

If I had a set of space  tugs that could dock with a space station, and wanted to move an entire space staton,  would this mod compensate for the asymmetrical layout of the space station thrusters (on the docked tugs)

@allista can give you better answer, but I don't see a reason why it should not. As much I was able to understand TCA calculate torque from engines all time and adjust throttle on each engine to compensate asymetrical overall thrust. Meaning it does not calculate craft properties in SPH or VAB, it does it in flight all times, so as soon as you dock thug with another ship/parts it will going to recalculate everything properly once again.

Although, I didn't tried it in space, only some docking/ craft part transports on Kerbin, but I don't see a reason why it should not work in space too.
Except only if some wierd navball changes(control from dock port/control probe) can confuse TCA.

Link to comment
Share on other sites

8 minutes ago, Buster Charlie said:

Love this mod, have only used it so far for hover landing tests near the launch pad.

 

If I had a set of space  tugs that could dock with a space station, and wanted to move an entire space staton,  would this mod compensate for the asymmetrical layout of the space station thrusters (on the docked tugs)

As far as it is physically possible, yes.

In this scenario I would temporarily set some of the tugs' engines to Maneuver role and some to Main, depending on the way you're going. This will provide both standard main throttle control over the propulsion and increased control authority when thrusting to maintain attitude.

Link to comment
Share on other sites

1 hour ago, Buster Charlie said:

Any chance this can get uploaded to spacedock?

As soon as I receive an account confirmation email from them. I've filled in the registration form 16hrs ago :cool:

Edited by allista
Link to comment
Share on other sites

@allista check OP in SpaceDock thread:

Quote


Critical Known Issues:

  • None, but if you need manual activation of your username (if you don't get your confirmation email) please seek out darklight on #spacedock on IRC espernet or send @godarklight a PM on this forum with your SpaceDock username to get manually activated if you are unable to receive your confirmation email.

 

Link to comment
Share on other sites

After 1.5 months I think it's time to end the poll about TCA3 gameplay specifics.

There were 165 votes in total, and the results are more or less clear. One thing I want to mention, though, is the strange "quirk" in the data: the second graph shows the time (in seconds) between successive votes, and there's a striking dent in it. More than 20 votes in a row were made less than 30 seconds apart with the exact same answers. Statistics says that the probability of this being a random event of 20 people voting at the same time is too low; so I have to consider this as a deliberate attempt to sway the vote. Be as it may, I decided to exclude all these votes but one, which left us with the picture you see below. The data itself is available as a csv table.

  • All command modules will continue to have TCA onboard.
  • TCA updates in career mode will immediately affect all previously launched vessels.
  • Various TCA functionality will be distributed among TechTree nodes using dummy parts.

Oqzxuua.pngOQz0vbN.png

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