Augmented Reality - Mapping GPS to OpenGL

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Augmented Reality - Mapping GPS to OpenGL

Postby snowwire » Wed Feb 03, 2010 3:25 am

I am writing an AR application and have my engine working but it contains a strange behaviour that I can't seem to fix. I am overlaying an OpenGL surface on the camera image and am placing 3D objects in the view accordingly. If I use dummy data for the location of my AR objects, i.e. LAT 10 LON 10 become x=10 y=10 on the OpenGL surface, then the overlay works perfectly. However, if I use direct GPS coordinates for my LAT and LON (e.g. LAT 12.34567890 LON 100.23456789) then all my objects either move around their location or don't appear at all. I know there are issues around using floating points and the OpenGL framework, but I've been reading around and am still having trouble stopping this behaviour. Has anyone else had this problem? Should I be using a scaling factor between my GPS and openGL surface, if so what values are good? I tried scaling my LAT and LON by 1000000 to eliminate the floating point, but it didn't help and the performance was terrible.

I'm so close to getting this working, that any help would be much appreciated.

Thanks
snowwire
Freshman
Freshman
 
Posts: 6
Joined: Tue Feb 02, 2010 7:32 am

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests