Question

I'm using DataLogging service to log the raw accelerometer reading from pebble and retrieve these as byte array on my android. Just not sure how to interpret it based on the AccelData struct (x, y, z, did_vibrate boolean, time stamp). Here is a byte array string sample:

[-112, -1, 32, -1, 88, -4, 0, 95, -73, -62, -106, 68, 1, 0, 0]

(sampling with 10Hz and 10 samples per update)

Thanks.

Was it helpful?

Solution

isVibrate is 1 byte (bool)

timestamp is 8 bytes (uint64)

x, y, z are each 2 bytes (int16)

it looks like the data in your array is in reverse order of the struct definition. depending on what language you are coding in, the routine to convert these bytes into useable numbers will be different...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top