new activities

This commit is contained in:
2016-04-22 12:24:22 +02:00
parent c95989fb83
commit 6d3d2eeb55
2 changed files with 4 additions and 2 deletions

View File

@@ -9,7 +9,8 @@ enum class Activity {
UNKNOWN, UNKNOWN,
STANDING, STANDING,
WALKING, WALKING,
STAIRS, STAIRS_UP,
STAIRS_DOWN,
ELEVATOR, ELEVATOR,
}; };

View File

@@ -105,7 +105,8 @@ private:
const double nodeProb = (possible.distToTarget < prev.distToTarget) ? 1 : pOther; // from previous node const double nodeProb = (possible.distToTarget < prev.distToTarget) ? 1 : pOther; // from previous node
double actProb = 1.0; double actProb = 1.0;
if (act == Activity::STAIRS) {actProb = (prev.z_cm != possible.z_cm) ? (0.8) : (0.2);} if (act == Activity::STAIRS_UP) {actProb = (prev.z_cm < possible.z_cm) ? (0.8) : (0.2);}
if (act == Activity::STAIRS_DOWN) {actProb = (prev.z_cm > possible.z_cm) ? (0.8) : (0.2);}
if (act == Activity::WALKING) {actProb = (prev.z_cm == possible.z_cm) ? (0.8) : (0.2);} if (act == Activity::WALKING) {actProb = (prev.z_cm == possible.z_cm) ? (0.8) : (0.2);}
// bring it together // bring it together