Skip to content

deep113/cordova-motion-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngMotion README

Overview

Cordova plugin to detect when a user is driving or walking that supports both iOS and Android.

Initialization

The ng-motion library will be initialized with driving and walking speed thresholds to determine when the tracked GPS motion is fast enough to be considered driving.

Events

The ng-motion library should emit periodic events when the user is in motion. Each event will contain the following:

  • type (walking/driving/motion)
    • walking - GPS motion with accelerometer motion that looks like walking, below the walking speed threshold.
    • driving - GPS motion that is not walking, above the driving speed threshold
    • motion - GPS motion that is not walking or driving
  • speed
  • heading
  • current long/lat

Logic

Walking - The ng-motion library will determine walking as below a certain speed threshold tracked via GPS motion and use the accelerometer to confirm that the user has walking-like motion. (see reference pedometer code for this)

Driving - The ng-motion library will determine driving as above a certain speed threshold traced via GPS motion and no exhibiting accelerometer motion consistentant with walking.

Motion - The ng-motion library will determine motion as any GPS motion that does not qualify as Walking or Driving.

Example

Project will provide an example app using Ionic Framework. This app should listed to the events from the ng-motion library and display all the even details. It should also allow for adjusting the driving/walking speed thresholds.

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published