[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-11 Thread Sundog

Thanks much!

Actually for my purposes ignoring the sensor for a second will work
just fine, but I will check out your info for the next time around.

I'm kinda designing my new game BASED on the limitations of the
phone... i.e. choosing the complexity of the views based on how much
the poor innumerate G1 can handle before bogging down, that sort of
thing. So this is just more of the same, sigh.

On Jun 11, 2:34 pm, TjerkW  wrote:
> Nope this problem is is also on the htc magic .. check my post for a
> solution using a damper. Somewhere else in this group ...
>
> On 11 jun, 22:28, Sundog  wrote:
>
>
>
> > I'd be very interested to know if anyone besides G1 owners has seen
> > this? My best guess is that it's a design flaw specific to this
> > phone... and if so, no fix will be forthcoming.
>
> > On Jun 11, 2:20 pm, Sundog  wrote:
>
> > > Just a "me too" to report that this problem is real and is still here
> > > under Cupcake. Play a sound and the accelerometer goes haywire for a
> > > second. Only fix I can see is ignoring the accelerometer while SFX are
> > > playing... kinda not really a good workaround for a game.
>
> > > On Jun 8, 8:25 am, TjerkW  wrote:
>
> > > > Sameproblemhere,
>
> > > > when playing sounds during my game (in which you control the gameplay
> > > > withaccelerometer)
> > > > theaccelerometergives strange values.
>
> > > > On 24 mei, 13:29, Bonifaz  wrote:
>
> > > > > I have the sameproblemof wiredaccelerometerdata while music is
> > > > > playing.
>
> > > > > Does anyone have a workaround for this. Some kind of filter mechanism
> > > > > perhaps.
>
> > > > > I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection.
> > > > > But even with that formular, playing music always detects shake,
> > > > > just raising the threshold won't work, since shake would not be
> > > > > detected with to high threshold.- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-11 Thread TjerkW

Nope this problem is is also on the htc magic .. check my post for a
solution using a damper. Somewhere else in this group ...

On 11 jun, 22:28, Sundog  wrote:
> I'd be very interested to know if anyone besides G1 owners has seen
> this? My best guess is that it's a design flaw specific to this
> phone... and if so, no fix will be forthcoming.
>
> On Jun 11, 2:20 pm, Sundog  wrote:
>
>
>
> > Just a "me too" to report that this problem is real and is still here
> > under Cupcake. Play a sound and the accelerometer goes haywire for a
> > second. Only fix I can see is ignoring the accelerometer while SFX are
> > playing... kinda not really a good workaround for a game.
>
> > On Jun 8, 8:25 am, TjerkW  wrote:
>
> > > Sameproblemhere,
>
> > > when playing sounds during my game (in which you control the gameplay
> > > withaccelerometer)
> > > theaccelerometergives strange values.
>
> > > On 24 mei, 13:29, Bonifaz  wrote:
>
> > > > I have the sameproblemof wiredaccelerometerdata while music is
> > > > playing.
>
> > > > Does anyone have a workaround for this. Some kind of filter mechanism
> > > > perhaps.
>
> > > > I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection.
> > > > But even with that formular, playing music always detects shake,
> > > > just raising the threshold won't work, since shake would not be
> > > > detected with to high threshold.- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-11 Thread Sundog

I'd be very interested to know if anyone besides G1 owners has seen
this? My best guess is that it's a design flaw specific to this
phone... and if so, no fix will be forthcoming.

On Jun 11, 2:20 pm, Sundog  wrote:
> Just a "me too" to report that this problem is real and is still here
> under Cupcake. Play a sound and the accelerometer goes haywire for a
> second. Only fix I can see is ignoring the accelerometer while SFX are
> playing... kinda not really a good workaround for a game.
>
> On Jun 8, 8:25 am, TjerkW  wrote:
>
>
>
> > Sameproblemhere,
>
> > when playing sounds during my game (in which you control the gameplay
> > withaccelerometer)
> > theaccelerometergives strange values.
>
> > On 24 mei, 13:29, Bonifaz  wrote:
>
> > > I have the sameproblemof wiredaccelerometerdata while music is
> > > playing.
>
> > > Does anyone have a workaround for this. Some kind of filter mechanism
> > > perhaps.
>
> > > I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection.
> > > But even with that formular, playing music always detects shake,
> > > just raising the threshold won't work, since shake would not be
> > > detected with to high threshold.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-11 Thread Sundog

Just a "me too" to report that this problem is real and is still here
under Cupcake. Play a sound and the accelerometer goes haywire for a
second. Only fix I can see is ignoring the accelerometer while SFX are
playing... kinda not really a good workaround for a game.

On Jun 8, 8:25 am, TjerkW  wrote:
> Sameproblemhere,
>
> when playing sounds during my game (in which you control the gameplay
> withaccelerometer)
> theaccelerometergives strange values.
>
> On 24 mei, 13:29, Bonifaz  wrote:
>
>
>
> > I have the sameproblemof wiredaccelerometerdata while music is
> > playing.
>
> > Does anyone have a workaround for this. Some kind of filter mechanism
> > perhaps.
>
> > I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection.
> > But even with that formular, playing music always detects shake,
> > just raising the threshold won't work, since shake would not be
> > detected with to high threshold.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-08 Thread TjerkW

Same problem here,

when playing sounds during my game (in which you control the gameplay
with accelerometer)
the accelerometer gives strange values.

On 24 mei, 13:29, Bonifaz  wrote:
> I have the same problem of wired accelerometer data while music is
> playing.
>
> Does anyone have a workaround for this. Some kind of filter mechanism
> perhaps.
>
> I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection.
> But even with that formular, playing music always detects shake,
> just raising the threshold won't work, since shake would not be
> detected with to high threshold.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer/Orientation sensor problem

2009-05-24 Thread Bonifaz

I have the same problem of wired accelerometer data while music is
playing.

Does anyone have a workaround for this. Some kind of filter mechanism
perhaps.

I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection.
But even with that formular, playing music always detects shake,
just raising the threshold won't work, since shake would not be
detected with to high threshold.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer/Orientation sensor problem

2009-04-03 Thread chow

I have noticed that the speaker output does effect the magnetic
compass reading a bit. Not too surprising, since the speaker uses an
electromagnet. This is probably what is causing the sensor to jitter
around. As for the accelerometers, I would guess that the movement of
the speaker cone itself is what is causing the fluctuations there.
Perhaps its not a problem, but more of a filtering issue, have your
tried any simple averaging on the sensor output?

chow

On Mar 31, 11:55 am, Liz  wrote:
> On my T-Mobile G1 (firmware 1.1, build PLAT-RC33), developing in
> SDK1.1r1,  I am experiencing a problem where playing sounds causes the
> output of the accelerometer and orientation sensors to fluctuate
> wildly.     The degree of fluctuation is directly proportional to the
> volume of the sound being played.
>
> I am using SensorManager per the documentation and examples :
>
> <=  From my implementation of SensorListener>
> public void init() {
>     SensorManager sm = (SensorManager) cx..getSystemService
> (Context.SENSOR_SERVICE);
>     boolean success = sm.registerListener(this,
>          SensorManager.SENSOR_ORIENTATION,
>          SensorManager.SENSOR_DELAY_GAME);
>     // success is true, i.e. no problems acquiring the sensor
>
> }
>
> public void onSensorChanged(int sensor, float[] values) {
>     if (sensor == SensorManager.SENSOR_ORIENTATION) {
>          // print/draw/do something with the sensor output in values[]
>     }}
>
> <==>
>
> I have tried playing sounds with both SoundPool and MediaPlayer, with
> identical results.   When a sample is played at max volume the
> Orientation sensor outputs will bounce around as much as +-/30
> degrees.   All axes are affected.
>
> I have tested and confirmed this behaviour for SENSOR_ACCELEROMETER,
> SENSOR_ORIENTATION, and SENSOR_ORIENTATION_RAW.  Other sensors may
> also be impacted, but I haven't tested them.
>
> I have also tested with all of the available sensor sampling rates --
> SENSOR_DELAY_FASTEST through SENSOR_DELAY_UI.   All result in the same
> behavior.
>
> On a random guess I tried muting the microphone with
> AudioManager.setMicrophoneMute(true) -- same results.
>
> I thought to try testing this in the Android emulator to see if it
> might be hardware-related, but unfortunately there is currently no
> accelerometer/orientation sensor support in the emulator.
>
> Is this a known problem?  Or am I doing something wrong here?
>
> Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---