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

iOS reports gyroscope rates as deg/s while Android reports radians/s #3001

Closed
ChrisThrasher opened this issue May 13, 2024 · 2 comments · Fixed by #2978
Closed

iOS reports gyroscope rates as deg/s while Android reports radians/s #3001

ChrisThrasher opened this issue May 13, 2024 · 2 comments · Fixed by #2978

Comments

@ChrisThrasher
Copy link
Member

ChrisThrasher commented May 13, 2024

iOS:

case Sensor::Type::Gyroscope:
// Rotation rates are given in rad/s, convert to deg/s
value.x = toDegrees(static_cast<float>(manager.gyroData.rotationRate.x));
value.y = toDegrees(static_cast<float>(manager.gyroData.rotationRate.y));
value.z = toDegrees(static_cast<float>(manager.gyroData.rotationRate.z));
break;

Android:

case ASENSOR_TYPE_GYROSCOPE:
type = Sensor::Type::Gyroscope;
data.x = event.vector.x;
data.y = event.vector.y;
data.z = event.vector.z;
break;

The docs for ASENSOR_TYPE_GYROSCOPE specify that it reports redians per second, not degrees per second.

@ChrisThrasher
Copy link
Member Author

This should be fixed by #2978 by having both iOS and Android report radians and radians per second.

@eXpl0it3r eXpl0it3r linked a pull request May 19, 2024 that will close this issue
@eXpl0it3r
Copy link
Member

Fixed with #2978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants