[Q] Accelerometer Counts - General Questions and Answers

Hey,
Can anybody tell me what accelerometer counts are? I saw a chart showing a relationship between accelerometer counts and METs. I only get the X, Y and Z readings from the accel. What r counts/min?

IIRC, the accelerometer in the G1 was also a pedometer.
-Jobo

The accelerometer "counts" or "clicks" the graph is most likely referring to are the spikes observed in a graph of accelerometer values plotted over time.
Each "count" or "click" indicates a impulse i.e a quick small jerk.
The same principle is used in a pedometer i.e determine steps using clicks in accelerometer samples.

Related

Acceleration of the real movement

Hi, I'm trying to make use of the sensors built in the Android phone to detect the acceleration of the person carrying the phone. However, the problem is that the sensors are too sensitive for even a small motion, say tilting of the phone. But what I want is, no matter where and how (eg. the orientation of the phone) to put the phone on the body, the phone is always able to show me the accurate acceleration of the person...
So does anybody have any idea??? Thank you very much!
PS. I managed to cancel out the G force on x, y, z axis, and then theoretically the only acceleration left should be the one of the movement. But it didnt work that way, because there were still acceleration fluctuations on x,y,z axis whenever I touch the phone...
I don't get it.
So, you want to measure acceleration; and the problem is that the phone measures the acceleration?
about the "too sensitive" part. Is that really a problem? You can just get averages (for every second, every minute,...), max acceleration,...
also, cancel out G force? I haven't used the Dream accelerometer, but I guess it gives you separated values for static or dynamic forces, isn't it?
Wouldn't you just need to do the math to figure out 0? I haven't tested any of this and this isn't good math but lets pretend you see the motion on x as +6 and on Y it's -2. Then you would know it moved +4 for whatever duration... Does that make sense or am I way off?
paxku said:
I don't get it.
So, you want to measure acceleration; and the problem is that the phone measures the acceleration?
about the "too sensitive" part. Is that really a problem? You can just get averages (for every second, every minute,...), max acceleration,...
also, cancel out G force? I haven't used the Dream accelerometer, but I guess it gives you separated values for static or dynamic forces, isn't it?
Click to expand...
Click to collapse
Hi, paxku, Thank you. perhaps, let me give you an example. Say, I carry the phone and move in x axis direction. Now if the phone does not have any other forces on it except for the one moving it, theorectically the phone (the accelerometer in it) will show the reading of the moving acceleration. However, this is never the case, because when one carries the phone, the phone is inevitably shaken and tilted from time to time (think about when it's put in the pocket), which gives the phone many "interfering" forces. Thus, the reading will eventually show the sum of these accelerations, rather than only the moving one I want... So is there any way to get ride of these interference and only leave the moving acceleration.
"too sensitive", I actually meant "too sensitive to interfering forces". I tried to set a threshold to filter out the interference. But the problem is, a lot of time, the moving force is actually much smaller than the interfering forces, for example, when i carry the phone moving very very slowly. This ends up that the moving one gets filtered...
For the G force thing, I don't think my phone can give separate values. Does it really depend on the model of the phone?? I guess all Android phones have a same way of dealing with this. Check out this from Android Web.
Sensor.TYPE_ACCELEROMETER:
All values are in SI units (m/s^2) and measure the acceleration applied to the phone minus the force of gravity.
values[0]: Acceleration minus Gx on the x-axis
values[1]: Acceleration minus Gy on the y-axis
values[2]: Acceleration minus Gz on the z-axis
Thank you very much!!!
youneek said:
Wouldn't you just need to do the math to figure out 0? I haven't tested any of this and this isn't good math but lets pretend you see the motion on x as +6 and on Y it's -2. Then you would know it moved +4 for whatever duration... Does that make sense or am I way off?
Click to expand...
Click to collapse
Er..I guess the math that we are talking about is different. Actually, i don't need to calculate the resultant force;it's fine to just leave it decomposed on x,y,z axis. The math I did was that I decomposed G force to x,y,z axis, and then subtract Gx,Gy,Gz from the decomposed external force, in order to get ride of G force interference. The reason for doing this, you can refer to my reply above where I quoted from Android web how the acceleration readings are generated.
Would appreciate it if you have any idea....
How to get acceleration and orientation readings at the same time?
Hi, it seems that on Android acceleration readings and orientation readings are both from values[0], values[1], values[2], depending on which sensor type is being monitored. So if I want to get the acceleration and orientation data at the same point of time, what do I do?
I'm not sure if I'm doing this correctly,
public void onSensorChanged (int sensor, float[] values){synchronized (this) {
switch (sensor){
case SENSOR_ORIENTATION:
pitch = values[1];
roll = values[2];
break;
case SENSOR_ACCELEROMETER:
r_ax = values[0];
r_ay = values[1];
r_az = values[2];
break;
}
But I think this only gives me the values of the sensor that changes at the time. what if both sensors change at the same time???
Thank you!!!
How to get acceleration and orientation at the same time?
Hi..sorry to post the same thing again, cuz I really have to know this...
1. How to get acceleration and orientation data at the same time? I'm using onSensorChanged( ) , but this method only returns either acceleration or orientation at a time... I'm thinking, can I use getOrientation( ) together with onSensorChanged() to get the two at same time? If possible, how?
2. I want to know, is orientation actually derived from acceleration, in stead of obtained independently? If so, does anybody know how the orientation is computed from the acceleration?
Thank you very muchhhhhhhhhhhhh!!!!!!!
Stop opening new threads for the same topic....last warning
The major issue is that the google phone doesnt detect rotation.
Yeah you can get XYZ acceleration values, but part of that "value" is from roatation and the other part is from actual linear acceleration.
The first thing we need to figure out is What exactly are you trying to measure? If you're trying to measure movement using accelerometers, you may be disappointed.
Remember that accelerometers measure changes in speed, not changes in position. So, let's say I'm walking across a room at a constant speed and start taking measurements - I'll see accelerations up and down due to the fact that I keep changing from moving up to moving down and vice-versa, likewise for left to right measurements, even front to back as our gait is not perfectly smooth. However, over time, these accelerations will tend to cancel out, yet, I'm still moving.
The only way you're going to be able to calculate movement with accelerometers is to start with a known velocity and then calculate subsequent velocities and displacements from there on using accelerometer measurements (known in the navigation world as dead-reckoning).
Long story short: Movement in a straight line at a constant velocity has no acceleration (or force) component and, thus, cannot be detected or measured by an accelerometer.
fyp said:
Hi, I'm trying to make use of the sensors built in the Android phone to detect the acceleration of the person carrying the phone. However, the problem is that the sensors are too sensitive for even a small motion, say tilting of the phone. But what I want is, no matter where and how (eg. the orientation of the phone) to put the phone on the body, the phone is always able to show me the accurate acceleration of the person...
So does anybody have any idea??? Thank you very much!
PS. I managed to cancel out the G force on x, y, z axis, and then theoretically the only acceleration left should be the one of the movement. But it didnt work that way, because there were still acceleration fluctuations on x,y,z axis whenever I touch the phone...
Click to expand...
Click to collapse
Doesn't this whole idea go against the very basic laws of physics? You can't possibly tell the difference between the force of gravity and the force of the person moving forward. The best you could possibly do is try to figure out how to wait for the person to put the phone however they're going to have it and make absolutely sure, somehow, that it doesn't move at all and use that as a 0 point. Basic point is it's physically impossible to tell any 2 forces apart. I'm fairly sure that's part of Einstein's theory of general relativity(though it's been a while).
[email protected] said:
Doesn't this whole idea go against the very basic laws of physics? You can't possibly tell the difference between the force of gravity and the force of the person moving forward. The best you could possibly do is try to figure out how to wait for the person to put the phone however they're going to have it and make absolutely sure, somehow, that it doesn't move at all and use that as a 0 point. Basic point is it's physically impossible to tell any 2 forces apart. I'm fairly sure that's part of Einstein's theory of general relativity(though it's been a while).
Click to expand...
Click to collapse
Thank you! Yes, you are absolutely right. That's why I tried to eliminate G first, because Android defines 0,0,g as the acceleration on x,y,z when the phone lies flat on a surface. So if the phone is moved or rotated, g is decomposed automatically onto x,y,z, which I have to cancel them out. Now theoretically G could be eliminated by figuring out the values of decomposed G on x,y,z and then doing the reverse computation so that the only acceleration shown is of the movement. But a new problem is, to work out the values of decomposed G on x,y,z, I need to get the orientation of the phone, specifically, pitch and roll. But it seems that Android cannot report the acceleration values and orientation values at the same time instance, which causes that the calculation of decomposed G on x,y,z uses a wrong set of pitch and roll. Also, looks like orientation readings are actually derived from acceleration...which may also cause the wrong calculation of decomposed G.
Here is the fomulas I'm using to decompose G, and then to eliminate G on x,y,z
gx = (float) (GRAVITY_EARTH * Math.sin(roll*DEGREE_CONV));
gy = (float) (GRAVITY_EARTH * Math.sin(pitch*DEGREE_CONV));
gz = (float) (GRAVITY_EARTH * (Math.cos(pitch*DEGREE_CONV)*Math.cos(roll*DEGREE_CONV)));
ax = r_ax - gx;
ay = r_ay - gy;
az = r_az + gz;
where DEGREE_CONV is to convert degree to radian, r_ax,r_ay,r_az are the acceleration values directly from SensorListener(), ax,ay,az are the net accelerations which are supposed to be 0 when the phone is stationary.
Am I doing this correctly? I'm actually wondering, besides the problem that roll and pitch are not obtained at the same time as r_ax,r_ay,r_az are, the phone itself may not decompose G using exactly my formulas. So I have to find out how the phone does the decomposition in order for me to do the reverse process.
PS. honestly, Android keeping G by default is really annoying...
sjbayer3 said:
The major issue is that the google phone doesnt detect rotation.
Yeah you can get XYZ acceleration values, but part of that "value" is from roatation and the other part is from actual linear acceleration.
Click to expand...
Click to collapse
Thank you. Are you saying that the orientation/rotation values are not detected, but computed from acceleration values. This is just what i'm thinking too. That's why SensorListener() always reports new acceleration values first and after a short time, new orientations. and also, even sometimes when the orientation doesn't really change, just because there's a big change in acceleration, the orientation changes too. (for example, if you suddenly move the phone very fast horizontally, the screen orientation may change.)
So is there any way to get the acceleration and its corresponding orientation(pitch and roll) at the same point in time?
Sicarius128 said:
The first thing we need to figure out is What exactly are you trying to measure? If you're trying to measure movement using accelerometers, you may be disappointed.
Remember that accelerometers measure changes in speed, not changes in position. So, let's say I'm walking across a room at a constant speed and start taking measurements - I'll see accelerations up and down due to the fact that I keep changing from moving up to moving down and vice-versa, likewise for left to right measurements, even front to back as our gait is not perfectly smooth. However, over time, these accelerations will tend to cancel out, yet, I'm still moving.
The only way you're going to be able to calculate movement with accelerometers is to start with a known velocity and then calculate subsequent velocities and displacements from there on using accelerometer measurements (known in the navigation world as dead-reckoning).
Long story short: Movement in a straight line at a constant velocity has no acceleration (or force) component and, thus, cannot be detected or measured by an accelerometer.
Click to expand...
Click to collapse
Thank you for your answer. I'm aware of the accumulative error involved in dead reckoning. But now the error is acceptable to me, as long as the displacement that is integrated twice from acceleration shows me general direction of the phone's movement. The phone will always start calculation from stationary status, meaning the velocity is zero. For the constant speed moving, I think, theoretically, the displacement can still be computed, because the travelling time and velocity, which is calculated from the previous acceleration process, are known. Although for this case no acceleration is detected, it is just simply time*velocity, giving the displacement.
fyp said:
Thank you! Yes, you are absolutely right. That's why I tried to eliminate G first, because Android defines 0,0,g as the acceleration on x,y,z when the phone lies flat on a surface. So if the phone is moved or rotated, g is decomposed automatically onto x,y,z, which I have to cancel them out. Now theoretically G could be eliminated by figuring out the values of decomposed G on x,y,z and then doing the reverse computation so that the only acceleration shown is of the movement. But a new problem is, to work out the values of decomposed G on x,y,z, I need to get the orientation of the phone, specifically, pitch and roll. But it seems that Android cannot report the acceleration values and orientation values at the same time instance, which causes that the calculation of decomposed G on x,y,z uses a wrong set of pitch and roll. Also, looks like orientation readings are actually derived from acceleration...which may also cause the wrong calculation of decomposed G.
Here is the fomulas I'm using to decompose G, and then to eliminate G on x,y,z
gx = (float) (GRAVITY_EARTH * Math.sin(roll*DEGREE_CONV));
gy = (float) (GRAVITY_EARTH * Math.sin(pitch*DEGREE_CONV));
gz = (float) (GRAVITY_EARTH * (Math.cos(pitch*DEGREE_CONV)*Math.cos(roll*DEGREE_CONV)));
ax = r_ax - gx;
ay = r_ay - gy;
az = r_az + gz;
where DEGREE_CONV is to convert degree to radian, r_ax,r_ay,r_az are the acceleration values directly from SensorListener(), ax,ay,az are the net accelerations which are supposed to be 0 when the phone is stationary.
Am I doing this correctly? I'm actually wondering, besides the problem that roll and pitch are not obtained at the same time as r_ax,r_ay,r_az are, the phone itself may not decompose G using exactly my formulas. So I have to find out how the phone does the decomposition in order for me to do the reverse process.
PS. honestly, Android keeping G by default is really annoying...
Click to expand...
Click to collapse
Hi,
Your gx and gy is almost right, but gz is wrong.
Actually, gz is quite easy to calculate if we already get gx and gy. Just keep the following equation in mind:
gx^2 + gy^2 + gz^2 = G^2
Thus,
abs(gz) = sqrt(G^2 - gx^2 - gy^2)
Be careful about the sign of gx, gy, and gz. gz's sign can be determined by pitch value, if abs(pitch) > 90, gz should be negatie; otherwise, it is positive. BTW, I think gy's sign is wrong in your equation.

App to calibrate the orientation sensors?

Mine seems to be really sensitive so that the screen rotates even if I tilt the phone a small amount. Is there any way to fine-tune it?
--
Sent from my HTC EVO 4G using Tapatalk Pro.
Wondering this also since I noticed there is no calibration for it in CM6.
Don't know about on CM6 but on other roms, go to Settings > Display > G-Sensor calibration.
Anyway to do this on non-rooted phones? Ever since I upgraded to Froyo it seems to rotate if I tilt it even just slightly off it's axis
Those directions were for rooted and non rooted phones...
Greenfieldan said:
Anyway to do this on non-rooted phones? Ever since I upgraded to Froyo it seems to rotate if I tilt it even just slightly off it's axis
Click to expand...
Click to collapse
Turn off garbage rotation with Switchpro
Anyone gotten a reply from Cyanogen? I messaged him on Twitter, but he never responded.
If you download, GPS Status from the market and in settings under " Help and release notes " it says this...........
My compass points to the wrong direction or I'm asked to calibrate my compass. What should I do?
Your phone contains a digital compass which measures the magnetic field's strength in three direction with three separate sensors. The orientation of your phone is calculated from these values. Unfortunately the sensitivity of the sensors are a little different. To correctly calculate your orientation your phone must measure first these differences. This is done during the calibration process. To calibrate your phone, simply find a space where no external magnetic field is present (preferable outside of buildings) and rotate your phone 1-2 times on EACH of its three axes (Swinging your phone in big 8s in all direction will also do, but it' less scientifically correct ). If you feel that your compass has become inaccurate you can repeat this procedure.
But i dunno if it works or not..
BAleR said:
If you download, GPS Status from the market and in settings under " Help and release notes " it says this...........
My compass points to the wrong direction or I'm asked to calibrate my compass. What should I do?
Your phone contains a digital compass which measures the magnetic field's strength in three direction with three separate sensors. The orientation of your phone is calculated from these values. Unfortunately the sensitivity of the sensors are a little different. To correctly calculate your orientation your phone must measure first these differences. This is done during the calibration process. To calibrate your phone, simply find a space where no external magnetic field is present (preferable outside of buildings) and rotate your phone 1-2 times on EACH of its three axes (Swinging your phone in big 8s in all direction will also do, but it' less scientifically correct ). If you feel that your compass has become inaccurate you can repeat this procedure.
But i dunno if it works or not..
Click to expand...
Click to collapse
That just calibrates the compass.

[Q] Difference - Gyro Sensor & G-Sensor

Hi,
Is there any difference between G-Sensor and Gyro Sensor?
HTC Sensation specifications states both sensors
Sensors
Gyro sensor
G-Sensor
Digital compass
Proximity sensor
Ambient light sensor
There is, but it's kinda subtle.
A G-sensor (accelerometer) can measure the change in acceleration of the device towards a direction. If you move the handset with a constant speed (no acceleration) then it shouldn't pick any signal. However, when moving their hand people change the speed slightly so an accelerometer picks that, but it will look sluggish.
A gyroscope can measure orientation, rotation and speed, so it can complement data collected from the accelerometer to smoothen out the reading of movement a great deal.
It's not the most important thing ever, but it's definitely a plus. Apps that use gyroscopes (mostly games and augmented reality apps) behave way more smoothly with it.
To put it more simply: The G-sensor measures the movement of the device. (By measuring acceleration). The gyro measures the tilt. They can work together to get more precise measurments of both.
Thanks for the explanations Guys...

calibrate altimeter

does anybody know how to calibrate the altimeter on the watch 2? it does work very precise tracking how many meters you ascent or descent while out and about, but knowing your excact altitude depends on barometric presure which is variable and needs calibrating. there is one standard watch face included called 'outside' on the watch which shows pressure and current altitude, but i cant seem to find a way to calibrate the altimeter. anybody any ideas?
glenner05 said:
does anybody know how to calibrate the altimeter on the watch 2? it does work very precise tracking how many meters you ascent or descent while out and about, but knowing your excact altitude depends on barometric presure which is variable and needs calibrating. there is one standard watch face included called 'outside' on the watch which shows pressure and current altitude, but i cant seem to find a way to calibrate the altimeter. anybody any ideas?
Click to expand...
Click to collapse
Did you ever find a way? I'm at sea level and it tells me I'm -21m
Sent from my Pixel 2 using Tapatalk
It's not that simple, and it's probably nothing that should be calibrated too. Giving you the altitude, based only on the barometic pressure (which is the sensor that the watch has), it's impossible. You need the local temperature too. Since the watch doesn't have a temp sensor, it relies on the temperature received from the internet to calculate the altitude. So, if the temperature is not accurate enough, it wil show you incorrect altitude "readings".
you can calibrate it by tapping the weather icon on Outdoor watch face ( see https://consumer.huawei.com/en/support/faqs/detail/?id=154328&name=HUAWEI WATCH 2 ) .It has nothing (or very little) to do with temperature. Altitude can be directly estimated from pressure, the problem is that air pressure varies over time (cyclone, anticyclone...).
More to the point is how to calibrate the barometer. It reads way too low (by 9mb/hPa).

Question Barometer react to display tap/pressure?

Can someone confirm that this is present on yours X5III? Wondering if this is by design or some fault.
I'm using barometer to log an altitude of my trips..
->
Open app showing barometer data (preferably Phyphox), run pressure test.
Tapping or making pressure to middle part of the display makes pressure go peaking high and low. Like this:
Probably normal, you're changing the internal pressure when you do that.
Means the watertight seal still intact.
Fun fact: this water-tight seal, plus a barometric sensor, has been used by apps to simulate features like the side squeeze Pixels had from series 2 thru 3a.
I tried the same thing on my old X Compact and it does the same thing. Only the sensor on XC has a lot slower readout so it does not show so rapidly and sometimes it smooth it out. Well, need to be more soft on tapping while also recording altitude with barometet ) thx for replies

Categories

Resources