Formula for Accelerometer data


#1

Hi,

I started to parse accelerometer data and noticed that the data are in range: 0…1023. I need to have these data in milli-gs. But I failed to understand what formula to use - [I][B]it’s a new topic for me[/B][/I]. I’ve searched in the net - and the best formula I found was here. But where can I find reference voltage and sensitivity values?

Thanks for any help!


#2

Isn’t there anybody who can help? At least give some clue or show the right direction where to search cause I don’t know what to do.

Thanks again!


#3

You probably want something like this:

float X = data.get(Accelerometer.LEFT_RIGHT.ordinal()).floatValue()/1000;
float Y = data.get(Accelerometer.FORWARD_BACKWARD.ordinal()).floatValue()/1000;
float Z = data.get(Accelerometer.UP_DOWN.ordinal()).floatValue()/1000;
musePitch = (float) (Math.atan2(Y, Z) * 180/Math.PI);
museRoll = (float) (Math.atan2(X, Math.sqrt(Y*Y + Z*Z)) * 180/Math.PI);

#4

No, it’ s not. I don’t use libmuse, I just parse the input data stream from Muse device and get three numbers according to http://developer.choosemuse.com/protocols/bluetooth-packet-structure#Accelerometer_Packet . I don’t think they are in milligs. That’s the problem.


#5

No, it’ s not. I don’t use libmuse, I just parse the input data stream from Muse device and get three numbers according to http://developer.choosemuse.com/protocols/bluetooth-packet-structure#Accelerometer_Packet . I don’t think they are in milligs.

That’s the problem.