Averaging 3-axis data
I'm currently successfully streaming 3-axis accel, gyro, and mag data to my android phone. I wanted to add in a little averaging to the stream to smooth out the data spikes. Unfortunately, when I added the averaging processor into the mix, I stopped receiving streamed data. As a test I switched to streaming a single axis with the averaging filter and that worked as expected. Is it possible to average all 3 axes data in the same stream?
I also noticed that the time stamps on the streamed data messages aren't evenly distributed. I'll frequently get 3 or 4 samples that are very close together followed by a gap, followed by another group of closely spaced messages. Is this normal. I noticed the data saved off from the sample app is exactly spaced based on the sampling frequency. I looked in that code and saw that that logger completely ignores the time stamp and just keeps a running count of the number of messages received. It calculates the time stamp by multiplying the message count by the sampling frequency. Is this safe? Does the sensor always generate exactly 50 samples/sec if the freq is 50Hz? It seems that keeping a running count like this could cause my calculated time to drift from the actual sample time the longer i sample
This discussion has been closed.