Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion of gyroscope values #2

Open
embediver opened this issue Aug 26, 2021 · 0 comments
Open

Conversion of gyroscope values #2

embediver opened this issue Aug 26, 2021 · 0 comments

Comments

@embediver
Copy link

The values used to convert the gyroscope readings from int16 to float have inexplicable values.

When calculating the conversion values myself, I get the correct values for the accelerometer, but not so for the gyroscope.

For example:

float_t lsm6dsox_from_fs16_to_mg(int16_t lsb)
{
  return ((float_t)lsb) * 0.488f;
}

Corresponds nicely to 16/32767 * 1000.

But:

float_t lsm6dsox_from_fs1000_to_mdps(int16_t lsb)
{
  return ((float_t)lsb) * 35.0f;
}

Doesn't correspond to 1000/32767 * 1000 , which yields ~30.5.

Why is this so?
Is it a bug or some kind of special conversion factor I'm not aware of?

The values provided in the Code seem to match the examples from the application note though.
e.g. for 250dps like in the application note example, it would result in a range up to 286dps for that scale (which obviously doesn't make much sense from an outside viewpoint).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant