sexagesimal

Rob Seaman seaman at noao.edu
Sat Sep 16 13:36:34 PDT 2006


Hi Roy,

> it takes hundreds of lines of code to understand something like 5h: 
> 23m,35d:12m:23".23 and all its tortured friends.

Well, yeah, but I don't see how your proposal is going to avoid the  
need for for translators when importing non-IVOA data.

> My suggestion is to say that the IVOA understands a sexagesimal  
> position if and only if it fits the definition as "six numbers  
> separated by non-numbers". It is a very simple defintion and yet  
> accepts almost all the formats that are used.

Surely what you're describing are two sexagesimal numbers?

> an IVOA sexagesimal position must consist of the numbers RAh, RAm,  
> RAs, Decd, Decm, Decs, and there can be arbitrary "non-number"  
> characters separating them.

Well, there's nothing about sexagesimal formats that implies the  
specification of equatorial - or even spherical - coordinates, just  
base-60.  Other than that, for reading a pair of coordinates, your  
heuristic is serviceable.

For writing sexigesimal numbers, there's no reason not to be more  
specific - IVOA can require colon separators and zero-filled, two  
digit fields.  (Omit leading zeros.)  The final field of any  
specification can be a floating point of whatever precision.  Not all  
sexigesimal values have three fields, many have two fields,  
hh:mm.mmm, for instance.  In IRAF, such a number is recognized as  
simply another floating point format.

Rob



More information about the dm mailing list