You firstly need to calculate the position error (difference from here to next destination)
by subtracting vectors - in other words compute the differences in
latttitude and longitude, then use trig to convert that to a distance and bearing (this
conversion depends on your local lattitude).
Then the code needs to convert the bearing to magnetic bearing (magnetic
correction), and direct the drive system to steer the vehicle to that bearing
on the compass.
Periodically recalculate to update the course and monitor distance-to-target.