If it can help, what I have already implemented is something like this: I have a main activity. This activity instanciates 2 services that feeds the main activity wih data. One is for the location and one is for the sensors. The main activity has a frame view holding the surface for the camera preview and a customview that holds the radar, the bottom panels (and its information) and the POIs. For now, the first time the location service catchs a location, the main activity gets it and unbinds the service. Also, each time the sensor service feeds with data, I pass that information down to the views of the hierarchy wich need to update its own state. I don use any thread and also, I call invalidate after the primary onDraw method of the customview. The onDraw method of my customView (Its actually called ARView) calls the onDraw method of all of the child views.
I use a responsability chain for the POIs view and other for the radar points. My problem is that I dont know if I may have a surface holder, another thread to paint the POIs and just them. Also I dont know if I should use the timestamp of the sensor events to smooth the movement as in the Accelerometer play sample. So now Im tottally stuck, cannot continue. The fact is that, for example, a 40 degrees AR visor in landscape mode (ie. 480 px) has 8 px for each degree. That means when I move the device one degree, the POI view jumps from 8 to 8 px so the movement is not smooth. So I started to use float instead of integers and got rid of the layout() method, just call for the draw. It gets a bit finer but seems to work bad as well. The Kalman filter I use has: p = 0.05f (tried from 0.5 to 0.05) and q = 1-p p is for the recieved value and q is for the old state. That still makes jumps and noise. If I move fast the device, ie 20 degrees, my POI view directly skips some of the px, just jumps from one position to another. Dont know how to fix it. When the device move is soft and slow the POI moves (not smooth) but at least does not jump. I also tried to put a kalman filter to the coordinates in the display of the POI view but it doesnt behavie better at all. So please, any kind of tip? I think that my main problem is that I dont know how to apply the rotation matrix to a view. Regards and thanks for your time. If someone wants the full code, just ask. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

