32bit or 64bit geometry data?
Posted: 12.03.2006, 18:50
Hi
I hope somebody will answer my - from your point of view - silly question, but I'm getting trouble in my own little satellite simulation with the floating point precision of geometry data.
I need to image the position of a satellite orbiting earth, that is orbiting the sun. Sun is positioned at my zero vector. With 32 bit floating point I can't position the satellite let's say some kilometers above earth's position, that is 149,597,870 km away from the sun, cause a float data type has only got 32 bit on my machine, that gives me a precision of 6 digits.
The problem is, that my 3d-engine does not offer 64 bit precision for geometry data. By the way, does DirectX or OpenGl offer double precision vectors?
Apperently Celestia manages this quite well.
So, please tell me, how?
Regards
Ayman
I hope somebody will answer my - from your point of view - silly question, but I'm getting trouble in my own little satellite simulation with the floating point precision of geometry data.
I need to image the position of a satellite orbiting earth, that is orbiting the sun. Sun is positioned at my zero vector. With 32 bit floating point I can't position the satellite let's say some kilometers above earth's position, that is 149,597,870 km away from the sun, cause a float data type has only got 32 bit on my machine, that gives me a precision of 6 digits.
The problem is, that my 3d-engine does not offer 64 bit precision for geometry data. By the way, does DirectX or OpenGl offer double precision vectors?
Apperently Celestia manages this quite well.
So, please tell me, how?
Regards
Ayman