Jump to content

[0.21.x] KerbCom Avionics 0.3.0.6 Alpha (29 August) - now with video!


ZRM

Recommended Posts

KerbCom Avionics

After surveying the current crop of inadequate flight control systems, KerbCom decided to roll out their own firmware upgrade to try to ensure that your vessel moves as you expect it to. In short, you'll (probably) like the way you move.

For posts relating to version 0.2 or later (other than this post), go to post 54.

New in version 0.3 Alpha:

  • Added support for engine gimbals and reaction wheels. This allows the solver to control and balance virtually any vessel that contains a reaction wheel, including but not limited to VTOLs, space shuttles, and all vessels that previously had an unsolvable RCS thruster layout (e.g. CSMs with one ring of RCS ports).
  • New "combined" control mode that balances vessels during ascent, orbital burns and during docking automatically.
  • Now using a native industrial strength solver for more stability and speed.
  • UI streamlining, optimisations and bugfixes.
  • If you somehow don't like or can't use the new gimbal support, this mod also implements a replacement of the stock gimbal control so that you can use gimbals to roll your vessel, and have gimbals above the COM that work correctly.

This plugin is designed to balance the forces that you fly your contraptions with. It currently supports RCS thrusters, reaction wheels, liquid/jet engines and gimbals. It works using a linear programming solver that finds the exact solution to the problem. It does not use guesswork or approximations.

This plugin stops unbalanced vessels from rotating inadvertently under thrust. This is very useful for asymmetric vehicles, like piggy-backed shuttles, and crafts that perform vertical take-offs and landings (VTOL). It does not stop you from controlling the vessel, rather it "trims" the rotation of the vessel.

The other main feature is the balancing of RCS port thrusts during docking so that your vessels do not drift away while rotating them or using SAS, and so that they do not rotate inadvertently while translating. This makes docking large vessels much easier.

This plugin is alpha software in active development. If you think you have found a bug, a performance issue, something missing or unclear in the documentation, or have a feature request, please check that it has not already been mentioned, then post it in the development thread.

VTOL demonstration video, courtesy of Torminator via this post:

Current limitations:

  • The new combined mode doe not support SRBs. If your craft uses SRBs, please make sure this mode is not active at the same time as any SRBs.
  • There is also no support for balancing aerodynamic forces from wings and control surfaces. Use Ferram Aerospace Research if you want to tweak aerodynamic behaviour. This mod is primarily designed for space applications.
  • Due to the use of native code, the current release is Windows and Mac only. This is more just because I have yet to investigate how to get native code invocation working correctly on Linux than any inherent difficulty, so expect this situation to change.
  • The GUI does not yet support changing settings using text entry, or editing settings per-vessel in the VAB/SPH.
  • Fuel is not balanced. For crafts that require this, there are other mods available.
  • Vessels that require the net engine thrust to be in a specific direction other than the average of all engine directions will have to wait until I implement a direction selection feature.

Plans for the next version:

  • An auto-hover controller for VTOLs.
  • Jet engine throttle compensation.

I have ideas for many more features in the future, such as precision autopilots and display panels, as well as removing some of the current limitations.

Tips:

  • This mod does not negate the need for good RCS placement to maximise fuel efficiency.
  • For best fuel efficiency on most vessels you will want to turn down RCS linear and torque strength.
  • Bear in mind that this mod does not balance aerodynamic forces. Moving a VTOL at high speed in atmosphere will likely require manual trimming.
  • Enabling/Disabling the GUI can be bound to action groups.
  • If you accidentally hide the GUI, it can be made visible again using the context menu either on your command pod or your MechJeb AR202 (depending on how you installed the plugin).
  • Many VTOLs behave much better (and more like a helicopter) if you lower the torque strength considerably, often to around 10%. VTOLs with multiple engines tend to have very large torque authority.

Installation issues:

If you are upgrading from a previous version, please undo any changes to config files you made in order to use that version. The new version should not require any config changes, not even to deal with the RCS FX glitch, which is now fixed. I also recommend deleting your old KerbComAvionics directory before installing.

This plugin uses Module Manager to add the avionics module to either each of the stock command pods, or the MechJeb AR202 case. A version of this is included with this plugin, but it is always best to check for updates to Module Manager separately.

Download version 0.3.0.6 Alpha for Windows here

