For spring force, the force that will be put on spring is K*X, where K is springs constant, and X is CurrentPos - OriginalPos, that should work..?
I am making a car that behaves as a real one would, it is using only thrusters, no wheels or very many moving parts. Right now I am trying to mimic spring force.
I have a 1x1 panel on a slider to test things. There is a ranger and a thruster on the bottom of the plate, also the thruster multiplier and thruster weight is set so that 1 unit of thrust is equal to 1 unit of weight, so with a panel weight 50u and a thrust of 50u the panel will act as if it has zero gravity.
I have an Egate doing the very basic computation of Thrust = Max_Range - Range, so that as the panel enters the rangers max range and gets closer to the ground it outputs more thrust.
From the top of it's travel with zero thrust to the bottom it is taking away all of the panels momentum, but as soon as it starts traveling back upwards it starts by giving 100% thrust, and at half of it's travel it is giving 50% thrust and finally 0% thrust at the end of it's range, So by the time it is finished traveling back upwards it has twice the momentum as it had when it started to slow down.
I need the panel to have half of the momentum leaving the extent of the spring's travel as it had when it entered it. In real life this would be caused by the spring pushing half of it's energy into the ground, or whatever it was attached to.
Both the derivative and delta chips retain their last value when they leave the ranger's max range. I need a way of finding the rate that the ranger's range is changing. It needs to be based on time, so that when the range doesn't change the value will be zero.
Does anyone have any idea as to what I could use to measure how much, and how fast the ranger's output is changing?
For spring force, the force that will be put on spring is K*X, where K is springs constant, and X is CurrentPos - OriginalPos, that should work..?
Bookmarks