Space Engineers

Space Engineers

Not enough ratings
Gun lane stabilization
By Eddo of Rivia
A passive gun lane stabilization system for custom turrets using gyroscpes and rotors.
2 rotors controll, 2 rotors and gyroscopes stabilize.
   
Award
Favorite
Favorited
Unfavorite
Introduction
As the new custom turret controller block allows for, guess what, custom turret builds, a few features still feel absent, like the ability to have the turret stabilized for better acuracy while shooting on the move.

This guide aims to show you my implementation of a gun lane stabilization system that keeps your turret pointet in the same direction no matter how your vehicle is moving.
Principle of construction

This awesome combat vehicle shows of a barebones version for a stabilized turret, using a setup of 4 rotors and 2 gyroscopes.

The basic idea beeing to use 1 rotor on each axis to allow unrestricted movement and achive a stabilization by having their torgue set to 0 (rotor 1 & 3) while 2 more rotors are used to turn the turret (rotor 2 & 4) in combination with a gyroscope on each of their base to effectively give them someting to grip on to turn the turret.

The example vehicle

The Setup:
  1. Rotor - Called "rotor az stab" :
    • Turn block ON
    • Set torgue to 0 and breaking torgue to a high value, eg. the default 448000.
    • Activate "Share Intertia Tensor"
    • Adjust rotor offset if necessary (Clang or friction when using the turret, applies for all rotors!)

  2. Rotor - Called "rotor az cont" :
    • Turn block ON
    • Set torgue to a high value, default vanilla is fine.
    • Use this rotor as the azimuth control rotor in your CTC.
    • The base section gets a gyroscope set to override mode. Yaw, pitch, roll set to 0
    • Adjust rotor offset if necessary (Preferrably adjust this over the 1. rotor)

  3. Rotor - Called "rotor el stab" :
    • Turn block OFF
    • Set breaking torgue to 0 at first. This can be adjusted to a very low value of a few hundrets of N to a few kN to counter light sag of the gun assembly if the center of mass is not perfectly aligned with the elevation rotors (more later)
    • The need for rotor offset depends on the exact construction of your turret, if the gun assembly is surrounded by armor you want to keep it at zero, while a side mounted gun can be offset if necessary

  4. Rotor - Called "rotor el cont" :
    • This rotor needs to be attached to the gun assembly as it needs to be constructed in inverse to allow the AI to control the turret without derping out. If only used by players this is technically not necessary, but i still recomment the inverse construction.
    • The outside/base section of the rotor gets a rotor in override mode
    • Turn block ON
    • Set torgue to a high value, default vanilla is fine
    • Activate "Share Intertia Tensor"
    • Use this rotor as the elevation control rotor in your CTC.
    • Adjust rotor offset if necessary

This covers all you need to know about the rotor setup, but we are not done yet.
One important last step is to balance the gun assembly to have its center of mass alligned with the elevation rotors, because remember, the 3. rotor has no torgue to prevent the gun from moving in an unwanted manner.

In my example design with 1 assault cannon i used 3 small cargo containers behind the cannon to add extra weight and balance the gun assembly. The first two containers get loaded to 100% with stone and the last one to 50% with stone.
You can use less cargo containers with more dense materials loaded into them, allthough stone definitly is the cheapest option.

Just make sure you enable the "Show center of mass option" when building on your gun assembly to balance it out properly.
If you still experience unwanted sag try to first shift some mass around to better center the gun, when the ammount of sag is very low you can increase the breaking torgue of rotor 3 to a very low value of 500 or 1k or 2k. Don`t go to high as it can start pulling the gun up and down to a small degree instead of keeping it perfectly straigt.
Limitations
Now since this is Space Engineers there are still some problems with custom turret designs.

I have experienced constant problems with the gun assembly getting stuck on the turrets body which will stop it from swinging freely but still being controllable.
This relates to collision shapes still not beeing accurate enough for blocks to move smoothly when placed away in a technically workable distance from each other. Keen addressed this problem once in an update which did improve collisions by quite a lot, but still not enough to stop friction from happening.

It is still possible to get a well armored gun in a well armored turret to move perfectly at the cost of more time and some limitations in the construction of adjacent armor sections where gun meets turret.
I just want to give you all my full experience and a little warning that you might get (a little) frustrated as to why your turret won`t work perfectly without a lot of tinkering or maybe never without more significant changes.
Using mod blocks

I`ve also build a version using my modded blocks which help reduce the space requirement for individual parts of the turret.

The mods used are More Advanced Rotors and Turretring Rotors .
The example vehicle