1
This commit is contained in:
@@ -17,6 +17,7 @@ int8_t turn_flag = 0;
|
||||
int circle_flag = 1;
|
||||
int pingbi_num = 0;
|
||||
int last_garage_type = GARAGE_NONE;
|
||||
float turn_threshold = 12.0f;
|
||||
// 计算最小二乘法斜率的函数
|
||||
float leastSquaresSlope(float points[][2], int n)
|
||||
{
|
||||
@@ -369,6 +370,16 @@ void MidLineTrack()
|
||||
{
|
||||
aim_distance = cross_aim;
|
||||
}
|
||||
if (curvature >= turn_threshold)
|
||||
{
|
||||
aim_distance = turn_aim;
|
||||
}
|
||||
if (curvature <= turn_threshold)
|
||||
{
|
||||
aim_distance = mid_aim;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user