Browse Source

优化滤波器的参数

liang 2 years ago
parent
commit
a9ba4268cb
2 changed files with 4 additions and 4 deletions
  1. 1 1
      app/app_game.c
  2. 3 3
      motion/trajAlgorithm/ekfPDR.c

+ 1 - 1
app/app_game.c

@@ -91,7 +91,7 @@ static void process_imu_data_front(int front_index)
 	if(front_index >IMU_MAX_GROUP_NUM)return;
 	for(int i = 0; i < front_index; i++)
 	{
-		int32_t dt = timestamp_front[i] - last_timestamp + 75;
+		int32_t dt = timestamp_front[i] - last_timestamp + 100;
 	
 		last_timestamp = timestamp_front[i];
 		

+ 3 - 3
motion/trajAlgorithm/ekfPDR.c

@@ -223,13 +223,13 @@ void State_covariance_matrix_update(float *P, float *acc_n, float dt)
 
 	for (int i = 0; i < 3; i++)
 	{
-		P[i * 9 + i] += 0.000001f;
+		P[i * 9 + i] += noise;
 	}
 	
 	for (int i = 6; i < 9; i++)
 	{
-		P[i * 9 + i] += 0.0001f ;
-		//P[i * 9 + i] += noise*100.f ;
+		//P[i * 9 + i] += 0.0001f ;
+		P[i * 9 + i] += noise*100.f ;
 	}
 
 }