Skip to content

Commit

Permalink
Longer boundary curve
Browse files Browse the repository at this point in the history
  • Loading branch information
farmerbriantee committed Oct 24, 2023
1 parent 91dd72e commit 6913880
Showing 1 changed file with 26 additions and 27 deletions.
53 changes: 26 additions & 27 deletions SourceCode/GPS/Classes/CABCurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,13 @@ public void BuildCurveCurrentList(vec3 pivot)
}
}

point = new vec3(curList[curList.Count - 1]);
curList.Insert(0, point);
point = new vec3(curList[curList.Count - 2]);
curList.Insert(0, point);
point = new vec3(curList[1]);
curList.Add(point);
point = new vec3(curList[2]);
curList.Add(point);
if (mf.curve.curveArr[mf.curve.numCurveLineSelected - 1].Name == "Boundary Curve")
{
point = new vec3(curList[curList.Count - 1]);
curList.Insert(0, point);
point = new vec3(curList[curList.Count - 2]);
curList.Insert(0, point);
}

//int cnt;
//if (style == 1)
Expand Down Expand Up @@ -481,25 +480,25 @@ public void GetCurrentCurveLine(vec3 pivot, vec3 steer)
start = curList[i];
}

//if (mf.isAutoSteerBtnOn && !mf.isReverse)
//{
// if (isHeadingSameWay)
// {
// if (glm.Distance(goalPointCu, curList[(curList.Count - 1)]) < 0.5)
// {
// mf.TimedMessageBox(2000, gStr.gsGuidanceStopped, gStr.gsPastEndOfCurve);
// mf.btnAutoSteer.PerformClick();
// }
// }
// else
// {
// if (glm.Distance(goalPointCu, curList[0]) < 0.5)
// {
// mf.btnAutoSteer.PerformClick();
// mf.TimedMessageBox(2000, gStr.gsGuidanceStopped, gStr.gsPastEndOfCurve);
// }
// }
//}
if (mf.isAutoSteerBtnOn && !mf.isReverse)
{
if (isHeadingSameWay)
{
if (glm.Distance(goalPointCu, curList[(curList.Count - 1)]) < 0.5)
{
mf.TimedMessageBox(2000, gStr.gsGuidanceStopped, gStr.gsPastEndOfCurve);
mf.btnAutoSteer.PerformClick();
}
}
else
{
if (glm.Distance(goalPointCu, curList[0]) < 0.5)
{
mf.btnAutoSteer.PerformClick();
mf.TimedMessageBox(2000, gStr.gsGuidanceStopped, gStr.gsPastEndOfCurve);
}
}
}

//calc "D" the distance from pivot axle to lookahead point
double goalPointDistanceSquared = glm.DistanceSquared(goalPointCu.northing, goalPointCu.easting, pivot.northing, pivot.easting);
Expand Down

0 comments on commit 6913880

Please sign in to comment.