offline-geo-location
v1.0.5
Published
Returns a calculated latitude and longitude based on your own offline measurements based on WiFi access points and their signal strengths (dBm)
Downloads
4
Maintainers
Readme
Offline Geo-location
Returns a calculated latitude and longitude based on your own offline measurements based on Wi-Fi access points and their signal strengths that have been converted to a distance.
Installation
npm i --save offline-geo-location
Usage
import getGeoLocation from 'offline-geo-location'
const previousMeasurements: Array<Measurement> // The measurements you did beforehand
const currentAccessPointsMeasurements: Array<Endpoint> // Your current scanned Wi-Fi access points with a distance
const [latitude, longitude] = getGeoLocation(previousMeasurements, currentAccessPointsMeasurements)
Types
const getGeoLocation = (measurements: Array<Measurement>, accessPointsMeasurements: Array<Endpoint>): Array<number, number> => {}
class Measurement {
endpoint: string; // SSID or MAC-adress
distance: number;
position: [number, number];
}
export default class Endpoint {
endpoint: string; // SSID or MAC-adress
distance: number;
}