Write a function to navigation.cpp, which holds a constant MAGNETIC heading and commands the boat to turn to that direction. The function gets as a parameter (at least) the heading, the time to keep the heading, and an orientation sensor object. Initially, the function shall only move the rudder servo.
OrientationSensor::heading() gives out the heading.
This is the lowest-level function of the boat software. Most of the processing time will be spent here, so it's vital that the function is working efficiently and is robust.
Write a function to navigation.cpp, which holds a constant MAGNETIC heading and commands the boat to turn to that direction. The function gets as a parameter (at least) the heading, the time to keep the heading, and an orientation sensor object. Initially, the function shall only move the rudder servo.
OrientationSensor::heading() gives out the heading.
This is the lowest-level function of the boat software. Most of the processing time will be spent here, so it's vital that the function is working efficiently and is robust.