Complex literals (was Re: I am never going to complain about Python again)
Roy Smith
roy at panix.com
Wed Oct 16 08:21:33 EDT 2013
In article <l3l850$2aq$1 at dont-email.me>, John Nagle <nagle at animats.com>
wrote:
> Then upgrade to 3D. You can represent latitude and longitude
> as a 3-element unit vector. (GPS systems do this; latitude and
> longitude are only generated at the end, for output.)
And annoyingly so. Somebody I know was building a tracking system based
on a PIC chip and a Trimble GPS module. The danged thing would only
give him lat/long, which he then had to devote a sizable chunk of his
very limited CPU power to converting into some more useful coordinate
system. Internally, the GPS module was certainly working in something
more useful than lat/long, but didn't expose that.
I've done similar math when doing some molecular modeling. Atoms are
free to rotate in 3-space around the inter-atomic bonds. You don't want
to have to worry about dividing by zero just because some rotation angle
is 0 or 90 or some other magic number.
More information about the Python-list
mailing list