diff -r 08f96aad0127 -r 15b11d291417 middleware/Tracking/Postures/FallDetector.cs
--- a/middleware/Tracking/Postures/FallDetector.cs Thu Jun 21 16:54:04 2012 +0200
+++ b/middleware/Tracking/Postures/FallDetector.cs Thu Jun 21 17:13:40 2012 +0200
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Middleware package.
*
* (c) IRI
@@ -11,14 +11,12 @@
* Projet : TraKERS
* Module : MIDDLEWARE
* Sous-Module : Tracking/Gestures
- * Classe : JumpDetector
+ * Classe : FallDetector
*
* Auteur : alexandre.bastien@iri.centrepompidou.fr
*
- * Fonctionnalités : Permet de détecter si l'utilisateur a sauté, en se basant sur
+ * Fonctionnalités : Permet de détecter si l'utilisateur est tombé, en se basant sur
* des règles appliquées à la positions des noeuds dans le temps.
- *
- * P.S : Cette partie est encore en développement.
*/
using System;
@@ -47,25 +45,11 @@
//Crée un état local afin de pouvoir analyser s'il y a une posture.
List localState = new List(currentState);
- /*if (localState[(int)JointType.KneeLeft].Position.Z + 0.10 < localState[(int)JointType.HipCenter].Position.Z)
- debug.onR0(true);
- else
- debug.onR0(false);
- if(localState[(int)JointType.KneeRight].Position.Z + 0.10 < localState[(int)JointType.HipCenter].Position.Z)
- debug.onR1(true);
- else
- debug.onR1(false);
- if (Math.Abs(localState[(int)JointType.HipCenter].Position.Z - localState[(int)JointType.Head].Position.Z) <= 0.20)
- debug.onR2(true);
- else
- debug.onR2(false);*/
-
//Si les genoux ne sont pas éloignés d'au moins 20cm vers l'avant par rapport aux hanches
//OU si les hanches et la tête ne sont pas au même niveau avec 20 cm d'erreur.
//Alors on ne fait pas un fall.
if (localState[(int)JointType.KneeLeft].Position.Z + 0.15 >= localState[(int)JointType.HipCenter].Position.Z ||
localState[(int)JointType.KneeRight].Position.Z + 0.15 >= localState[(int)JointType.HipCenter].Position.Z ||
- //||
Math.Abs(localState[(int)JointType.HipCenter].Position.Z - localState[(int)JointType.Head].Position.Z) > 0.20)
return false;
return true;