By Chris Savage
GPS
Navigation
In this last part, I have refined the
original test platform to be able to
not only navigate from one waypoint
to another, but to handle input from
sensors and also to correct for errors
in heading not adequately handled in
the code from the last installment.
This code is a bit more complex and
so the focus will be on how the
individual sections work to complete
the task of navigation.
Code Tactics
Typically, there is a style to my programming that
involves a main loop and many subroutines to complete the
tasks of the program. Usually, the main loop is not much
more than a series of subroutine calls. This usually makes it
pretty easy to break the program up into manageable
chunks. In this application, we’ll be following a similar
pattern although some of the subroutines will be handling
tasks based on variables set in other subroutines. While not
exactly unusual for BASIC programming, the logic may be
quite different for controllers which pass parameters into or
out of subroutines.
Upgrades
In order to handle the additional sensors, the original
Super Carrier Board (Figure 1) was replaced with a new
Super Carrier Board (Figure 2) with different connections
for the various sensors used by the new code. There is also
SERVO 05.2010 61