Thursday, July 2, 2009

Sensor Graph + OpenGL ES

I am starting work on a simple app called Sensor Graph that will be able to graph and log sensor data to a text file(there is a tricorder and API demo apps that draw graphs of the sensors, but none that can log data as far I have found). This will be useful for analysis of the sensitivity of the sensors and to model things like the possiblity of using the accelerometer for dead reckoning. My current idea is to set up a track that I can slide the phone back and forth on and then see how accurately I can compute the position from the acceleration data. If 1d works good then I will test out moving the phone in 2d with no rotation. It will also be able to analyze how quickly the magnetometer reacts to changes in orientation. Most of the existing compass apps have the output filtered to reduce noise so they react slower than should be possible.

Since my game will be opengl I am making the Sensor Graph in opengl as well. With the abundance of simple API examples and GLSurfaceView getting it up and running has been easy. However the lack of an immediate mode in OpenGL ES is holding me up for now. I haven't found any examples programs doing dynamic generation of geometry, so I am trying a bunch of different things now trying to get something to show up on the screen, not sure why it's not working yet.