rzr / generic-sensors-lite

Naive implementation of w3c specs for IoT.js
https://purl.org/rzr/sensors
Apache License 2.0
10 stars 6 forks source link

Add geolocation #4

Closed rzr closed 5 years ago

rzr commented 5 years ago

It can be a simulator file in ./lib/geolocation/simulator.js for example

Simple latitude/longitude pair should be enough to start

Spec is at: https://github.com/w3c/geolocation-sensor

Relate-to: https://social.samsunginter.net/@rzr/101664108996494489

rzr commented 5 years ago

Thanks a lot @Vinnl for the simulator stub,

I am commenting for a couple of suggestions for community

It could be improved with some configuration ie:

{
source: { latitude: 0, longitude: 0},
dest: { latitude: 90, longitude: 180} 
}

Also supporting hardware sensor could be useful, I can test on a MAX6Q I have

A couple of links for anyone inspired:

rzr commented 5 years ago

More links:

https://www.npmjs.com/package/jsupm_ublox6 https://www.npmjs.com/package/node-nmea0183