works, so here is a quick
system overview:
One has to ask the
following question: “Where
do I want my machine to
go?” Well, you need a
fairly large area in which to
play. I run Mr. Darby in a
small Vermont lake, which
is roughly 1.5 nm (nautical
mile) long and 0.75 nm
wide in the usable area,
or about 2,800 meters by
2,140 meters. A land
based robot or rover could
probably navigate an open area the size of a football field.
(Hold that thought, more on system accuracy in a bit.)
Once the system is powered up, the user has two
options: 1) enter a new trip from a terminal program; or
2) recall a previous trip from EEPROM in the Navigation
engine. Assuming option #1, pressing the S1 button on the
Navigation engine starts the interactive session. You must
know only one “hard” geographic latitude/longitude
coordinate — this is the start position of the trip; the dock,
in my case. The system will ask for the number of legs in
the trip — any number can be entered. A leg is defined
as a hard latitude/longitude waypoint, a TRUE north based
heading in degrees, and a distance expressed in nautical
miles. (Refer to the sidebar for an explanation of
navigation terminology.)
Once the initial lat/lon, heading, and distance are
entered, the Navigator asks for details on all subsequent
legs based on the first one. For each additional leg, one
needs to enter only the heading and distance associated
with that section. This process continues until all leg data
is entered. As the trip is entered, the data is stored in
EEPROM, allowing a trip to be instantly recalled and rerun
with a single button push. The course editor is completely
interactive and allows for correction of typing errors.
I’ve posted my Guide To Programming The Navigator
along with the software on the SERVO Magazine site
(
www.servomagazine.com) in the downloads area. The
Guide also provides tips for creating trip legs (segments)
using straightforward graphic techniques, a scale (ruler),
and a protractor.
A wealth of status information regarding the specific
trip is displayed on two 2x16 LCDs and multiple LED
indicators, as previously mentioned.
ACCURACY: How Much Is Not Enough?
As indicated earlier, consumer GPS accuracy has come
a long way in the past 10 years. Here are a few specific
examples: Our GPS was developed for military applications
and the civilian world (you and me) was offered a watered-down version as far as accuracy and repeatability were
concerned. The GPS honchos employed a technique known
as “selective availability,” whereupon a random error was
introduced into the civilian signal. This artificial error
56 SERVO 07.2009
resulted in a constantly wandering position fix and
sometimes would indicate vehicle movement at some
small rate even when standing still.
The end result was a GPS signal not stable enough
for repeatable precise work, and definitely not good enough
for this navigation system. Finally, selective availability
was “temporarily” turned off for good and repeatable
positioning become possible, resulting in the astounding
numbers of GPS gadgets currently available. The WAAS in
operation today provides us with GPS accuracy we can really
use. Based on several satellites fixed in stationary positions
local correction information is transmitted to end-user
GPS devices resulting in repeatable accuracy within
several meters.
So, what does this mean to our navigation system?
I can run my boat over courses with legs as short a 0.1 nm
(~185 m) and within a slot of 0.002 nm (~ 3. 7 m). This
means that the boat will stay within about four meters of
the center course heading on a trip leg — this without really
fine-tuning the algorithms or pressing the issue! However,
this system will NOT allow a vehicle to follow a narrow,
winding forest trail — at least not yet. However, I believe a
land based robot or rover could be made to navigate a
multileg trip within a large open field or arena.
So, if the concept of a “pretty good” independent
vehicle navigation system is interesting so far, let’s take a
close look at the details and construction of the system.
Along the way, I’ll introduce some concepts of spherical
(Great Circle) navigation for those interested. Remember,
you don’t need to have a math degree or understand
the heavy details of spherical algorithms to use and
enjoy this system.
Software
As they say, it’s ALL about software these days, and this
system is no exception! Check out the sidebar for a quick
overview of navigation terminology; next month, I’ll
describe the software involved in the Navigation engine in
some detail and touch on the other modules. There will be
some code snippets from the Navigation engine presented,
but I’ll leave investigation of the actual assembly language
packages in the GPS and PWM engines up to the reader
— it’s all posted and very heavily commented on the
SERVO website.
So, How Did It All Work?
You don’t have to understand the innards of the
Navigator to use it. So far, its performance has exceeded my
initial expectations ... while running courses on my lake, the
boat will usually return to within five meters of the launch
dock. I have run complex, five leg trips with no problems.
One does have to be aware of GPS accuracy depending
on the time of day. There are times when the navigation
satellites are clustered at some point in space, resulting in a
DOP (Dilution Of Precision) that will affect the accuracy of a
preplanned trip.
However, there is a GPS prediction program that allows
one to determine how good the GPS fix will be at your