Wednesday 15 June 2011

Increase the Range of Android Accelerometer -


This question has been asked in some ways but it has no conclusive answer.

I am trying to find out the maximum limit of accelerometer on Android phones. Some forums have + 2G and some -3,5 GS claims

Accelerometer is a high class up to 16G (Hardware of L4S 330 which is on J4).

I wrote an application to find this range in practically and it loaded on S4. The following picture shows the readings: Clearly, the maximum limit in each direction is 2G.

Reading App

  1. Is Enhancing This Category There is no way and if so, how?
  2. Did anyone else have a big default limit on Android phones?

    For those interested, here is the NB part of my code:

      the main activity activity implementation of the public class sensor event listener {sensor accelerometer; Sensor Manager SAM; TextView maximized; Text view real time value; TextView realtimeResultant; TextView maximals; Textview MaksersCalent; Float x = 0; Float y = 0; Float z = 0; Float ris = 0; Float xmx = 0; Flat yMax = 0; Name zMax = 0; Flap ridge max = 0; @ Override protected void saved create (bundled Instansstet) {Suprknkret (saved Instensstet); SetContentView (R.layout.activity_main); Sm = (sensor manager) getSystemService (SENSOR_SERVICE); Accelerometer = sm.getDefaultSensor (sensor.TYPE_ACCELEROMETER); Sm.registerListener (This, Accelerometer, Sensor Manager. SENSOR_DELAY_FASTEST); MaxValue = (TextView) Find ViewById (R.id.MaxValue); RealtimeValues ​​= (TextView) findViewById (RID RealtimeWalls); RealtimeResultant = (TextView) findViewById (RID Real Time Resultant); Find Maximum Value = (TextView) VVBID (RD MaxValues); MaxSultant = (TextView) Find VVBIID (RID MaxStransult); Flat Max = Accelerometer. Gatemaximanez (); MaxValue.setText ("max limit:" + max); } @ Override Public Zero at @SensorChanged (Sensor Event Event) {if (event.sensor.getType ()! = Sensor.TYPE_ACCELEROMETER) Return; X = event.values ​​[0]; Y = event.values ​​[1]; Z = event.values ​​[2]; Res = (float) Math.sqrt (x * x + y * y + z * z); RealTimeValues.setText ("X:" + + "\ nY:" + y + "\ nZ:" + z); Realtime resultant.setText (res + "m / s ^ 2"); If (mathematics.bs (x)> math.bas (xmx) xMax = x; If (Math.Abs ​​(Y)> Math.BAS (WiMAX)) yMax = y; If (Math.bbs (Z)> Math Box (zMax)) zMax = z; If (RAS> Reese Max) resMax = res; MaxValues.setText ("X:" + + xMax + "\ nY:" + yMax + "\ nZ:" + zMax); MaxResultant.setText (resMax + "m / s ^ 2"); }}    

    It seems impossible to do this.

    It should be noted that the linear accelerometer does not necessarily increase the range of accelerometer reading, even if its value is up to 3G (on some phones). The reason for this increase is due to the way the linear acceleration is calculated (essentially the use of a filter), which sometimes receives more than 2G values, then the direction is quickly enough

    To calculate the linear accelerometer, see here:

No comments:

Post a Comment