added motion detection

This commit is contained in:
Martin Donnelly 2018-11-04 14:09:59 +00:00
parent 32b191c91a
commit 8f48b9952e
2 changed files with 3 additions and 3 deletions

View File

@ -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.979' };
const CACHE_VERSION = { 'version': '0.0.980' };
const PRECACHE = `jubileeData-${CACHE_VERSION.version}`;
const RUNTIME = 'runtime';

View File

@ -106,12 +106,12 @@ const LocationModel = Backbone.Model.extend({
console.log('now ts', ts);
motion.prev = Object.assign({}, motion.cur);
console.log('a*', motion);
console.log('a*', JSON.stringify(motion));
motion.cur.lat = latitude;
motion.cur.lon = longitude;
motion.cur.ts = ts;
console.log('b*', motion);
console.log('b*', JSON.stringify(motion));
const dist = distance(motion.prev.lat, motion.prev.lon, latitude, longitude);
console.log('Prev', motion.prev);