Global Positioning System Reference
In-Depth Information
Chapter 4
Space & Time
4.1
Introduction
In this chapter the
roaf.gps
package will be created to manage spatial
(WGS84) coordinates and to keep universal time (UTC). A virtual GPS
unit is created to play (back) or record GPS traces and to provide transfor-
mations from geographical to Cartesian coordinates in order to calculate
absolute distance and speed.
4.2
A
GeoPoint
for Spatial Coordinate Systems
The RO vision on page 18 states that \. . . every
RealObject
must have a
location . . . "
A location? Since every ROApp represents a virtual real-world scenario,
it makes sense to restrict the real world to the surface of the globe. Some
research reveals the information needed to create a general-purpose position
object:
ˆ
Geophysically speaking the globe has a fluid core and a cold crusty
surface.
ˆ
Gravity forces its mass to form a ball spinning with one revolution
per day.
ˆ
Mathematically the spin implies two well-defined points: the poles.
ˆ
Due to inertia the poles are closer to the center than the equator
(flattening).
This geometric body suggests a spherical coordinate system and -
nally defines any location on the surface with the
double
values
latitude,
longitude
for two dimensions. The vision of real objects separates inter-
nal coding from the external environment. Therefore the third dimension
elevation
in meters above sea level should be added for three-dimensional
35
Search WWH ::
Custom Search