Download version 0.3.0.6 Alpha for Mac here

Linux users can for the time being still download the old cross-platform version here. You can still run the new version on Linux, but you cannot use the control modes. This means that the only new feature available to you is the replacement for stock gimbal control.

Source available here

88x31.png

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

This plugin makes use of lp_solve, an open source linear programming library. It is used in this plugin under the terms of the GNU Lesser General Public License. You can read the terms of this license at http://www.gnu.org/licenses/lgpl.html.

Changelog

0.3.0.6:

- Added fix for editor lag bug caused by log exception spamming.

- Added fix for GUI lag by implementing caching.

0.3.0.5:

- Added a workaround recommended by Majiir for dealing with a known KSP bug causing mods to conflict.

0.3.0.4:

- The previous fix, although it solved the bug, was not quite perfect, so here's a new version based on a suggestion by havocx42.

0.3.0.3:

- Now with a proper fix that fixes the flameout bug and the fuel tank bug properly.

0.3.0.2:

- Added fix for flameout bug. This needs testing to make sure it does not break something else.

0.3.0.1:

- Bugfix for reaction wheel issues.

- Possible fix MechJeb Smart A.S.S compatibility problems (requires testing).

0.3:

- Added support for engine gimbals and reaction wheels.

- New "combined" control mode.

- Now using LP Solve, a fast open source native solver.

- UI streamlining, optimisations and bugfixes.

- Fixed the RCS FX glitch, finally.

0.2.0.1:

- Fixed a small bug that caused RCS to have infinite fuel.

0.2:

- Complete redesign of the plugin. New solver, new interface, new logic. New engine balancing support.

Edited by ZRM
Fixed video
Link to comment
Share on other sites

I'm playing with it now. I do have some questions though:

Is the coordinate GUI supposed to stay up all the time? Is there a way to make it go away when not needed?

Sent you a PM

Edited by Conarr
Link to comment
Share on other sites

Does anyone else have a ring of RCS blocks that just keeps showing the firing animation even when it's not actually firing/using propellant (even when RCS is off entirely)? It seems my lower ring is "always firing" and the upper ring only fires as required. I've only tried the plugin on one ship in a brand new save (with only mechjeb and this mod), but that ship had mechjeb 2.0.7 on it so maybe it's an interaction there. I might have a chance to try it out tomorrow with a non-mechjeb ship.

Link to comment
Share on other sites

Does anyone else have a ring of RCS blocks that just keeps showing the firing animation even when it's not actually firing/using propellant (even when RCS is off entirely)? It seems my lower ring is "always firing" and the upper ring only fires as required. I've only tried the plugin on one ship in a brand new save (with only mechjeb and this mod), but that ship had mechjeb 2.0.7 on it so maybe it's an interaction there. I might have a chance to try it out tomorrow with a non-mechjeb ship.

This happens for me, is a KSP bug. Not Mechjeb, nether CRCS.

And don't have a cause and moment. Happen without warning, and go away reloading.

Link to comment
Share on other sites

I'm playing with it now. I do have some questions though:

Is the coordinate GUI supposed to stay up all the time? Is there a way to make it go away when not needed?

Depends what you mean by "all the time". I've made it so that you can hide most of the window, but I suppose I could add a button in the context menu for the part for showing/hiding the window.

Link to comment
Share on other sites

WOW, it works with Mechjeb, even on docking mode?

Could you please put some videos?

This sound great!

:D

It should work with MechJeb (just don't enable the new MechJeb RCS Balancer - it will clash). MechJeb provides standard control input like anything else (including the user), so it should behave fine as long as you have tuned the CRCS correctly (though I have not tested this).

I'm considering putting up some screenshots demonstrating simple use of the plugin. I give permission to anyone who wants to demonstrate it in a video, however please make it clear that this plugin is still very much in an experimental phase. In theory I should be able to eventually make a complete replacement for the vanilla RCS system that you never need to disable.

Edited by ZRM
Link to comment
Share on other sites

This happens for me, is a KSP bug. Not Mechjeb, nether CRCS.

And don't have a cause and moment. Happen without warning, and go away reloading.

That's reassuring. However I personally have noticed this happen much more often with CRCS enabled than without. Anyway, it seems to only have visual impact, so I recommend ignoring it for now.

Link to comment
Share on other sites

Great. I do not had time yet to test, to busy at work, but i will.

The thing to not pollute the screen is to have a button, or a way to add in MechJeb menu, tu be able to hide windows.

Add a button is not the best way, because, in some day we will have N buttons and none of the game screen. some add makers use the module right buttom contest menu to have an option...

Cheers :)

