[ODE] Large mass and accuracy

James Arthur teamonkey at gmail.com
Wed Jun 16 12:30:53 MST 2004


On Tue, 15 Jun 104 17:55:25 +0200, Amund B=?ISO-8859-1?Q?=F8?=rsand
<amund at offroad.no> wrote:
> Come to think of it I may be ruining all the accuracy by using a timestep of 0.02 (seconds), which happens at 50 fps. Would I maybe be better off doing 0.2, and setting gravity to 0.981, hmm, and adjusting torques and forces according to the time scaling? But then I'd have to adjust mass accordingly in order to avoid objects being 10 times harder to accelerate.. and then the span is just as bad again, right?

I find it easiest to work with the units from the equation F = MA to
get the right relationships:

[Force] N = [Mass] kg * [Acceleration] m/s^2 = [Mass] kg * [Length] m
/ [Time squared] s

ODE works well with the base metric system: mass in kg, time in
seconds, length in metres. If you're using metric tonnes (1tonne =
1000kg), metres and seconds as your base units then your units of
force will be 0.001N (units in N = (1/1000)kg * 1m / 1s^2), which is
why you're finding your objects harder to accelerate. Similar sort of
thing with torques etc.

I wouldn't use a time step larger than 0.02s. I may be wrong, but I
think that in general the solver likes smaller numbers irrespective of
what units you use.

James


More information about the ODE mailing list