What I am working on AND EXPANDING (for you high tekies)
I have my waypoint follower working. This is where I make a route from waypoints and follow the route using the route outputs from the (any) gps with NMEA 0183 out capability. I am expanding the function capability of my interface to include a minimum speed to engage and a minimum distant to waypoint to engage the my homegrown autopilot. I sure enjoy this stuff.
Functional code that looks for waypoint heading, actual heading, sog, and range to target.. This is what I do to exercise my neurons.
loop1:
DEBUG "loop1", CR,CR
'Set GPS unit to standard NMEA outupt with a baud rate of 4800
'Put data in RAM from GPS, it is the current true heading
SERIN 0, 16884, [WAIT("GPRMC,"),WAIT(","),WAIT(","),WAIT(","),WAIT( ","),WAIT(","),WAIT(","),WAIT(","),DEC tru]
'Put data in RAM from GPS, it is current waypoint heading
SERIN 0, 16884, [WAIT("GPRMB,"),WAIT(","),WAIT(","),WAIT(","),WAIT( ","),WAIT(","),WAIT(","),WAIT(","),WAIT(","),WAIT( ","),DEC range1,DEC range2, DEC wpt]
DEBUG "true heading", CR
DEBUG DEC tru, CR, CR
DEBUG "waypoint", CR
DEBUG DEC wpt, CR, CR
DEBUG " SOG speed1", CR
DEBUG DEC speed1, CR, CR
DEBUG " SOG speed2", CR
DEBUG DEC speed2, CR, CR
' DEBUG "range1", CR
' DEBUG DEC range1, CR, CR
' DEBUG "range2", CR
' DEBUG DEC range2, CR
DEBUG "error", CR
DEBUG DEC error,CR
speed_test: 'go faster than .4 knots to engage autopilot steering
IF speed1 => Y THEN loop2
'else
IF speed2 => Z THEN loop2
'else
FREQOUT 12, 50, 1000 'beep the alarm speed too low
What ya think?
Member BS Pro-Staff and Billbob Pro-Staff
Proud Member of Team Geezer... authorized by: billbob and "G"