How to convert z-value to degrees per second

Thread Starter

tsumai1

Joined Mar 8, 2017
10
I am looking for a step by step guide on how to covert the z-value. But not in code because i have a hard time understanding people's code. For example :
"Step1 : Divide value by this value to get this value"
"Step 2: Take that value and multiply it by this value"
Am looking for an answer like that..

Plz help!!!!!!!!!!!!!!
 

Papabravo

Joined Feb 24, 2006
21,159
This is what I get for z-score
https://en.wikipedia.org/wiki/Standard_score

As near as I can tell a z-score is dimensionless, that is it has no units, because it measures a difference between the mean and a raw score in terms of standard deviations.

So, you must be talking about something else. Why don't you write a more precise question, telling us what kind of a z-score you are talking about and why you think it can be expressed in degrees per second.
 

Thread Starter

tsumai1

Joined Mar 8, 2017
10
Sorry not to mention exactly where z-value is from. The z-value is from a gyroscope sensor. So am looking for the method of converting the raw value to degrees per second without using the calcGyro() function.
 

Thread Starter

tsumai1

Joined Mar 8, 2017
10
How are the X and Y values converted?
They are converted using the same function...that function converts the raw values of x,y and z to degrees per second.
For example x-value will be changed to degrees per second, nd same applies to the other values....
 

BR-549

Joined Sep 22, 2013
4,928
Can you do that without error? I would think that one would want to use the same function on each axis.

Or is it a situation where the Z axis has little, or much more, movement than the X and Y axis?

Can the 3 axes be range independent in your device?
 

Papabravo

Joined Feb 24, 2006
21,159
They are converted using the same function...that function converts the raw values of x,y and z to degrees per second.
For example x-value will be changed to degrees per second, nd same applies to the other values....
C'mon! Do you really expect us to help you without access to even the basic data on your sensor? Post a link to a datasheet. Also I have no clue what this calcGyro() function does or where it is documented. Help us out and throw us some crumbs, cuz our crystal balls are in the shop for repair.

Short answer from known data. If you know the range of z-values, and you know the range of degrees, then the answer is straightforward. For example: if the z-value is a single byte unsigned number in the range -128 to +127 and this covers the range -50° to +50°, then to a first approximation each count is a bit less than 0.5°. All you have to do for a better approximation is the following:
  1. +50 - (-50) + 1 = 101 degree values
  2. +127 - (-128) + 1 = 256 count values
  3. Divide degree values by count values to get degrees per count 101/256 ≈ 0.395 degrees/count
To use this information, do the following:
  1. Take a z-value, -13 for example
  2. Multiply that z-value 0.395 to get -5°
That's about all there is to it.
Hint: All the points of this conversion will lie on a straight line.
 
Last edited:

Thread Starter

tsumai1

Joined Mar 8, 2017
10
Can you do that without error? I would think that one would want to use the same function on each axis.

Or is it a situation where the Z axis has little, or much more, movement than the X and Y axis?

Can the 3 axes be range independent in your device?
I will use the same function on each of the axes...
 

Thread Starter

tsumai1

Joined Mar 8, 2017
10
C'mon! Do you really expect us to help you without access to even the basic data on your sensor? Post a link to a datasheet. Also I have no clue what this calcGyro() function does or where it is documented. Help us out and throw us some crumbs, cuz our crystal balls are in the shop for repair.
 

Attachments

Thread Starter

tsumai1

Joined Mar 8, 2017
10
Tha
C'mon! Do you really expect us to help you without access to even the basic data on your sensor? Post a link to a datasheet. Also I have no clue what this calcGyro() function does or where it is documented. Help us out and throw us some crumbs, cuz our crystal balls are in the shop for repair.

Short answer from known data. If you know the range of z-values, and you know the range of degrees, then the answer is straightforward. For example: if the z-value is a single byte unsigned number in the range -128 to +127 and this covers the range -50° to +50°, then to a first approximation each count is a bit less than 0.5°. All you have to do for a better approximation is the following:
  1. +50 - (-50) + 1 = 101 degree values
  2. +127 - (-128) + 1 = 256 count values
  3. Divide degree values by count values to get degrees per count 101/256 ≈ 0.395 degrees/count
To use this information, do the following:
  1. Take a z-value, -13 for example
  2. Multiply that z-value 0.395 to get -5°
That's about all there is to it.
Hint: All the points of this conversion will lie on a straight line.
Thank you thats what I needed....sorry for explaining clearly
 

Thread Starter

tsumai1

Joined Mar 8, 2017
10
For UOTE="tsumai1, post: 1104767, member: 424292"]Tha

Thank you thats what I needed....sorry for explaining clearly[/QUOTE]
For not explaining clearly*
 

Papabravo

Joined Feb 24, 2006
21,159
2.1 Gyroscope Features The triple-axis MEMS gyroscope in the MPU-9250 includes a wide range of features:
  • Digital-output X-, Y-, and Z-Axis angular rate sensors (gyroscopes) with a user-programmable fullscale range of ±250, ±500, ±1000, and ±2000°/sec and integrated 16-bit ADCs
OK. You have a 16- bit signed number which can be mapped to the range ±250 °/sec
  1. How many °/sec values do we have? +250 - (-250) + 1 = 501
  2. How many count values do we have? +32767 - (-32768) + 1 = 65536
  3. Divide °/sec values by count values to get 501 /65536 ≈ 7.645e-3 °/sec/count
To apply this information:
  1. Take a count value, 1344 for example
  2. Multiply that value by 7.645e-3 to get 10.742 °/sec
It's just that easy.
 

Thread Starter

tsumai1

Joined Mar 8, 2017
10
Thank
2.1 Gyroscope Features The triple-axis MEMS gyroscope in the MPU-9250 includes a wide range of features:
  • Digital-output X-, Y-, and Z-Axis angular rate sensors (gyroscopes) with a user-programmable fullscale range of ±250, ±500, ±1000, and ±2000°/sec and integrated 16-bit ADCs
OK. You have a 16- bit signed number which can be mapped to the range ±250 °/sec
  1. How many °/sec values do we have? +250 - (-250) + 1 = 501
  2. How many count values do we have? +32767 - (-32768) + 1 = 65536
  3. Divide °/sec values by count values to get 501 /65536 ≈ 7.645e-3 °/sec/count
To apply this information:
  1. Take a count value, 1344 for example
  2. Multiply that value by 7.645e-3 to get 10.742 °/sec
It's just that easy.
Thank you
 

BR-549

Joined Sep 22, 2013
4,928
I believe that calcGyro(x) is a register or memory location in the sensor chip. It holds the calculated rate of change of angle on the x axis.

This chip sits there and renews all these register values continuously for your application to read and use.
 

BR-549

Joined Sep 22, 2013
4,928
I was thinking that pushed the limits of the word sensor. They call it a motion tracking device.

That thing could whistle dixie.

What toys there are to play with now.
 
Top