-
Notifications
You must be signed in to change notification settings - Fork 33
Coordinate Systems
Ultimately explaining the location of objects involves an explanation of coordinate systems. The coordinate system describes relative positions, there has to be an origin somewhere, and there has to be a distance and direction from the origin. There are several PDUs with position records, but the answer depends on explaining the semantics of the records.
A classic position record looks simple:
X | Y | Z |
---|---|---|
-2708674 | -4352564 | 3781867 |
It's three double precision floating point numbers in the record. What on earth is the meaning of the numbers? Where is the origin, what are the units the numbers use, and is that a rectilinear coordinate system? The designers of DIS wanted to position items anywhere, including the air, below the ocean, submarines, land, and orbit. In this case, the numbers describe the location of Monterey, California, at
Latitude | Longitude | Altitude (m) |
---|---|---|
36.6002 | -121.8947 | 0 |
While the (X, Y, Z) coordinates describing the same location are in meters.
DIS uses (mostly) a rectilinear coordinate system with its origin at the center of the earth. The units are expressed in meters. This seems odd if all you want to do as a simulator writer is place an aircraft carrier in the right location, but a better idea when you realize the simulations often use curvature of the earth. Mathematicians are sophisticated enough to supply conversion formulas between DIS and latitude/longitude/altitude (LLA), or Military Grid Reference System (MGRS), or other grid systems.
The DIS position system solved problems most computer entertainment games didn't bother to solve--the games usually stuck to a perfectly flat game terrain instead of replicating the curved earth, or replicating a specific place in the real worlds at scale. DIS can also use options involving more math. The DIS developer can place of flat service at a point on the globe that approximates a real position. This can introduce some errors at longer ranges, but at the same time make programming easier.
The coordinate system looks like this:
The graphics have some hints about how complex things can get. To begin with the earth is not a perfect sphere. It is more of an oblate spheroid, although the nature of the figures can work better or worse depending on the location. We need both a coordinate system to specify the (X, Y, Z) and an agreement on where the surface of the earth is. Different nations often use different oblate spheroids, but DIS uses the GPS system. An online calculator is at
Location Calculator to convert between (XYZ) and latidude/longitude/altitude.