plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Request]: sensors_plus stream for gravity acc request

Open DionNam opened this issue 1 year ago • 2 comments

Plugin

sensors_plus

Use case

I only need gravity acc values to know the phone's brief orientation. Right now, I need to get both acc and user acc values and subtract user acc from acc values to get the gravity acc value.

Proposal

in the android and iOS documentation, I could see that they also provide gravity acc values too. Can you make this gravity acc value accessible? like this plugin supports other acc or user acc values.

DionNam avatar May 25 '24 04:05 DionNam

This is something that would be useful for my current project too. But also subracting works fine so not sure if it's worth implementing though. @miquelbeltran I'm not sure if this is something that is wanted for this plugin. If so I'd be happy to try and implement, although not sure when. Thoughts?

Android has dedicated TYPE_GRAVITY and for iOS the DeviceMotion data is retrieved for userAcceleration which already contains seperate gravity data points too which could be used.

aanas-sayed avatar Jul 23 '24 14:07 aanas-sayed

Greetings @miquelbeltran, I'm currently working on solving this issue, at least for Android. However, the implementation requires changes to both the sensors_plus_platform_interface and sensors_plus packages. Should I create separate PRs, or is it acceptable to include everything in one PR?

84rrry avatar Aug 06 '24 16:08 84rrry