[ODE] Huge world vs precision problems

Edward Bosco ebosco at prologic-inc.com
Thu Mar 9 16:40:26 MST 2006


Floats have approximately 9 decimal digits of precision.  With a 2500km
max, your position representation can only represent 2,500,000.00
meters.  Thus, it's accuracy is only to the nearest centimeter.  That's
definitely visible as "jitter" when zoomed in and looking at the
positions of things that are moving.  Worse, the magnitude of error in
calculations is going to have more impact than the magnitude of error in
the absolute location.  You're seeing this exactly where you should.
i.e., its not going to show up in the calculations that are done in body
coordinates, but when you transform those calculations back to world
coordinates, you'll frequently see more than the LSB in error due to
accumulated error through the transformation algorithm.

Doubles have approximately 15 decimal digits of precision.  Recompiling
ODE for doubles (or using one of the prebuilt libraries that have that
precision) would give you the precision that you need to represent
position.  In fact, at 2500km, you would have a resolution of
2,500,000.000,000,00 or 10 picometers.  The math should also be fairly
stable.  The bad news is, the triangle mesh collision capability has not
been made double capable, so you'd lose that and it sounds like you're
using it.



-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of
Anders Olofsson
Sent: Thursday, March 09, 2006 5:03 AM
To: ode at q12.org
Subject: [ODE] Huge world vs precision problems

Hello all!.

I have a huge world, around 2500*2500 km, and have obviously encounter 
precision problems. I think I've solved the triangle collision problems
I 
described before but I stumbled on yet another, geomtransforms! (Or I
guess 
positioning in general).

I have an object made of several geoms and if I place it at origin
(0,0,0) 
of my world it works great but at the outer edges of the world the same 
object geoms positions starts to wobble/jitter. I'm working with floats 
haven't tried doubles yet, I'm not particulary familiar with the 
floatingpoints types precision limits.

What are my options?, I thought of partitioning up my world in smaller 
chunks that floats can handle. But in practice I haven't figured out how
to 
do that, is it possible somehow? How small/large would those chunks be?.

(Or at around what huge number start floats to loose their precision? :)
)

Some other more "quick fix"?

Thanks!

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list