added motion detection
This commit is contained in:
parent
0fecb68d88
commit
32b191c91a
@ -11,7 +11,7 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
const CACHE_VERSION = { 'version': '0.0.977' };
|
||||
const CACHE_VERSION = { 'version': '0.0.979' };
|
||||
const PRECACHE = `jubileeData-${CACHE_VERSION.version}`;
|
||||
const RUNTIME = 'runtime';
|
||||
|
||||
|
@ -100,14 +100,18 @@ const LocationModel = Backbone.Model.extend({
|
||||
const timeS = (ts - motion.prev.ts) / 1000.0;
|
||||
|
||||
console.log('time dif', timeS);
|
||||
console.log('dif', (ts - motion.prev.ts));
|
||||
console.log('t', now);
|
||||
|
||||
console.log('now ts', ts);
|
||||
|
||||
motion.prev = Object.assign({}, motion.cur);
|
||||
console.log('a*', motion);
|
||||
|
||||
motion.cur.lat = latitude;
|
||||
motion.cur.lon = longitude;
|
||||
motion.cur.ts = ts;
|
||||
console.log('b*', motion);
|
||||
|
||||
const dist = distance(motion.prev.lat, motion.prev.lon, latitude, longitude);
|
||||
console.log('Prev', motion.prev);
|
||||
|
Loading…
Reference in New Issue
Block a user