unfortunately, I'm in the same boat as you in this case... I've been toying around with this for some time to stabilize ships in varying amounts of gravity for spacebuild, what I'm currently toying around with is this.
Code:
@name X400
@inputs T1:wirelink T2:wirelink T3:wirelink
@outputs
interval(20)
TM = 500
Downvel1=T1:entity():vel()*-T1:entity():up()
Mul1=Downvel1:length()
Downvel2=T2:entity():vel()*-T2:entity():up()
Mul2=Downvel2:length()
Downvel3=T3:entity():vel()*-T3:entity():up()
Mul3=Downvel3:length()
if(0<Downvel1:z()<25){
T1:setNumber("X",Downvel1:x()), T1:setNumber("Y",Downvel1:y()), T1:setNumber("Z",Downvel1:z())}
if(0<Downvel2:z()<25){
T2:setNumber("X",Downvel2:x()), T2:setNumber("Y",Downvel2:y()), T2:setNumber("Z",Downvel2:z())}
if(0<Downvel3:z()<25){
T3:setNumber("X",Downvel3:x()), T3:setNumber("Y",Downvel3:y()), T3:setNumber("Z",Downvel3:z())}
T1:setNumber("Mul",Mul1*TM), T2:setNumber("Mul",Mul2*TM), T3:setNumber("Mul",Mul3*TM)
You Might try checking out this thread: HTML Code:
http://www.wiremod.com/forum/wiremod-challenges/5648-space-stabilization-challenge.html
A couple of notes about the code, that is for height stabilization only, and it will not work its my first attempt at a different approach to stabalization (I've tried a good 5 different approaches with no success) and as such is flawed, I post it merely as an example... although if somebody can give me some tips it would be nice.
Bookmarks