weighted-positioning

Localization weighted proximity to given vector coordinates

Usage no npm install needed!

<script type="module">
  import weightedPositioning from 'https://cdn.skypack.dev/weighted-positioning';
</script>

README

weighted-positioning

Localization using weighted proximity of a set of coordinates

Installation

npm install weighted-positioning

Usage

const {calculate, Vector} = require("weighted-positioning")

let res = calculate([
  {v: new Vector(2, 4), w: 10},
  {v: new Vector(7, 13), w: 50},
  {v: new Vector(10, 2), w: 20}
])

console.log(res) // { x: 7.125, y: 9.125 }