in src/sensors/geolocation.ts [66:83]
function (this: GeoLocation) {
Geolocation.getCurrentPosition(
({coords}) => {
if (coords) {
this.emit(DATA_AVAILABLE_EVENT, this.id, {
lat: coords.latitude,
lon: coords.longitude,
alt: coords.altitude,
});
}
},
error => {
if (error) {
// handle error
}
},
);
}.bind(this),