Vivaldi: A Decentralized Network Coordinate System. Originaly description here.This package based on source code of Vuze and required nodejs >= 4.
Create VivaldiPosition
instance from raw coordinates. Argument data
should have length == 4.
Create VivaldiPosition
instance from HeightCoordinates
instance.
Create new empty VivaldiPosition
instance. Argument error
is optional.
Update position p1
with other position p2
and time rtt
.
Calculate distace between p1
and p2
.
Check to equals p1
and p2
.
const vivaldi = require('vivaldi-coordinates');
var local_pos = vivaldi.create(); // create new empty pos;
var remote_pos; // position from some remote host
var rtt = 7; // ping time to remote host
vivaldi.update(rtt, local_pos, remote_pos); // update local position
MIT, 2015 (c) Dmitry Tsvettsikh