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.

3 comments:

  1. I just spent a couple hours working through Sensors and getRotationMatrix and all the related routines. While the numbers I get are suggestive of these routines working they don't seem to be giving me the results I need.

    Any luck on your work?
    http://mysticlakesoftware.blogspot.com/

    ReplyDelete
  2. Hi, I'm also currently working on a project that is to use the sensors built in HTC phone to implement dead reckoning. I've been working on this for about 1 month, ..but the result is very disappointing...looks like the sensors' readings alway go haywire...

    I did the data analysis. I used socket programming to send the data collected by the phone to my pc, and use matlab, excel, whatever to plot the graphs. they showed that there was too much fluctuation on the sensor readings, maybe because the senors were just too sensitive....

    Another big problem i found is, how to tell gravity and moving acceleration apart? Andorid defines onSensorChanged() to return the acceleartion reading always with G added....

    Have you solved all these things..?

    THanks,
    DD

    ReplyDelete
  3. Really i impressed. What a wonderful presentation.Now i am happy.Thank You

    professional android application development

    ReplyDelete