I'd like to be able to point the watch in a direction and get the magnetic direction of the watch orientation, regardless of whether I'm moving.
Is there a way to get that information ?
Thanks
I'd like to be able to point the watch in a direction and get the magnetic direction of the watch orientation, regardless of whether I'm moving.
Is there a way to get that information ?
Thanks
In a widget or device app, yes. Sensor.getInfo().heading. If you are moving and GPS is on, the heading will be from GPS and not the compass.
In a DF, you can also see this is Activity.getActivityInfo().currentHeading
Hi Jim.
This is for a watch app, but you've pointed at the issue that I've been reading about here on the forums.
It sounds like once you're moving, the heading comes from the GPS, not the compass.
Is there a way to get watch orientation from the compass regardless of motion ?
I do use GPS in the app continuously.
I guess turning the GPS off (not sure how to do that) when taking a compass reading might be acceptable, but that approach isn't particularly desirable.
Based on speed, you'll see the compass even with GPS on, but it switches at about 2mph if I recall.
I think that's right. I tested that a long time ago.
So is there no way to get Magnetic orientation of the watch other than disabling the GPS ?
And... do you know of a list of watches that have a compass or some other way to determine that ?
The device reference doesn't seem to indicate the sensors on each model.
I use "has"
hasCompass=(Sensor.getInfo() has :mag);
I think they all might have it as far back as the va-hr