[ODE] SPRING
Simon Šander
simon.sander at vizija.si
Sun Mar 19 23:33:54 MST 2006
I use this function to calculate ERP and CFM.
public static void Calc(float springConstant, float dampingCofficient, float
sprungMass, out float erp, out float cfm)
{
float r = 2.0f * dampingCofficient * (float)Math.Sqrt(sprungMass
* springConstant);
float hk = Scene.OdeTimeStep * springConstant;
erp = hk / (hk + r);
cfm = 1.0f / (hk + r);
}
Simon
_____
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of hamstah
Sent: Friday, March 17, 2006 2:17 PM
To: LR
Cc: ode at q12.org
Subject: Re: [ODE] SPRING
LR wrote:
Hi,
I'm trying to use suspension in a hinge2 from spring constants that
configure ERP and CFM. I'm using the documentation formula:
ERP = h kp / (h kp + kd)
CFM = 1 / (h kp + kd)
and my bodys jump .....
if i modify with :
ERP = h kp / (h ( kp + kd ) )
it feel really better. Is it a documentation error ? or does i have another
problem ?
if i do the same modification with CFM = 1 / (h ( kp + kd ) ) my bodys
jumps again ...
Laurent
Hi, If i look at your formula:
ERP = h kp / (h ( kp + kd ) )
I can say that its equal to ERP = kp / ( kp + kd )
and this equation doesnt take 'h' as parameter...
So I think your equation isnt correct.
Now I dont have the time to look on it, but perhaps somebody can help you
with it...
see you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060320/0e41a235/attachment.htm
More information about the ODE
mailing list