Motion Detection Using Timer and Offline Logging

Hi,

 I have metawear rpro and I am trying to program it to detect motion in every 5 minutes and then wait for 15 minutes. I have made a few simple examples with start stop buttons for logging accelerometer data and enabling motion detection.  It should always log the 5 minute acceleration data in order to detect "significant motion", "no motion" and "flat detection". I will make use of these detection to determine sleep/wake/moving-walking status of people 7/24 offline in the background. Is it possible to log acceleration data for 5 minutes and then detect the most occurring motion type and then wait(disconnect) for 15 minutes? Should I use triggers on axes for logging data and scheduling events and/or db for keeping the data? To sum up, what are the appropriate steps for me to make this idea happen?

Thanks, 
Tugba

Comments

  • edited May 2016
    That depends on the accelerometer's output data rate.  If you're running it at 100Hz, then it will fill up the logger in about 30 seconds.

    You should instead utilize the bmi160's build in detection algorithms to avoid storing acceleration data.  Instead of significant motion detection, you can use the step counter (or detector) to track walking via number of steps.

    How you preserve the data depends on your use case.
  • Thanks Eric.

    So is it possible to use detection algorithms inside a timer without logging acceleration data? As far as I remember in the getting started apps I made I needed to log acceleration data and download later in order to get the notification from the detection algorithms. If I do not need to log acceleration data it would be better for sure.
    By the way is there any example app showing motion detection inside a timer?
  • I'm not sure what you mean by using motion detection inside a timer.  Motion detection is a algorithm running on the accelerometer, independent of MetaWear.
  • I mean motion detection must be made in the specific interval of time as I said before in every 5 minutes, and then disconnect for 15 minutes. After 5 minutes there should be only 1 status like "no motion detected" to determine the motion status of a person. 
  • More specifically, is it possible to "enableMotionDetection" inside a "timerModule.scheduleTask" method?
  • Yes, you can call enableMotionDetection inside a timer task.
This discussion has been closed.