|
@@ -673,7 +673,7 @@ unsigned char footPDR(int num, float *gyr, float *acc, int press, float* pos_res
|
|
down_pass1 = 0;
|
|
down_pass1 = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- if(fabs(gyr[1]) > 1.5f || fabs(gyr[2]) > 0.5f)
|
|
|
|
|
|
+ if(fabs(gyr[1]) > 1.0f || fabs(gyr[2]) > 0.3f)
|
|
{
|
|
{
|
|
down_pass1 = 1;
|
|
down_pass1 = 1;
|
|
}
|
|
}
|
|
@@ -687,7 +687,7 @@ unsigned char footPDR(int num, float *gyr, float *acc, int press, float* pos_res
|
|
down_pass2 = 0;
|
|
down_pass2 = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- if(fabs(gyr[1]) > 1.5f || fabs(gyr[2]) > 0.5f)
|
|
|
|
|
|
+ if(fabs(gyr[1]) > 1.0f || fabs(gyr[2]) > 0.3f)
|
|
{
|
|
{
|
|
down_pass2 = 1;
|
|
down_pass2 = 1;
|
|
}
|
|
}
|
|
@@ -741,12 +741,12 @@ unsigned char footPDR(int num, float *gyr, float *acc, int press, float* pos_res
|
|
|
|
|
|
//RUN_ZUPT mean detect on floor when running
|
|
//RUN_ZUPT mean detect on floor when running
|
|
int RUN_ZUPT = 0;
|
|
int RUN_ZUPT = 0;
|
|
- if((frame_index > 10 && ZUPT_STATUS == 1 && gyr_norm_window[window_index] < 1.0f))
|
|
|
|
|
|
+ if((frame_index > 10 && ZUPT_STATUS == 1))
|
|
RUN_ZUPT = 1;
|
|
RUN_ZUPT = 1;
|
|
|
|
|
|
//STAND_ZUPT mean detect on floor when no any moving
|
|
//STAND_ZUPT mean detect on floor when no any moving
|
|
int STAND_ZUPT = 0;
|
|
int STAND_ZUPT = 0;
|
|
- if((frame_index > 15 && gyr_norm_window[window_index] < 0.35f && fabs(min_window_val(gyr_norm_window, 10) - max_window_val(gyr_norm_window, 10)) < 0.1f))
|
|
|
|
|
|
+ if((frame_index > 15 && gyr_norm_window[window_index] < 0.5f && fabs(min_window_val(gyr_norm_window, 10) - max_window_val(gyr_norm_window, 10)) < 0.2f))
|
|
STAND_ZUPT = 1;
|
|
STAND_ZUPT = 1;
|
|
|
|
|
|
|
|
|
|
@@ -814,13 +814,13 @@ unsigned char footPDR(int num, float *gyr, float *acc, int press, float* pos_res
|
|
|
|
|
|
if(HAS_RESULT == 1)
|
|
if(HAS_RESULT == 1)
|
|
{
|
|
{
|
|
- if(pos_offset[1] < -0.2f)
|
|
|
|
|
|
+ if(pos_offset[1] > 0.15f)
|
|
{
|
|
{
|
|
movement_e = MOTION_LEFT;
|
|
movement_e = MOTION_LEFT;
|
|
HAS_RESULT = 0;
|
|
HAS_RESULT = 0;
|
|
|
|
|
|
}
|
|
}
|
|
- else if(pos_offset[1] > 0.2f)
|
|
|
|
|
|
+ else if(pos_offset[1] < -0.15f)
|
|
{
|
|
{
|
|
movement_e = MOTION_RIGHT;
|
|
movement_e = MOTION_RIGHT;
|
|
HAS_RESULT = 0;
|
|
HAS_RESULT = 0;
|
|
@@ -839,12 +839,12 @@ unsigned char footPDR(int num, float *gyr, float *acc, int press, float* pos_res
|
|
IS_DOWN = 0;
|
|
IS_DOWN = 0;
|
|
|
|
|
|
}
|
|
}
|
|
- else if(stand_num > 100)
|
|
|
|
- {
|
|
|
|
- movement_e = MOTION_STOP;
|
|
|
|
|
|
+// else if(stand_num > 100)
|
|
|
|
+// {
|
|
|
|
+// movement_e = MOTION_STOP;
|
|
|
|
|
|
- stand_num = 0;
|
|
|
|
- }
|
|
|
|
|
|
+// stand_num = 0;
|
|
|
|
+// }
|
|
}
|
|
}
|
|
return movement_e;
|
|
return movement_e;
|
|
}
|
|
}
|