Jump to content

[1.1.x] Gimbal Trim v1.1.1 (2016-07-03) - For when you don't really want to go that way


sarbian

Recommended Posts

This is a module that is here to add the one missing feature of the stock gimbal : trim.

You just put the module GimbalTrim next to a ModuleGimbal in a part and make sure to set the gimbalTransformName if the gimbal does not use the stock one.

The future : 

  • AutoTriming (like my old mod did).
  • Mode that keeps the trimming inside the gimbal default limits.

GimbalTrim.png

Config :

MODULE
{
    name = GimbalTrim	
    
    gimbalTransformName = thrustTransform // name of the transform used by the gimbal module
    
    trimRange = 30   // the range allowed for the trim (if you want all the value to be the same)
    trimRangeXP = 30 // The range in the positive direction on the X axis
    trimRangeYP = 30 // The range in the positive direction on the Y axis  
    trimRangeXN = 30 // The range in the negative direction on the X axis   
    trimRangeYN = 30 // The range in the negative direction on the Y axis    
     
    useTrimResponseSpeed = false
    trimResponseSpeed = 60	

    limitToGimbalRange = false
}

Licence : MIT

Source : https://github.com/sarbian/GimbalTrim

Download : GimbalTrim-1.1.1.0.zip

Change log :

  • v1.1 
    • Fix the typo in useTrimResponseSpeed
    • Fix the handling of engine in front of the CoM or rotated
    • Add the limitToGimbalRange option. This avoids the engine to move out of its gimbal range when using trim. If you have an engine with a -10 +10 X gimbal range and you trim it by +5 degree you will get a -15 +5 range. This is more realistic that the default mode but lower your control range when you trim.
    • AVC file
  • v1.1.1
    • Fixing the engine rotation was actually not a good idea

 

Edited by sarbian
Link to comment
Share on other sites

Asymmetric-lifter aficionados, shuttle-style and otherwise, praise and thank you, Sarbian!

No more must we fly like clumsy savages, mashing the S key to haul the rocket into line by brute force! Gimbal trim: an elegant tool for a more civilized age.

Link to comment
Share on other sites

After a quick search I find many gimbalTransformName's in my games *.cfg files:

gimbalTransformName = ARI_exaust
gimbalTransformName = Bell
gimbalTransformName = Cylinder
gimbalTransformName = Cylinder_008
gimbalTransformName = EngineGimbal
gimbalTransformName = EngineGimbal_L
gimbalTransformName = EngineGimbal_R
gimbalTransformName = Engine_Cluster
gimbalTransformName = FanCore
gimbalTransformName = Gimbal
gimbalTransformName = GimbalBone
gimbalTransformName = Nozzle
gimbalTransformName = NozzleTransform
gimbalTransformName = Nozzles
gimbalTransformName = OP_C_LfOxEngine_Nozzle
gimbalTransformName = OP_ChB_Mp_Engine
gimbalTransformName = Obj_Gimbal
gimbalTransformName = SRBBell
gimbalTransformName = TBP_nozzle
gimbalTransformName = TT
gimbalTransformName = ThrustTransform
gimbalTransformName = engine
gimbalTransformName = gimbal
gimbalTransformName = gimbalBone
gimbalTransformName = gimbalTransform
gimbalTransformName = gimbal_point
gimbalTransformName = main
gimbalTransformName = nebula_exaust
gimbalTransformName = newThrustTransform
gimbalTransformName = nozzle
gimbalTransformName = nozzle_transform
gimbalTransformName = obj_gimbal
gimbalTransformName = thrustTransform
gimbalTransformName = thrust_transform
gimbalTransformName = turbonozzle
gimbalTransformName = turbothrust

So whats next? Make a MM patch for Gimbal Trim for all of it?

 

 

Link to comment
Share on other sites

1 hour ago, Kolago said:

After a quick search I find many gimbalTransformName's in my games *.cfg files:

