Browse Source

IMU的间隔时间戳设置为0.00258s

liang 2 years ago
parent
commit
ea7957203d
2 changed files with 10 additions and 9 deletions
  1. 1 1
      motion/detect_zero_vel.c
  2. 9 8
      motion/trajAlgorithm/footPDR.c

+ 1 - 1
motion/detect_zero_vel.c

@@ -465,7 +465,7 @@ void detect_zero_vel(int16_t front[3], int16_t back[3], int16_t acc[3],
 		//利用特殊的压力上升等待时间和抖动来判断
 	if(special_press_up_wait > 0 && abs(acc_norm - 4194304) < 300000)
 	{
-		*front_zero = 1;
+		//*front_zero = 1;
 
 		if (front_zero_tmp == 0)
 		{

+ 9 - 8
motion/trajAlgorithm/footPDR.c

@@ -698,14 +698,15 @@ unsigned char footPDR(uint32_t num, float *gyr, float *acc, uint16_t front_press
 {
 	unsigned char movement_e = 0;
 	
-	dt = (float)(num - last_timestamp) * 0.000001f;
-	
-	if(num  < last_timestamp || dt > 0.006f)
-	{
-		//dt =(float)(4294967295 - last_timestamp + num) * 0.000001f;
-		dt = 0.0024f;
-	}
-	
+	dt = 0.00258f;
+//	dt = (float)(num - last_timestamp) * 0.000001133f;
+//	
+//	if(num  < last_timestamp || dt > 0.006f)
+//	{
+//		//dt =(float)(4294967295 - last_timestamp + num) * 0.000001f;
+//		dt = 0.00272f;
+//	}
+//	
 	
 	last_timestamp = num;