sharkduino / Arduino_Animal_Tag

The main code that runs on the Sharkduinos
0 stars 0 forks source link

Gyro data not correctly recorded: Aug 2016-Feb 23, 2017 [Master] #21

Closed TheBen27 closed 7 years ago

TheBen27 commented 7 years ago

This bug has already been solved, but it's impactful enough to warrant an issue. Between about August 2016 and February 23, 2017, tags using code from the master branch did not correctly record gyroscope data.

This is because main sketch sampled at 12.5Hz. Although both the accelerometer and the gyroscope were sampling at 25Hz, the gyroscope's buffer filled up too quickly and captured only the first half of the data. The parser then stretched that half to fill in the gap.

Again, it doesn't impact the 25Hz branch or the shark data collected in July, only the Master branch. The issue is now fixed, but if you made any test sketches during that time period and noticed some odd behavior, you now know why.

WLaney commented 7 years ago

Just to be clear, only the gyro data in that time frame was affected? The accel did not use a FIFO buffer, so it should be fine.

TheBen27 commented 7 years ago

That's correct.

On Feb 24, 2017 1:01 PM, "William Laney" notifications@github.com wrote:

Just to be clear, only the gyro data in that time frame was affected? The accel did not use a FIFO buffer, so it should be fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WLaney/Arduino_Animal_Tag/issues/21#issuecomment-282359969, or mute the thread https://github.com/notifications/unsubscribe-auth/AI_0JZfNxs2fAoVtPl6Qr1DgFlNo6vCMks5rfxr0gaJpZM4MKwUh .

d9i commented 7 years ago

Hey! I've been trying to record some sample data with the Sharkduino V2.0a, and it seems like gyro data is still missing in ~25 sample increments. I tried commits 394214e, 965798d, and 820ea9e, and experienced the same issue with each. Maybe we could troubleshoot this later!

TheBen27 commented 7 years ago

Does the data follow a pattern of [32 samples, 32 blanks]? If so, it's working as intended. I added gyro turnoff code and, to test it, had the gyroscope turn off for every other set of reads. That's probably not what we want, so I'm going to remove it in my next commit.

(32 might not be the exact number, I think it's more like 48)

TheBen27 commented 7 years ago

Commented out turn-off code. Check it on your end.

d9i commented 7 years ago

Works great! Thanks so much! :D