gimbalTransformName = ARI_exaust
gimbalTransformName = Bell
gimbalTransformName = Cylinder
gimbalTransformName = Cylinder_008
gimbalTransformName = EngineGimbal
gimbalTransformName = EngineGimbal_L
gimbalTransformName = EngineGimbal_R
gimbalTransformName = Engine_Cluster
gimbalTransformName = FanCore
gimbalTransformName = Gimbal
gimbalTransformName = GimbalBone
gimbalTransformName = Nozzle
gimbalTransformName = NozzleTransform
gimbalTransformName = Nozzles
gimbalTransformName = OP_C_LfOxEngine_Nozzle
gimbalTransformName = OP_ChB_Mp_Engine
gimbalTransformName = Obj_Gimbal
gimbalTransformName = SRBBell
gimbalTransformName = TBP_nozzle
gimbalTransformName = TT
gimbalTransformName = ThrustTransform
gimbalTransformName = engine
gimbalTransformName = gimbal
gimbalTransformName = gimbalBone
gimbalTransformName = gimbalTransform
gimbalTransformName = gimbal_point
gimbalTransformName = main
gimbalTransformName = nebula_exaust
gimbalTransformName = newThrustTransform
gimbalTransformName = nozzle
gimbalTransformName = nozzle_transform
gimbalTransformName = obj_gimbal
gimbalTransformName = thrustTransform
gimbalTransformName = thrust_transform
gimbalTransformName = turbonozzle
gimbalTransformName = turbothrust

So whats next? Make a MM patch for Gimbal Trim for all of it?

 

 

I think the intention is that you add the module on a part-by-part basis. You can use a MM patch for this, but you'd want a separate entry (if you are a coding noob like myself) for each part you want to gimbal, with the correct transform name 

Edited by MrMeeb
I got shown up by a coding master
Link to comment
Share on other sites

Or use advanced MM magic :

@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#gimbalTransformName[*]],!MODULE[GimbalTrim]]
{    
    MODULE
    {
        name = GimbalTrim
        limitToGimbalRange = true
        gimbalTransformName = #$../MODULE[ModuleGimbal]/gimbalTransformName$
    }
}

@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[~gimbalTransformName[]],!MODULE[GimbalTrim]]
{    
    MODULE
    {
        name = GimbalTrim
        limitToGimbalRange = true
    }
}

 

Edited by sarbian
Link to comment
Share on other sites

v1.1 :

  • Fix the typo in useTrimResponseSpeed
  • Fix the handling of engine in front of the CoM or rotated
  • Add the limitToGimbalRange option. This avoids the engine to move out of its gimbal range when using trim. If you have an engine with a -10 +10 X gimbal range and you trim it by +5 degree you will get a -15 +5 range. This is more realistic that the default mode but lower your control range when you trim.
  • AVC file

Download : GimbalTrim-1.1.0.0.zip

Link to comment
Share on other sites

quick question, is this something that can be fixed on my end or do I need to ask the mod creator?

I tried with the stock cluster and it worked fine, but these mod parts are acting all weird

(btw, on my first attempt I've set the ranges to the original limits for these parts, and the result was the same, so I exaggerated to show it better)

Edited by JoseEduardo
Link to comment
Share on other sites

10 minutes ago, JoseEduardo said:

quick question, is this something that can be fixed on my end or do I need to ask the mod creator?

hum, a bit hard to explain but it does that because this is the way I coded it. The X/Y gimbal direction depends on how the model is made. I should add a setting that turn them in pitch/yaw instead (each mode has its use...)

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 11 months later...

At risk of angering the modding gods, I ask... what would it take to get this wonderful and incredibly useful mod working in KSP 1.3? Might it be this mysterious recompile spoken of by some? Or is some other kind of sorcery required?

I can sacrifice a small animal or two if that will help. Burnt offering, maybe. Let me know.

Link to comment
Share on other sites

  • 1 month later...
  • 2 years later...
On 7/3/2016 at 8:40 PM, sarbian said:

Or use advanced MM magic :


@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#gimbalTransformName[*]],!MODULE[GimbalTrim]]
{    
    MODULE
    {
        name = GimbalTrim
        limitToGimbalRange = true
        gimbalTransformName = #$../MODULE[ModuleGimbal]/gimbalTransformName$
    }
}

@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[~gimbalTransformName[]],!MODULE[GimbalTrim]]
{    
    MODULE
    {
        name = GimbalTrim
        limitToGimbalRange = true
    }
}

 

This module manager config does not work on 1.9.1 for stock engines.  Engines all disappeared. Could you give me some advise on rewriting this module manager config for 1.9.1? Thanks very much!

Edited by Hsinyu
Link to comment
Share on other sites

8 hours ago, Hsinyu said:

This module manager config does not work on 1.9.1 for stock engines.  Engines all disappeared. Could you give me some advise on rewriting this module manager config for 1.9.1? Thanks very much!

Welcome to our forum. :) This mod hasn't been updated for a while but the OP still visits here and might be inspired to pick it up again. 

Folks, please don't fault others for "necroing" discussions. If it's a problem, just report the post and let the moderators deal with it rather than give orders to each other. Some content has been removed. 

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