The GPRMB and GPRMC GPS messages are possible sources of range and bearing to destination. Other information as well.
There is even a project for an R/C auto pilot using a PIC. There is BASIC code for reading the GPS messages, and computing a heading correction. I haven’t studied the code yet. But if you want to work with way points and a GPS, this could probably do it.
rcpilot.sourceforge.net/modules/rcap/index.php
rcpilot.sourceforge.net/docs/nmea.html
$GPRMB,A,0.66,L,003,004,4917.24,N,12309.57,W,001.3,052.5,000.5,V*0B
A Data status A = OK, V = warning
0.66,L Cross-track error (nautical miles, 9.9 max.),
steer Left to correct (or R = right)
003 Origin way point ID
004 Destination way point ID
4917.24,N Dest way point latitude 49 deg. 17.24 min. N
12309.57,W Dest way point longitude 123 deg. 09.57 min. W
001.3 Range to destination, nautical miles
052.5 True bearing to destination
000.5 Velocity towards destination, knots
V Arrival alarm A = arrived, V = not arrived
*0B mandatory checksum
$GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70
1 220516 Time Stamp
2 A validity - A-ok, V-invalid
3 5133.82 current Latitude
4 N North/South
5 00042.24 current Longitude
6 W East/West
7 173.8 Speed in knots
8 231.8 True course
9 130694 Date Stamp
10 004.2 Variation
11 W East/West
12 *70 checksum
HTH
Alan KM6VV
EDIT: And another one in C.
longtail.com/UAV2.c