Global Positioning System Reference
In-Depth Information
expandBoundBox( point );
calculateTotalDistance()
:
}
The method appendPosition causes a new position to be created explicitly
without an external reference. The bounding box and total distance can
not be modified by shifting a location externally. The route variable and
its elements are encapsulated, while the actual implementation can remain
unknown. Conversely, positions should be copied when retrieving them
from the route:
public Position getPosition( int position )
{
return sequence.get( position ).getNewPosition();
}
The price of encapsulation are the cost of additional objects. One point is
created and a copy is appended to the route. To move a point, yet another
copy is created and copied one more time to put it back into the route.
4.5
NAVSTAR GPS
The next question after creating the Route and Position methods is how to
fill a route with plausible real-world data. The obvious solution is a global
navigation satellite system (GNSS) or global positioning system (GPS).
While GPS is the currently used shortened acronym, it was derived from
NAVSTAR GPS (Navigation System for Timing and Ranging), the first
actual global positioning system, launched in 1971. About 24 satellites
orbit the earth. With at least four satellites (three for position, one for
time) in sight, a GPS receiver is able to calculate its (lat,lon) location
with a certain precision and speed, depending on a number of factors. In
addition, many GPS devices are able to mark and record (or even transmit)
the current position. More sophisticated units allow the user to create and
store routes as well as load (digital) maps to be displayed on a small screen.
A simple mouse could be considered a GPS representing Position in the
software world. GPS systems are becoming more and more prevalent and
can be found in a growing number of devices (cell phones).
From the abstracted project view, a GPS is simply an arbitrary technical
system to enable electronic receivers to determine their current longitude,
latitude, and elevation information. Part of our task is to create a GPS
receiver for the software world, a GPS unit. Every RO will have a built-in
virtual GPS receiver.
 
Search WWH ::




Custom Search