Close

Moving forward on Calculating Distance

A project log for Tracking without GPS

A different approach to tracking animals using Raspberry Pi 3, Texas Instruments Sensor Tag cc2650

brenda-armourBrenda Armour 10/21/2016 at 12:130 Comments

Measuring distance is a important component of this project. I am finding graphing the data in Freeboard is an excellent check to see if my calculations make sense. I have calculated the dynamic threshold and now will compare the second data to the first. I have used a node that delays the second flow by 1 second. Abit tricky but here is the initial graph. What I want is to determine if :

A step is defined as happening if there is a negative slope

of the acceleration plot (Flow2 < Flow1 ) when the

acceleration curve crosses below the dynamic threshold. I split the flow threshold into two flows. On Flow 2 I added a delay function to compare the first data to the second data coming in.

var delay=1000; //1 second
setTimeout(function() {  //your code to be executed after 1 second}, delay);
return msg;

As you can see in the video there is vibration going on even when the sensor tag is on my desk. A time window will next be added to discard invalid steps. At one point I move the tag around. The interval between two valid steps will be between .2 seconds and 2.0 seconds. Anything outside that time window will be ignored.

Discussions