Why doesn’t the robot turn to the correct angle, even though the code we wrote calculates the angle using GPS and the atan2 function, and sets the heading? Could there be an issue with how the GPS and Inertial Sensor are used or how the angle is calculated? Or is the error due to inaccurate GPS measurements?
Could you post your code to make debugging easier? How far off is the robot rotation? If it’s only a few degrees, that’s almost unavoidable without a good PID.
One of the limitations to the GPS sensor accuracy is how straight and square the perimeter is. If the perimeter is skewed into a parallelogram or the walls are bowed into a curve, the reading can be off.
This is our code by blocks, we used GPS and Inertial sensor . But we couldn’t find where is our mistake
You aren’t waiting until the inertial sensor is done calibrating. I don’t know if the block code function automatically waits until completion, but you should check.