Re: [guide-user] RA & Dec info for New Uranometria
Bill J Gray Apr 19, 2006
Hi Mark,
The centers for new U2000 pages are in the file 'new_uran.dat', in
the 'atlases' folder of the first Guide CD. Each line contains a page
number, declination in decimal degrees, and an RA in hours and
minutes. There are 220 lines, corresponding to the 220 pages in the atlas.
Following is the C code used by Guide to figure out which 'new
U2000' page corresponds to a given RA/dec. I include it because the
comments about how the pages are laid out might be useful. Or perhaps
not... anyway, here it is.
-- Bill
/* 17 November 2003: first cut at code, after being prompted by
Mark Huss to finally get around to writing it at all. Compile
with '-DTEST_MAIN' to get a test executable. */
/*
0 1 +89.9 0 00 One polar zone
1 2 +79.0 0 00 Six four-hour zones
2 8 +68.0 0 00 Ten 2.4 hour zones
3 18 +57.0 0 00 Twelve two-hour zones
4 30 +46.0 0 00 Fifteen 1.6-hour zones
5 45 +35.0 0 00 Eighteen 1 1/3 hour zones
6 63 +23.5 0 00 Eighteen 1 1/3 hour zones
7 81 +11.5 0 00 Twenty 1.2 hour zones
8 101 0.0 0 00 Twenty 1.2 hour zones
9 121 -11.5 0 00 Twenty 1.2 hour zones
10 141 -23.5 0 00 Eighteen 1 1/3 hour zones
11 159 -35.0 0 00 Eighteen 1 1/3 hour zones
12 177 -46.0 0 00 Fifteen 1.6-hour zones
13 192 -57.0 0 00 Twelve two-hour zones
14 204 -68.0 0 00 Ten 2.4 hour zones
15 214 -79.0 0 00 Six four-hour zones
16 220 -89.9 0 00 One polar zone */
/* Given an RA in decimal hours and a dec in decimal degrees, the
following routine returns the number of the new Uranometria 2000
page that best shows that location. See 'new_uran.dat' for a
list of page centers. Basically, the sky is divided into sixteen
zones in declination, with each zone divided into one to twenty
pages (fewer pages closer to the poles, with the zones at the
celestial equator and just above and below rendered as twenty pages.)
Within a zone, pages start at RA=0, then work their way _west_
around the sky (hence the "24-ra" in this code.)
*/
int get_new_uranometria_page( const double ra, const double dec)
{
int zone_no = (int)( (90. - dec) * 16. / 180. + .5);
const char zone_splits[17] = { 1, 6, 10, 12, 15, 18, 18, 20, 20,
20, 18, 18, 15, 12, 10, 6, 1 };
int rval = (int)( (24. - ra) * (double)zone_splits[zone_no] / 24. + .5);
rval %= zone_splits[zone_no];
while( zone_no--)
rval += zone_splits[zone_no];
return( rval + 1);
}
#ifdef TEST_MAIN
#include <stdio.h>
#include <stdlib.h>
void main( int argc, char **argv)
{
printf( "New U2000 page = %d\n",
get_new_uranometria_page( atof( argv[1]), atof( argv[2])));
}
#endif