Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if the Person falls down

I am creating an app in android where i need to detect if the person has fall down. I know that this question has been asked and answered as to use vector mathematics in other forums but i am not getting the accurate results out of it.

Below is my code to detect the fall:

@Override
public void onSensorChanged(SensorEvent arg0) {
  // TODO Auto-generated method stub
  if (arg0.sensor.getType()==Sensor.TYPE_ACCELEROMETER) {
    double gvt=SensorManager.STANDARD_GRAVITY;

    float vals[] = arg0.values;
    //int sensor=arg0.sensor.getType();
    double xx=arg0.values[0];
    double yy=arg0.values[1];
    double zz=arg0.values[2];
    double aaa=Math.round(Math.sqrt(Math.pow(xx, 2)
                                    +Math.pow(yy, 2)
                                    +Math.pow(zz, 2)));

    if (aaa<=6.0) {
      min=true;
      //mintime=System.currentTimeMillis();
    }

    if (min==true) {
      i++;
      if(aaa>=13.5) {
        max=true;
      }
    }

    if (min==true && max==true) {
      Toast.makeText(FallDetectionActivity.this,"FALL DETECTED!!!!!" ,Toast.LENGTH_LONG).show();
      i=0;
      min=false;
      max=false;
    }

    if (i>4) {
      i=0;
      min=false;
      max=false;
    }
  }
}

To explain the above code i have used the vector sum and checking if the value has reached below or equal to 6(while fall) and suddenly greater than 13.5(while landing) to confirm the fall.

Now i was been told in the forums that if the device is still the vector sum will return the value of 9.8. While fall it should be close to 0 and should go to around 20 while landing. This doesn't seem to happen in my case. Please can anybody suggest if i am going wrong anywhere?

like image 526
Karan Avatar asked Jan 10 '12 13:01

Karan


People also ask

Is there a device that detects a fall?

The LifeFone medical alert system includes many features for those who are comfortable with technology. You can think of LifeFone as both a medical alert system with fall detection and an all-in-one home monitoring system.

How do you do fall detection?

Turn fall detection on or offOpen the Apple Watch app on your iPhone, then tap the My Watch tab. Tap Emergency SOS. Turn Fall Detection on or off. If Fall Detection is on, you can select Always on or Only on during workouts.

Why do we detect fall?

The fall alert detectors can measure when the user has suddenly fallen by detecting the abrupt changes of body movements. The technology can evaluate an individual's body position, physical activity, and the smoothness of acceleration of movements, says the International Journal of Telemedicine and Applications.

What is the meaning of fall detection?

A fall detection system can be defined as an assistive device whose main objective is to alert when a fall event has occurred. In a real-life scenario, they have the potential to mitigate some of the adverse consequences of a fall.


1 Answers

There is a guy who developed an android app for that. Maybe you can get some information from his site: http://ww2.cs.fsu.edu/~sposaro/iFall/. He also made an article explaining how he detected the fall. It is really interesting, you should check it out!

Link for the paper: http://ww2.cs.fsu.edu/~sposaro/publications/iFall.pdf

Resuming, the fall detection is based on the resultant of the X-Y-Z acceleration. Based on this value:

  1. When falling, the falling generally starts with a free fall period, making the resultand drop significantly below 1g.
  2. On the impact on the ground, there is a peak in the amplitude of the resultant, with values higher than 3g.
  3. After that, if the person could not move due to the fall, the resultant will remain close to 1G.
like image 137
hugoeiji Avatar answered Sep 27 '22 16:09

hugoeiji