Skip to content

acceleration normalized to direction of motion #45

Description

@arjunroychowdhury

Hi, thanks for this excellent library. My use case is to detect acceleration values relative to the direction of motion in a car. In other words, the device could be kept in any orientation but I'd like the x/y/z to be normalized in the direction of motion. What might be the best settings to use ? So far I am using the following options (which is not producing intended results - depending on how my phone is oriented acc x/y/z report different values when I move)

Also note that in the retuned value, I am seeing absolute:false - my understanding reading the documentation is this should be true since I am using WORLD base

I am testing on iPhone 7 (latest OS update)

let gyroNormArgs = {
    logger: function (data) {console.log ("Gyr-log:"+JSON.stringify(data))},
    gravityNormalized:true, 
    orientationBase:GyroNorm.WORLD,
    frequency:1000,
    screenAdjusted:true,
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions