diegogubellini Member Licensed User Longtime User Jul 15, 2014 #1 Hello all I used the code showed in this tutorial to get the signal of two accelerometers: http://www.b4x.com/android/forum/threads/orientation-and-accelerometer.6647/ I need a quite high sampling rate in the accelerometers and after apply a IIR filter. The updating of value of accelerometers is made by the sub _onchanged. The problem I have is the frequency of the app update the value of each sensors. Moving the phone the value changes (more less) 3-4 times per second. I would like to obtain a frequency of (at least) 20-30 Hz. There is some parameters that I can change to have more. I tested the app in two differents phone: huawei ascend y300 and samsung galaxy S4 and the result is the same... Let say it does not matter of the power of phone. Thanks for help
Hello all I used the code showed in this tutorial to get the signal of two accelerometers: http://www.b4x.com/android/forum/threads/orientation-and-accelerometer.6647/ I need a quite high sampling rate in the accelerometers and after apply a IIR filter. The updating of value of accelerometers is made by the sub _onchanged. The problem I have is the frequency of the app update the value of each sensors. Moving the phone the value changes (more less) 3-4 times per second. I would like to obtain a frequency of (at least) 20-30 Hz. There is some parameters that I can change to have more. I tested the app in two differents phone: huawei ascend y300 and samsung galaxy S4 and the result is the same... Let say it does not matter of the power of phone. Thanks for help
Erel B4X founder Staff member Licensed User Longtime User Jul 15, 2014 #2 Use PhoneSensors.Initialize2 and pass 0 for the SensorDelay parameter. Upvote 0
diegogubellini Member Licensed User Longtime User Jul 15, 2014 #3 Thanks Erel, it works as I need. Upvote 0
diegogubellini Member Licensed User Longtime User Jul 16, 2014 #4 Erel said: Use PhoneSensors.Initialize2 and pass 0 for the SensorDelay parameter. Click to expand... Erel, there is any chance to make something similar for the signal of GPS? Thanks Upvote 0
Erel said: Use PhoneSensors.Initialize2 and pass 0 for the SensorDelay parameter. Click to expand... Erel, there is any chance to make something similar for the signal of GPS? Thanks
NJDude Expert Licensed User Longtime User Jul 16, 2014 #5 You can pass 0 on the GPS' minimum time. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 16, 2014 #6 You can set the two parameters in the GPS to 0. Upvote 0