Link to comment
Share on other sites

I was thinking of adding a button, not to the window, but to the context menu on the part containing the module. You could even bind it to an action group.

Link to comment
Share on other sites

I was thinking of adding a button, not to the window, but to the context menu on the part containing the module. You could even bind it to an action group.

Adding to context menu & action group is good. But if you have lots of options, it's really not a good idea to list them all in the context menu. A menu item to show/hide a window should be good.

Link to comment
Share on other sites

Adding to context menu & action group is good. But if you have lots of options, it's really not a good idea to list them all in the context menu. A menu item to show/hide a window should be good.

The button I was referring to was the one mentioned by Climberfx for hiding/showing the window. So there will only be one.

Link to comment
Share on other sites

I was thinking of adding a button, not to the window, but to the context menu on the part containing the module. You could even bind it to an action group.

This would be perfect...

And that way, you will be remembered by the great mod you did, not by the great window that obscure the game :P

Link to comment
Share on other sites

I have now added this button and action. There is now also an action for toggling CRCS. However before releasing this update, I am trying to eradicate the glitchy FX problem that others have mentioned. A particular test craft of mine always experiences it. I believe it is related to the order in which parts and modules are initialised. For some reason some FXGroups are going astray during initialisation. So far I have managed to make it so that the RCS ports with the problem now have no FX at all. This is better and less distracting than previously, however it still isn't perfect. It is difficult to retroactively clean up the mess caused by ModuleRCS.

Link to comment
Share on other sites

I have now added this button and action. There is now also an action for toggling CRCS. However before releasing this update, I am trying to eradicate the glitchy FX problem that others have mentioned. A particular test craft of mine always experiences it. I believe it is related to the order in which parts and modules are initialised. For some reason some FXGroups are going astray during initialisation. So far I have managed to make it so that the RCS ports with the problem now have no FX at all. This is better and less distracting than previously, however it still isn't perfect. It is difficult to retroactively clean up the mess caused by ModuleRCS.

Oh, I remember that I've encountered a similar situation before.

When I was developing the Engine Thrust Controller plugin, I've seem that the engine keeps flaming in a incorrect direction. I guess it's because the thrust & thrust vector transform matrice are not initialized. Because my part module is "hijacking" the ModuleEngines...

Maybe you can wait for a while and then replace the ModuleRCS later...

Link to comment
Share on other sites

I have tried waiting until the first FixedUpdate. I don't think the problem is how long I wait, but more what happens to FXGroups left over from module instances that have been removed. I have tried deleting all emitters manually, but this still doesn't remove the effect.

Also, what exactly do you mean by "hijacking"? Replacing? Modifying properties?

Link to comment
Share on other sites

I have tried waiting until the first FixedUpdate. I don't think the problem is how long I wait, but more what happens to FXGroups left over from module instances that have been removed. I have tried deleting all emitters manually, but this still doesn't remove the effect.

Also, what exactly do you mean by "hijacking"? Replacing? Modifying properties?

I was just modifying its properties... but then get some weird errors so its initialization might get halted... well... probably a different problem.

Link to comment
Share on other sites

Also, what was Engine Thrust Controller? I can't find it on the forum and the space port page is broken.

Well, that's a plugin i wrote several months ago to be able to adjust maxThrust of engines both in Editor mode and in flight (there's an option to disable in-flight adjustment). And that seems gone with the forum/spaceport collapse... Anyway, spaceport seems to hold that plugin still. It's just that the page is not displayed correctly, only with a link to the file.

Link to comment
Share on other sites

Well, that's a plugin i wrote several months ago to be able to adjust maxThrust of engines both in Editor mode and in flight (there's an option to disable in-flight adjustment). And that seems gone with the forum/spaceport collapse... Anyway, spaceport seems to hold that plugin still. It's just that the page is not displayed correctly, only with a link to the file.

And you don't have the link or even the original on your machine? this is kinda a tell tail.

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