G grazianod Member Licensed User Longtime User Oct 25, 2017 #1 hello, do you know how get accelerometer values without gravity? if i use the example, values are with gravity level; i need this value without gravity thanks guys for your help
hello, do you know how get accelerometer values without gravity? if i use the example, values are with gravity level; i need this value without gravity thanks guys for your help
Erel B4X founder Staff member Licensed User Longtime User Oct 25, 2017 #2 Pass 10 for the sensor type parameter. It is the value of the linear acceleration sensor. It is the same as the acceleration sensor without the gravity. Upvote 0
Pass 10 for the sensor type parameter. It is the value of the linear acceleration sensor. It is the same as the acceleration sensor without the gravity.
G grazianod Member Licensed User Longtime User Oct 25, 2017 #3 Thanks Erel, but where i have to pass "10" value? usualy i use "AddSensor(ps.TYPE_ACCELEROMETER, "ACCELEROMETER", True)" in the activity_create Upvote 0
Thanks Erel, but where i have to pass "10" value? usualy i use "AddSensor(ps.TYPE_ACCELEROMETER, "ACCELEROMETER", True)" in the activity_create
Erel B4X founder Staff member Licensed User Longtime User Oct 25, 2017 #4 Instead of ps.TYPE_ACCELEROMETER. Upvote 0
G grazianod Member Licensed User Longtime User Oct 25, 2017 #5 Erel said: Instead of ps.TYPE_ACCELEROMETER. Click to expand... thanks Erel, it works, but probably my question was not so exact. Whit this values i have a data similar to ROTATION_VECTOR and not a real G-force (if i move the device 40-50 degree on the left or right, the x or z values changes but after the real acceleration when i stop the device, values must go to "0" if device is stopped i must have "0"... no mouvment and no g-force) do you know how i can get this values? thanks and sorry for my question not so accurate Upvote 0
Erel said: Instead of ps.TYPE_ACCELEROMETER. Click to expand... thanks Erel, it works, but probably my question was not so exact. Whit this values i have a data similar to ROTATION_VECTOR and not a real G-force (if i move the device 40-50 degree on the left or right, the x or z values changes but after the real acceleration when i stop the device, values must go to "0" if device is stopped i must have "0"... no mouvment and no g-force) do you know how i can get this values? thanks and sorry for my question not so accurate
Erel B4X founder Staff member Licensed User Longtime User Oct 25, 2017 #6 I think that this is the sensor you are looking for. This is what I get when there is no movement: The values are not 0 but are not far from it. The phone accelerometers are not very accurate. Upvote 0
I think that this is the sensor you are looking for. This is what I get when there is no movement: The values are not 0 but are not far from it. The phone accelerometers are not very accurate.
G grazianod Member Licensed User Longtime User Oct 25, 2017 #7 Erel said: I think that this is the sensor you are looking for. This is what I get when there is no movement: The values are not 0 but are not far from it. The phone accelerometers are not very accurate. Click to expand... thanks! the 3rd value of linear_accelerometer is what i need. great support! Upvote 0
Erel said: I think that this is the sensor you are looking for. This is what I get when there is no movement: The values are not 0 but are not far from it. The phone accelerometers are not very accurate. Click to expand... thanks! the 3rd value of linear_accelerometer is what i need. great support!