What is needed for the default autopilot to follow a flight plan?

Hello,

I have developed a custom GPS, but the default autopilot does not reliably track the route.
I have not yet understood how the default autopilot works when GPS OVERRIDDEN and GPS DRIVES NAV1 is true. Does the default autopilot use the internal simulator flight plan? Or does it use GPS variables like GPS COURSE TO STEER or GPS WP CROSS TRK?

Any help would be greatly appreciated.