[ODE] ODE BUG: 2nd order integration?
Bill Sellers
wis at mac.com
Mon Dec 5 05:31:18 MST 2005
It might even end up being quicker because you might get away with a
larger step size although I don't know how it would fare with the
approximations in quickstep et al.
Cheers
Bill
On 5 Dec 2005, at 09:12, Ryan O'Connor wrote:
>
> Why don't we use something more accurate like Rung-Kutta second order
> integration instead of first order? I don't think it would be that
> much of a
> performance hit for what it's worth. There doesn't seem to be any
> justifications for decisions like that in the docs, so it's really
> hard to
> know the reason behind some things.
>
> Roc
>
>
>
>
>
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of
> Andrew
> Aye
> Sent: Friday, October 21, 2005 10:13 AM
> To: ode at q12.org
> Subject: RE: [ODE] ODE BUG
>
>
> I believe the following is true <shrug> IMHO
>
> acceleration = a
> velocity is the time integral of acceleration or v(t) = v0 + t*a
> position
> is the time integral of velocity or s(t) = s0 + t*v0 + 0.5*a*t*t
>
> So to be precise, neither of the equations as listed are correct
>
> However, even though its slightly incorrect the way ODE does it is:
>
> Calculate:
> v1 = v0 + at ( or in their case v1 = v0 + (inverse Mass) * (Force) *
> t )
> s1 = s0 + t(v1)
>
> As you can see this will slightly overestimate the integration
> process.
>
>
> -----Original Message-----
> From: kalikali at tlen.pl [mailto:kalikali at tlen.pl]
> Sent: Thursday, October 20, 2005 3:26 PM
> To: ode at q12.org
> Subject: [ODE] ODE BUG
>
>
> I think I found some serious bug in ODE.
> Position of the body (changed by applied force) is incorrectly
> calculated.
>
> Position in timestep should be calculated as:
>
> x = x0 + v0 * (t - t0) + 0.5 * a * (t - t0)
>
> Currently it is calculated as:
>
> x = x0 + v0 * (t - t0) + a * (t - t0)
>
> (without * 0.5 !!!!)
>
> //==============================================================
>
> unit util.cpp (dxStepBody)
>
> b->pos[j] += h * b->lvel[j];
>
> //==============================================================
>
> Put some body in field of gravity, and do dWorldQuickStep(,10)
> Check body
> position Now, do the same, but in loop:
> for (i=0;i < 10;i++) dWorldQuickStep(,1) Check body position
> Positions are
> not the same !!!
> This is the problem
>
> //==============================================================
>
> I've made a little patch (currently only for quick step) but I
> don't know is
> this correct.
>
> Lukasz
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list