Thank you WS, and Grant, for your helpful attention to this thread.
Yes, I see the problem with injecting true heading (HDT) data in the place of course made good (VTG). Am I correct that, if you set COMPASS_USE = 0, so that the autopilot uses only GPS, then there is no "heading" entity, per se, used in the autopilot algorithm at all?
I still wonder why you could not use true heading data in the same way as magnetic compass heading, as long as you hacked it correctly, so to speak. (I got bogged down in I2C slave simulation when I went down that path.)
The question of VTG vis-à-vis HDT actually is the tip of a larger niggling question that I've had about autopilot algorithms: how importantly does heading information, as contrasted to course-made-good information, figure in an autopilot algorithm? After all, an autopilot program is by its nature an adaptive algorithm (quintessential cybernetics by the root of the word), meaning to say that it constantly corrects its response (outputs including steering and throttle) according to their effect (inputs including position, VTG or HDT, etc.). It would seem that the prescribed vehicle track vector is the ultimate aim and that to some extent it shouldn't matter which direction, exactly, the autopilot thinks the vehicle is pointing, as long as it turns in the right direction to get back on the right track.
In fact I've wondered whether an aquatic rover autopilot algorithm needs to be significantly different than a land rover autopilot algorithm, in light of the greater possibility of crabbing due to current or wind.
Experimentally I've found that the autopilot adapts fairly well to wind and current except in turns, but I've found that if the compasses are not well-calibrated the autopilot can scarcely follow a mission course. Just to pursue the academic question of the importance of accurate heading, maybe I will try setting the local magnetic declination off by increments, to get a sense of autopilot adaptability...
As an advance apology for tardy acknowledgement of any feedback, my wife and I are going "walkabout" in the nearby mountains for a week.