You just gave me an idea of purposely wiring up a program to interpret the stop in vector motion, analyze the vector, then reciprocate that to slope. My bad , what?
I have successfully wired up a 2x2 PHX panel as a test host for a vector thruster that is only designed to mantain a user changeable height. The problem is that the platform will accelerate up to the desired height, turn the thruster off, and continue upwards motion, and then continue to bounce around the selected height.
The items that I am using to do this are: GPS, vector thruster (multiplier=10000 weight=5 Mult=Value 2=3 Z=If Then Else C), advanced input (increase=+ decrease=- minimum=50 maximum=500 change per second=75 start at=50), greater than or equal (A=adv. input B=GPS Output Z), less than (A=adv. input B=GPS Output Z), constant value (Value 1=-1 Value 2=3), If Then Else (A=less than output B=greater than or equal to output C=Value 1=-1).
I'm sorry for that mess above, however, I don't know how else to write it. The thruster works exactly as it should, save the fact that it bounces at the chosen height by the adv. input. I don't know how to fix that. I would also like to combine all of these chips into an expression chip, however, I don't know how to write "If X Then Y" expressions into the chip. All I would have to write is "If H>Z then Z=-1." However, even if I knew how to type that into an expression chip then it would still bounce.
So, in conclusion, I would like to know how to solve the bouncing problem and the excess of chips problem. Thank you all for responding, in advance.
You just gave me an idea of purposely wiring up a program to interpret the stop in vector motion, analyze the vector, then reciprocate that to slope. My bad , what?
No but seriously, once it gets up to that height and then above it will power negatively back down right? Since it has a weight of 5 it will go back down negatively but with gravity and momentum against it.
What I say to fix it is get it close to that height then give it the vector of its acceleration to counteract all that mess.
use an expression.
@I TargZ WorldZ
@O Thrust Z
interval(20)
Z=extposz()
Thrust=TargZ-WorldZ-$WorldZ
Now wire the WorldZ of the expression to itself (output Z), Wire the TargZ to whatever you want to control the height, and wire the Z input of the truster to Thrust. (Make sure that you have the VecThruster set to XYZ World mode, not local.)
Thanks for the input! I wasn't able to get your expression to work. But, It allowed me to think of this one:
I@TargZ
O@Z Mult
interval(20)
WorldZ=extpos()
Z=-(TargZ-WorldZ-$WorldZ*100)
Mult=10000
It works much better than my first stupid idea. However, it bounces minutely right now. I think I have to have the Mult=the opposite of the z axis momentum of the object. But, I don't have a good way of getting the objects mass w/o manually adding up the weight of the attached objects weights and multiplying that by the z axis acceleration. I think I'm just going to have to use a hoverball. Mission=fail. But, thanks for the input. I understand more now.
I'm sure you have a better answer already...but if you make the thrust equal and opposite of the momentum of the object then that will stop the object dead-still. However, that would require weighing the attached objects.
I@ TargZ
O@ Thrust OutZ
Mass=
#Mass=Sum of attached objects weights.
interval(20)
clk()->Time+=0.02
Z=extposz()
OutZ=-sgn(TargZ-Z)
Thrust=(TargZ==Z?-(Mass*($Z/Time^2)):10000);
#This works great accept that the time isn't sampled instantaneously, so I have never seen my counter momentum formula in there actually work...because the clock isn't sensitive enough to sample time when TargZ is equal to Z.
I, personally don't even understand what you said up there in the quote. But, I thought I could maybe give you an idea. I hope I helped and thanks for the reply.
How about using delta? If i remember correctly the actual expression code that i used was this:
Thrust = Height - $Height * 5
Height can be an advanced input an thrust is ofcourse the Z of the vector thruster. Maybe this will work?
92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.
My IQ is 136 - Free-IQTest.net - IQ Test
Bookmarks