TG
Senior Member
The pic below is from the first sea trial. The heading nav function worked perfectly right off. Lock in a heading and it held straight as an arrow.
Next test was to navigate a route. The algorithm calls for corrections at greater than 90 meter crosstrack error to return to the course line at a right angle. Values less than 90 return to the course line adjusting in the direction of the course line from a right angle at a rate of 1 degree per meter. In other words if you are 2 meters away you return to the course line at 2 degrees off the course bearing. This is so when you arrive to the course line you don't overrun it.
Long Story short is I specified radians instead of degrees in one statement so the autopilot thought it was always greater than 90 meters away from the course line and all corrections were applied to return at a right angle. I kind of freaked out at first but decided to let it steer to see what it was doing and it produced the sinusoidal course below. I messed with the gain towards the end and affected the shape. The course line is missing because I took the picture back at the dock after the course was cancelled.
Next test was to navigate a route. The algorithm calls for corrections at greater than 90 meter crosstrack error to return to the course line at a right angle. Values less than 90 return to the course line adjusting in the direction of the course line from a right angle at a rate of 1 degree per meter. In other words if you are 2 meters away you return to the course line at 2 degrees off the course bearing. This is so when you arrive to the course line you don't overrun it.
Long Story short is I specified radians instead of degrees in one statement so the autopilot thought it was always greater than 90 meters away from the course line and all corrections were applied to return at a right angle. I kind of freaked out at first but decided to let it steer to see what it was doing and it produced the sinusoidal course below. I messed with the gain towards the end and affected the shape. The course line is missing because I took the picture back at the dock after the course was cancelled.