path-distance 0.1.1
Install from the command line:
Learn more about npm packages
$ npm install @indoor-analytics/path-distance@0.1.1
Install via package.json:
"@indoor-analytics/path-distance": "0.1.1"
About this version
Computes distance between two paths by projecting positions of the second (acquired) path onto the first (reference) one. This allows to compare paths with different location counts.
comparing two paths | comparing same paths with time information taken into account |
Add this line to ~/.npmrc
to set up the package registry:
@indoor-analytics:registry=https://npm.pkg.github.com/indoor-analytics
In your project, install the package:
npm i --save @indoor-analytics/path-distance
Import the function in your code:
import {pathDistance} from '@indoor-analytics/path-distance';
For each acquired path location, we create a projection on the reference path; first path location will always match first reference path, the same for the last location.
A projected position is obtained by:
- getting distance between the current path position and the path origin;
- computing the ratio position distance / path length;
- computing the equivalent distance regarding the reference path;
- projecting the position on the reference path.
For each path reference path segment (made by two consecutive path points):
- get both points' timestamps;
- get compared path segment whose locations have been captured while walking current reference path segment;
- compare reference path segment and compared path segment using classic distance algorithm
Details
- path-distance
- indoor-analytics
- almost 3 years ago
- MIT
- 12 dependencies
Assets
- path-distance-0.1.1-npm.tgz
Download activity
- Total downloads 10
- Last 30 days 0
- Last week 0
- Today 0