trouble when *fixing to UTM

Olly Betts olly@survex.com
Thu, 22 Mar 2001 15:24:54 +0000


In message <3AB9F8B2.7000106@dybal.eti.br>, Leandro Dybal Bertoni writes:
>This is the *fix:
>
>*fix \gps 216842 8633520 600
>
>When I took out the last digit of the northing, (863352) it got back to 
>normal.

The problem here is that cavern uses single precision floating point
internally, which typically gives about 7 digits of precision.  That means
that here you are only getting North/South positions to the nearest 10m at
best, which is probably your problem.  A simple workaround is to drop the
leading digits, which is actually common practice when dealing with UTM
coordinates in a particular area:

*fix gps 6842 3520 600 ; UTM (21)6842, (863)3520

I've been wondering for a while if we ought to use double precision instead,
since there are also issues with rounding errors building up in some odd
cases (this is the first real example I've seen).  The downside is increased
memory use, but that's only really an issue for really old DOS machines -
cavern's memory usage is very modest by today's standards.

A second issue is that the 3d format stores coordinates to the nearest cm
with a range of just over +/-20000 km.  UTM northings are in the range
0-10,000km and eastings in the range 160-834km so this shouldn't be a
problem.  In fact this coordinate range is enough to store the distance
around the earth's equator, so hopefully it's adequate for any coordinate
system in use on this planet.

Cheers,
Olly