03-01-2020 12:00
03-01-2020 12:00
When running this code on a Versa 2, the Versa 2 reports it does not have an OrientationSensor and Gyroscope. Is that expected? I am wanting to have a clockface react to wrist rotation.
import { OrientationSensor } from "orientation";
import { Gyroscope } from "gyroscope";
if (OrientationSensor) {
console.log("This device has an OrientationSensor!");
} else {
console.log("This device does NOT have an OrientationSensor!");
}
if (Gyroscope) {
console.log("This device has a Gyroscope!");
} else {
console.log("This device does NOT have a Gyroscope!");
}
Answered! Go to the Best Answer.
03-01-2020 15:08
03-01-2020 15:08
Ok, I see on the product marketing pages that only the Ionic has the gyroscope. I could not find any mention of an orientation sensor on any of the device product marketing pages. This should be noted in the technical documentation!
Is anyone aware of any open source libraries that assist with turning accelerator data into something like the Orientation API?
03-01-2020 12:07
03-01-2020 12:07
That is expected. Try using the accelerometer as a kludge.
03-01-2020 14:07
03-01-2020 14:07
Why is this expected? Is the feature not actually available or does the Versa 2 not actually have these sensors? Using the accelerator data would be much, much more difficult to detect wrist rotation.
03-01-2020 14:34
03-01-2020 14:34
Versa 2 doesn't have those sensors. You can see the specs here; compare with other devices.
Using accelerometer to detect wrist rotation may not be as hard as you think, because the accelerometer reports gravity. Ergo, you can use it like a noisy orientation sensor (in some dimensions).
03-01-2020 15:08
03-01-2020 15:08
Ok, I see on the product marketing pages that only the Ionic has the gyroscope. I could not find any mention of an orientation sensor on any of the device product marketing pages. This should be noted in the technical documentation!
Is anyone aware of any open source libraries that assist with turning accelerator data into something like the Orientation API?