added motion detection
This commit is contained in:
parent
af7091e0cc
commit
2536505cee
@ -106,6 +106,9 @@ const LocationModel = Backbone.Model.extend({
|
||||
motion.cur.ts = ts;
|
||||
|
||||
const dist = distance(motion.prev.lat, motion.prev.lon, latitude, longitude);
|
||||
console.log('Prev', motion.prev);
|
||||
console.log('Cur', motion.cur);
|
||||
|
||||
|
||||
const timeS = (motion.cur.ts - motion.prev.ts) / 1000.0;
|
||||
const speedMps = dist / timeS;
|
||||
|
Loading…
Reference in New Issue
Block a user