home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-27 | 49.9 KB | 1,600 lines |
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 6 (of 32)."
- # Contents: observe/mooncalc.c samples/ast1990.ell_e
- # starchart/Makefile starchart/startek.c starchart/staruplot.c
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'observe/mooncalc.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'observe/mooncalc.c'\"
- else
- echo shar: Extracting \"'observe/mooncalc.c'\" \(9697 characters\)
- sed "s/^X//" >'observe/mooncalc.c' <<'END_OF_FILE'
- X/*
- X * moonpos.c
- X * moon position calculations
- X *
- X * Copyright (c) 1990 by Craig Counterman. All rights reserved.
- X *
- X * This software may be redistributed freely, not sold.
- X * This copyright notice and disclaimer of warranty must remain
- X * unchanged.
- X *
- X * No representation is made about the suitability of this
- X * software for any purpose. It is provided "as is" without express or
- X * implied warranty, to the extent permitted by applicable law.
- X *
- X * DISCLAIMER OF WARRANTY
- X * ----------------------
- X * The author disclaims all warranties with regard to this software to
- X * the extent permitted by applicable law, including all implied
- X * warranties of merchantability and fitness. In no event shall the
- X * author be liable for any special, indirect or consequential damages or
- X * any damages whatsoever resulting from loss of use, data or profits,
- X * whether in an action of contract, negligence or other tortious action,
- X * arising out of or in connection with the use or performance of this
- X * software.
- X *
- X */
- X
- X
- X#ifndef lint
- Xstatic char rcsid[] =
- X "$Header: mooncalc.c,v 1.6 90/02/19 17:20:34 ccount Exp $";
- X#endif
- X
- X
- X#include <math.h>
- X#include "observe.h"
- X#include "degree.h"
- X
- Xvoid moon_pos(jd, sun_data, moon_data)
- X double jd;
- X sun_data_t sun_data;
- X moon_data_t *moon_data;
- X{
- X double T;
- X double L_prime, M, M_prime, delta, f, Omega, e;
- X double lambda, beta, moon_pi;
- X double tmp;
- X double venus_term;
- X double omega1, omega2;
- X double alpha; /* R.A. and dec.(delta above) both degrees */
- X double alpha2000, delta2000; /* R.A. and dec. both degrees equin 2000.0 */
- X double epsilon; /* obliquity */
- X
- X T = (jd - 2415020.0)/36525.0;
- X
- X /* Compute the mean values for the terms. */
- X L_prime = into_range(270.434164 + 481267.8831 * T
- X - 0.001133 * T*T + 0.0000019 * T*T*T);
- X M = into_range(358.475833 + 35999.0498 * T
- X - 0.000150 * T*T - 0.0000033 * T*T*T);
- X M_prime = into_range(296.104608 + 477198.8491 * T
- X + 0.009192 * T*T + 0.0000144 * T*T*T);
- X delta = into_range(350.737486 + 445267.1142 * T
- X - 0.001436 * T*T + 0.0000019 * T*T*T);
- X f = into_range(11.250889 + 483202.0251 * T
- X - 0.003211 * T*T - 0.0000003 * T*T*T);
- X Omega = into_range(259.183275 - 1934.1420 * T
- X + 0.002078 * T*T + 0.0000022 * T*T*T);
- X
- X /* Additive terms. */
- X tmp = DSIN(51.2 + 20.2 * T);
- X L_prime += 0.000233 * tmp;
- X M += -0.001778 * tmp;
- X M_prime += 0.000817 * tmp;
- X delta += 0.002011 * tmp;
- X
- X venus_term = 0.003964 * DSIN(346.560 + 132.870 * T - 0.0091731 * T*T );
- X L_prime += venus_term;
- X M_prime += venus_term;
- X delta += venus_term;
- X f += venus_term;
- X
- X tmp = DSIN(Omega);
- X L_prime += 0.001964 * tmp;
- X M_prime += 0.002541 * tmp;
- X delta += 0.001964 * tmp;
- X f += -0.024691 * tmp;
- X
- X f += -0.004328 * DSIN(Omega + 275.05 - 2.30 * T);
- X
- X e = 1 - 0.002495 * T - 0.00000752 * T*T;
- X
- X /* Bring these angles within 0 to 360 degrees. */
- X M = into_range(M);
- X M_prime = into_range(M_prime);
- X delta = into_range(delta);
- X f = into_range(f);
- X Omega = into_range(Omega);
- X
- X
- X /* Calculate lambda, the ecliptical longitude of the Moon's center. */
- X lambda = L_prime + 6.288750 * DSIN(M_prime)
- X + 1.274018 * DSIN(2*delta - M_prime)
- X + 0.658309 * DSIN(2*delta)
- X + 0.213616 * DSIN(2 * M_prime)
- X - e * 0.185596 * DSIN(M)
- X - 0.114336 * DSIN(2*f)
- X + 0.058793 * DSIN(2*delta - 2*M_prime)
- X + e * 0.057212 * DSIN(2*delta - M - M_prime)
- X + 0.053320 * DSIN(2*delta + M_prime)
- X + e * 0.045874 * DSIN(2*delta - M)
- X + e * 0.041024 * DSIN(M_prime - M)
- X - 0.034718 * DSIN(delta)
- X - e * 0.030465 * DSIN(M + M_prime)
- X + 0.015326 * DSIN(2*delta - 2*f)
- X - 0.012528 * DSIN(2*f + M_prime)
- X - 0.010980 * DSIN(2*f - M_prime)
- X + 0.010674 * DSIN(4*delta - M_prime)
- X + 0.010034 * DSIN(3*M_prime)
- X + 0.008548 * DSIN(4*delta - 2*M_prime);
- X lambda +=
- X - e * 0.007910 * DSIN(M - M_prime + 2*delta)
- X - e * 0.006783 * DSIN(2*delta + M)
- X + 0.005162 * DSIN(M_prime - delta)
- X + e * 0.005000 * DSIN(M + delta)
- X + e * 0.004049 * DSIN(M_prime - M + 2*delta)
- X + 0.003996 * DSIN(2*M_prime + 2*delta)
- X + 0.003862 * DSIN(4*delta)
- X + 0.003665 * DSIN(2*delta - 3*M_prime)
- X + e * 0.002695 * DSIN(2*M_prime - M)
- X + 0.002602 * DSIN(M_prime - 2*f - 2*delta)
- X + e * 0.002396 * DSIN(2*delta - M - 2*M_prime)
- X - 0.002349 * DSIN(M_prime + delta)
- X + e*e * 0.002249 * DSIN(2*delta - 2*M)
- X - e * 0.002125 * DSIN(2*M_prime + M)
- X - e*e * 0.002079 * DSIN(2*M)
- X + e*e * 0.002059 * DSIN(2*delta - M_prime - 2*M)
- X - 0.001773 * DSIN(M_prime + 2*delta - 2*f)
- X - 0.001595 * DSIN(2*f + 2*delta)
- X + e * 0.001220 * DSIN(4*delta - M - M_prime);
- X lambda +=
- X - 0.001110 * DSIN(2*M_prime + 2*f)
- X + 0.000892 * DSIN(M_prime - 3*delta)
- X - e * 0.000811 * DSIN(M + M_prime + 2*delta)
- X + e * 0.000761 * DSIN(4*delta - M - 2*M_prime)
- X + e*e * 0.000717 * DSIN(M_prime - 2*M)
- X + e*e * 0.000704 * DSIN(M_prime - 2*M -2*delta)
- X + e * 0.000693 * DSIN(M - 2*M_prime + 2*delta)
- X + e * 0.000598 * DSIN(2*delta - M - 2*f)
- X + 0.000550 * DSIN(M_prime + 4*delta)
- X + 0.000538 * DSIN(4*M_prime)
- X + e * 0.000521 * DSIN(4*delta - M)
- X + 0.000486 * DSIN(2*M_prime - delta);
- X lambda = into_range(lambda);
- X
- X /* Calculate beta, the ecliptical latitude of the Moon's center. */
- X beta = 5.128189 * DSIN(f)
- X + 0.280606 * DSIN(M_prime + f)
- X + 0.277693 * DSIN(M_prime - f)
- X + 0.173238 * DSIN(2*delta - f)
- X + 0.055413 * DSIN(2*delta + f - M_prime)
- X + 0.046272 * DSIN(2*delta - f - M_prime)
- X + 0.032573 * DSIN(2*delta + f)
- X + 0.017198 * DSIN(2*M_prime + f)
- X + 0.009267 * DSIN(2*delta + M_prime - f)
- X + 0.008823 * DSIN(2*M_prime - f)
- X + e * 0.008247 * DSIN(2*delta - M - f)
- X + 0.004323 * DSIN(2*delta - f - 2*M_prime)
- X + 0.004200 * DSIN(2*delta + f + M_prime)
- X + e * 0.003372 * DSIN(f - M - 2*delta)
- X + e * 0.002472 * DSIN(2*delta + f - M - M_prime)
- X + e * 0.002222 * DSIN(2*delta + f - M)
- X + e * 0.002072 * DSIN(2*delta - f - M - M_prime)
- X + e * 0.001877 * DSIN(f - M + M_prime)
- X + 0.001828 * DSIN(4*delta - f - M_prime);
- X beta +=
- X - e * 0.001803 * DSIN(f + M)
- X - 0.001750 * DSIN(3*f)
- X + e * 0.001570 * DSIN(M_prime - M - f)
- X - 0.001487 * DSIN(f + delta)
- X - e * 0.001481 * DSIN(f + M + M_prime)
- X + e * 0.001417 * DSIN(f - M - M_prime)
- X + e * 0.001350 * DSIN(f - M)
- X + 0.001330 * DSIN(f - delta)
- X + 0.001106 * DSIN(f + 3*M_prime)
- X + 0.001020 * DSIN(4*delta - f)
- X + 0.000833 * DSIN(f + 4*delta - M_prime)
- X + 0.000781 * DSIN(M_prime - 3*f)
- X + 0.000670 * DSIN(f + 4*delta - 2*M_prime)
- X + 0.000606 * DSIN(2*delta - 3*f)
- X + 0.000597 * DSIN(2*delta + 2*M_prime - f)
- X + e * 0.000492 * DSIN(2*delta + M_prime - M - f);
- X beta +=
- X 0.000450 * DSIN(2*M_prime - f - 2*delta)
- X + 0.000439 * DSIN(3*M_prime - f)
- X + 0.000423 * DSIN(f + 2*delta + 2*M_prime)
- X + 0.000422 * DSIN(2*delta - f - 3*M_prime)
- X - e * 0.000367 * DSIN(M + f + 2*delta - M_prime)
- X - e * 0.000353 * DSIN(M + f + 2*delta)
- X + 0.000331 * DSIN(f + 4*delta)
- X + e * 0.000317 * DSIN(2*delta + f - M + M_prime)
- X + e*e * 0.000306 * DSIN(2*delta - 2*M - f)
- X - 0.000283 * DSIN(M_prime + 3*f);
- X
- X omega1 = 0.0004664 * DCOS(Omega);
- X omega2 = 0.0000754 * DCOS(Omega + 275.05 - 2.30 * T);
- X
- X beta *= (1 - omega1 - omega2);
- X
- X moon_pi = .950724+.051818*DCOS(M_prime)+.009531*DCOS(2*delta-M_prime)
- X +.007843*DCOS(2*delta)+ .002824*DCOS(2*M_prime)
- X +.000857*DCOS(2*delta+M_prime)+e*.000533*DCOS(2*delta-M)
- X + e*.000401*DCOS(2*delta-M_prime-M)+e*.00032*DCOS(M_prime-M)
- X -.000271*DCOS(delta) -e*.000264*DCOS(M+M_prime)
- X -.000198*DCOS(2*f-M_prime);
- X
- X moon_pi += .000173*DCOS(3*M_prime)+.000167*DCOS(4*delta-M_prime)
- X -e*.000111*DCOS(M)+.000103*DCOS(4*delta-2*M_prime)
- X -.000084*DCOS(2*M_prime-2*delta)-e*.000083*DCOS(2*delta+M)
- X +.000079*DCOS(2*delta+2*M_prime)+.000072*DCOS(4*delta)+
- X e*.000064*DCOS(2*delta-M+M_prime)-e*.000063*DCOS(2*delta+M-M_prime)+
- X e*.000041*DCOS(M+delta);
- X
- X moon_pi += e*.000035*DCOS(2*M_prime-M)-.000033*DCOS(3*M_prime-2*delta)-
- X .00003*DCOS(M_prime+delta)-.000029*DCOS(2*(f-delta))
- X -e*.000029*DCOS(2*M_prime+M)+e*e*.000026*DCOS(2*(delta-M))
- X -.000023*DCOS(2*(f-delta)+M_prime)+ e*.000019*DCOS(4*delta-M-M_prime);
- X
- X moon_pi = into_range(moon_pi);
- X
- X
- X epsilon = obl_jd(jd);
- X
- X
- X moon_data->lambda = lambda;
- X moon_data->beta = beta;
- X moon_data->moon_pi = moon_pi;
- X
- X moon_data->Delta = 6378.14 / DSIN(moon_pi); /* in km */
- X moon_data->size = 2*(358482800.0 / moon_data->Delta);
- X alpha = RAD_TO_DEG * atan2(DSIN(lambda)*DCOS(epsilon)
- X - DTAN(beta) * DSIN(epsilon),
- X DCOS(lambda));
- X delta = RAD_TO_DEG * asin(DSIN(beta)*DCOS(epsilon)
- X + DCOS(beta)*DSIN(epsilon)*DSIN(lambda));
- X alpha = into_range(alpha);
- X moon_data->alpha = alpha;
- X moon_data->delta = delta;
- X precess(2000.0 - (2451545.0 - jd) / 365.25,
- X 2000.0, alpha, delta, &alpha2000, &delta2000);
- X moon_data->alpha2000 = alpha2000;
- X moon_data->delta2000 = delta2000;
- X
- X tmp = RAD_TO_DEG * acos(DCOS(lambda - sun_data.Theta) * DCOS(beta));
- X
- X moon_data->phase = 180 - tmp
- X - 0.1468 * DSIN(tmp) * (1 - 0.0549 * DSIN(M_prime))/(1 - DSIN(M));
- X moon_data->illum_frac = (1 + DCOS(moon_data->phase))/2.0;
- X
- X moon_data->chi = /* position angle of bright limb */
- X DATAN2(DCOS(sun_data.delta) * DSIN(sun_data.alpha - alpha),
- X DCOS(delta) * DSIN(sun_data.delta)
- X - DSIN(delta) * DCOS(sun_data.delta) * DCOS(sun_data.alpha - alpha));
- X
- X
- X moon_data->mag = -12.74 - 2.5 * log10(moon_data->illum_frac);
- X /* Doesn't allow for opposition surge */
- X}
- X
- END_OF_FILE
- if test 9697 -ne `wc -c <'observe/mooncalc.c'`; then
- echo shar: \"'observe/mooncalc.c'\" unpacked with wrong size!
- fi
- # end of 'observe/mooncalc.c'
- fi
- if test -f 'samples/ast1990.ell_e' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/ast1990.ell_e'\"
- else
- echo shar: Extracting \"'samples/ast1990.ell_e'\" \(8972 characters\)
- sed "s/^X//" >'samples/ast1990.ell_e' <<'END_OF_FILE'
- XFirst three lines are ignored. a = q/(1-e), n = 0.985609/(a*sqrt(a)),
- Xif M not given, use M = (Epoch_date - T) * n
- XName i Omega omega a n e M Month day year equinox_year body_type H G
- XCeres 10.607 80.702 71.274 2.7685 0.21396 0.0780 287.265 Oct 1 1989 2000.0 Asteroid 3.32 0.11
- XPallas 34.804 173.323 309.796 2.7703 0.21375 0.2347 273.779 Oct 1 1989 2000.0 Asteroid 4.13 0.15
- XJuno 12.991 170.542 246.787 2.6692 0.22601 0.2575 205.808 Nov 5 1990 2000.0 Asteroid 5.31 0.30
- XJuno89 12.993 170.556 246.744 2.6682 0.22614 0.2580 115.411 Oct 1 1989 2000.0 Asteroid 5.31 0.30
- XVesta 7.139 104.015 149.986 2.3607 0.27174 0.0906 152.190 Nov 5 1990 2000.0 Asteroid 3.16 0.34
- XVesta89 7.139 104.015 150.175 2.3613 0.27163 0.0906 43.314 Oct 1 1989 2000.0 Asteroid 3.16 0.34
- XHebe 14.781 139.033 238.480 2.4250 0.26100 0.2020 253.786 Nov 5 1990 2000.0 Asteroid 5.70 0.24
- XIris 5.513 260.100 144.725 2.3864 0.26735 0.2292 239.261 Nov 5 1990 2000.0 Asteroid 5.56 0.25
- XFlora 5.888 111.120 284.896 2.2016 0.30171 0.1561 296.988 Nov 5 1990 2000.0 Asteroid 6.48 0.33
- X
- XHygiea 3.840 283.833 315.832 3.1365 0.17743 0.1202 104.089 Nov 5 1990 2000.0 Asteroid 5.37 0.15
- XEgeria 16.521 43.422 81.324 2.5760 0.23838 0.0865 227.959 Nov 5 1990 2000.0 Asteroid 6.71 0.15
- XIrene 9.113 86.863 95.016 2.5858 0.23703 0.1665 223.034 Nov 5 1990 2000.0 Asteroid 6.27 0.09
- XIrene89 9.113 86.867 95.052 2.5867 0.23691 0.1661 128.194 Oct 1 1989 2000.0 Asteroid 6.27 0.09
- XPsyche 3.089 150.508 227.697 2.9229 0.19723 0.1333 37.474 Nov 5 1990 2000.0 Asteroid 5.98 0.22
- XPsyche89 3.089 150.508 227.581 2.9234 0.19718 0.1335 318.680 Oct 1 1989 2000.0 Asteroid 5.98 0.22
- XThetis 5.586 125.682 135.701 2.4693 0.25401 0.1367 183.654 Nov 5 1990 2000.0 Asteroid 7.77 0.13
- X
- XMelpomene 10.137 150.705 227.396 2.2950 0.28349 0.2185 200.804 Nov 5 1990 2000.0 Asteroid 6.41 0.17
- XFortuna 1.569 211.765 181.936 2.4420 0.25828 0.1580 31.086 Nov 5 1990 2000.0 Asteroid 7.09 0.10
- XMassalia 0.702 207.010 255.050 2.4088 0.26364 0.1439 257.393 Nov 5 1990 2000.0 Asteroid 6.52 0.26
- XKalliope 13.696 66.469 355.776 2.9112 0.19842 0.0977 291.742 Nov 5 1990 2000.0 Asteroid 6.49 0.22
- XThalia 10.154 67.351 59.156 2.6293 0.23118 0.2304 90.351 Nov 5 1990 2000.0 Asteroid 7.07 0.37
- X
- XThemis 0.763 36.020 110.713 3.1270 0.17824 0.1354 301.411 Nov 5 1990 2000.0 Asteroid 7.07 0.10
- XBellona 9.402 144.675 343.579 2.7785 0.21281 0.1487 219.410 Nov 5 1990 2000.0 Asteroid 7.17 0.22
- XAmphitrite 6.110 356.625 63.020 2.5546 0.24139 0.0715 294.249 Nov 5 1990 2000.0 Asteroid 5.84 0.21
- XPomona 5.528 220.692 338.832 2.5867 0.23691 0.0843 89.274 Nov 5 1990 2000.0 Asteroid 7.50 0.11
- X
- XFides 3.077 7.820 61.596 2.6403 0.22974 0.1781 115.917 Nov 5 1990 2000.0 Asteroid 7.28 0.25
- XLaetitia 10.368 157.417 208.197 2.7677 0.21405 0.1145 237.595 Nov 5 1990 2000.0 Asteroid 6.16 0.25
- XHarmonia 4.258 94.397 268.350 2.2672 0.28871 0.0466 346.473 Nov 5 1990 2000.0 Asteroid 7.14 0.31
- XDaphne 15.773 178.380 46.249 2.7621 0.21470 0.2747 60.955 Nov 5 1990 2000.0 Asteroid 7.34 0.15
- X
- XIsis 8.543 84.759 235.599 2.4400 0.25860 0.2254 38.183 Nov 5 1990 2000.0 Asteroid 7.50 0.25
- XNysa 3.704 131.675 342.213 2.4232 0.26129 0.1499 247.080 Nov 5 1990 2000.0 Asteroid 7.05 0.44
- XHestia 2.328 181.344 175.471 2.5249 0.24567 0.1711 37.915 Nov 5 1990 2000.0 Asteroid 8.38 0.11
- XNemausa 9.957 176.267 2.420 2.3660 0.27081 0.0659 159.062 Nov 5 1990 2000.0 Asteroid 7.36 0.06
- X
- XEuropa 7.439 129.275 337.304 3.1022 0.18038 0.1000 164.467 Nov 5 1990 2000.0 Asteroid 6.29 0.15
- XMnemosyne 15.209 199.456 216.053 3.1474 0.17651 0.1195 103.749 Nov 5 1990 2000.0 Asteroid 6.95 0.07
- X
- XEcho 3.595 192.126 269.704 2.3933 0.26619 0.1829 321.595 Nov 5 1990 2000.0 Asteroid 8.68 0.33
- XAngelina 1.311 309.907 179.604 2.6818 0.22442 0.1254 223.411 Nov 5 1990 2000.0 Asteroid 7.65 0.37
- XCybele 3.544 156.046 109.524 3.4353 0.15480 0.1043 82.254 Nov 5 1990 2000.0 Asteroid 6.79 0.15
- XAsia 6.010 203.079 105.135 2.4199 0.26182 0.1867 79.665 Nov 5 1990 2000.0 Asteroid 8.36 0.25
- X
- XLeto 7.964 44.534 304.234 2.7800 0.21263 0.1874 212.611 Nov 5 1990 2000.0 Asteroid 6.84 0.11
- XSappho 8.657 219.071 138.749 2.2957 0.28335 0.1996 31.567 Nov 5 1990 2000.0 Asteroid 8.10 0.30
- XAlkmene 2.837 25.929 110.166 2.7632 0.21458 0.2206 103.968 Nov 5 1990 2000.0 Asteroid 8.51 0.34
- X
- XBeatrix 4.974 27.890 166.485 2.4317 0.25992 0.0822 49.340 Nov 5 1990 2000.0 Asteroid 8.89 0.30
- XIo 11.960 203.564 122.381 2.6537 0.22800 0.1931 10.282 Nov 5 1990 2000.0 Asteroid 7.56 0.05
- XThisbe 5.220 277.047 35.107 2.7681 0.21400 0.1639 344.758 Nov 5 1990 2000.0 Asteroid 7.05 0.17
- XMinerva 8.569 4.625 273.731 2.7543 0.21562 0.1419 36.210 Nov 5 1990 2000.0 Asteroid 7.73 0.15
- X
- XAurora 8.014 3.193 52.095 3.1630 0.17521 0.0812 293.595 Nov 5 1990 2000.0 Asteroid 7.55 0.08
- XArethusa 12.927 243.747 151.534 3.0730 0.18296 0.1429 330.070 Nov 5 1990 2000.0 Asteroid 7.83 0.08
- XKlotho 11.758 160.189 267.835 2.6663 0.22638 0.2595 121.105 Nov 5 1990 2000.0 Asteroid 7.70 0.25
- XHera 5.420 136.379 189.616 2.7015 0.22198 0.0813 206.160 Nov 5 1990 2000.0 Asteroid 7.59 0.11
- X
- XFelicitas 7.887 3.514 56.444 2.6931 0.22301 0.2997 97.896 Nov 5 1990 2000.0 Asteroid 8.87 0.11
- XAmalthea 5.035 123.663 79.475 2.3753 0.26924 0.0882 216.302 Nov 5 1990 2000.0 Asteroid 8.63 0.26
- X
- XAlkeste 2.949 188.468 62.504 2.6290 0.23121 0.0782 330.227 Nov 5 1990 2000.0 Asteroid 8.13 0.31
- XAntigone 12.220 136.532 109.040 2.8669 0.20305 0.2133 351.635 Nov 5 1990 2000.0 Asteroid 7.05 0.37
- X
- XMeliboea 13.434 202.580 107.979 3.1119 0.17954 0.2232 334.659 Nov 5 1990 2000.0 Asteroid 8.04 0.10
- XLumen 11.914 319.126 56.794 2.6663 0.22638 0.2143 325.359 Nov 5 1990 2000.0 Asteroid 8.56 0.15
- X
- XVibilia 4.815 76.735 293.390 2.6540 0.22796 0.2342 159.105 Nov 5 1990 2000.0 Asteroid 7.87 0.08
- XProkne 18.520 159.680 163.008 2.6164 0.23289 0.2379 14.254 Nov 5 1990 2000.0 Asteroid 7.66 0.15
- X
- XPhilomela 7.260 72.750 217.649 3.1139 0.17936 0.0271 8.157 Nov 5 1990 2000.0 Asteroid 6.64 0.47
- XIsolda 3.875 264.210 175.456 3.0450 0.18549 0.1557 311.401 Nov 5 1990 2000.0 Asteroid 7.84 0.03
- X
- XGermania 5.507 271.334 73.629 3.0498 0.18506 0.1021 346.614 Nov 5 1990 2000.0 Asteroid 7.50 0.04
- XAnahita 2.365 254.835 79.907 2.1979 0.30248 0.1510 257.156 Nov 5 1990 2000.0 Asteroid 8.79 0.25
- XUnitas 7.265 142.125 166.815 2.3574 0.27231 0.1516 51.829 Nov 5 1990 2000.0 Asteroid 9.05 0.25
- X
- XBamberga 11.141 328.547 43.357 2.6818 0.22442 0.3405 279.446 Nov 5 1990 2000.0 Asteroid 6.82 0.10
- XTercidina 9.735 212.944 229.663 2.3255 0.27792 0.0613 196.462 Nov 5 1990 2000.0 Asteroid 8.75 0.15
- XDembowska 8.264 32.824 343.637 2.9246 0.19707 0.0901 257.577 Nov 5 1990 2000.0 Asteroid 5.98 0.32
- XElenora 18.429 140.729 5.535 2.7962 0.21079 0.1170 304.553 Nov 5 1990 2000.0 Asteroid 6.32 0.32
- X
- XCarlova 11.710 132.817 289.875 3.0014 0.18954 0.1774 5.169 Nov 5 1990 2000.0 Asteroid 8.41 0.15
- XSiegena 20.267 167.174 219.083 2.8970 0.19989 0.1685 347.219 Nov 5 1990 2000.0 Asteroid 7.42 0.23
- X
- XAquitania 18.075 128.585 156.275 2.7386 0.21748 0.2380 1.312 Nov 5 1990 2000.0 Asteroid 7.48 0.24
- X
- XVaticania 12.922 58.498 197.066 2.7871 0.21182 0.2213 80.917 Nov 5 1990 2000.0 Asteroid 7.87 0.26
- XPatientia 15.236 89.677 343.564 3.0611 0.18403 0.0709 342.677 Nov 5 1990 2000.0 Asteroid 6.65 0.20
- XPatientia89 15.236 89.678 343.267 3.0619 0.18396 0.0709 269.350 Oct 1 1989 2000.0 Asteroid 6.65 0.20
- X
- XPapagena 14.937 84.524 313.429 2.8914 0.20047 0.2289 319.325 Nov 5 1990 2000.0 Asteroid 6.61 0.29
- X
- XDavida 15.937 107.998 339.207 3.1728 0.17439 0.1783 314.054 Nov 5 1990 2000.0 Asteroid 6.17 0.02
- XAmherstia 12.959 329.434 257.457 2.6764 0.22510 0.2772 73.232 Nov 5 1990 2000.0 Asteroid 8.25 0.25
- XPauly 9.916 120.807 184.068 3.0616 0.18398 0.2386 16.168 Nov 5 1990 2000.0 Asteroid 8.79 0.15
- X
- XSemiramis 10.713 282.567 84.555 2.3731 0.26960 0.2350 153.196 Nov 5 1990 2000.0 Asteroid 8.74 0.34
- XMarianna 15.222 332.584 42.150 3.0913 0.18314 0.2425 337.178 Nov 5 1990 2000.0 Asteroid 8.41 0.31
- X
- XRachele 13.543 58.832 40.165 2.9210 0.19743 0.1960 96.665 Nov 5 1990 2000.0 Asteroid 7.43 0.25
- XPax 24.388 112.845 265.743 2.5870 0.23688 0.3111 326.717 Nov 5 1990 2000.0 Asteroid 9.01 0.15
- X
- XInteramnia 17.301 281.072 92.206 3.0631 0.18385 0.1471 350.196 Nov 5 1990 2000.0 Asteroid 6.00 0.02
- X
- X
- XAstraea 5.357 141.792 356.519 2.5741 0.23865 0.1917 227.749 Oct 1 1989 2000.0 Asteroid 6.91 0.25
- XMetis 5.585 69.112 5.315 2.3865 0.26733 0.1219 270.833 Oct 1 1989 2000.0 Asteroid 6.32 0.29
- XParthenope 4.621 125.703 193.711 2.4520 0.25669 0.0994 29.828 Oct 1 1989 2000.0 Asteroid 6.62 0.27
- XVictoria 8.376 235.863 68.720 2.3340 0.27642 0.2196 29.574 Oct 1 1989 2000.0 Asteroid 7.23 0.24
- XEunomia 11.765 293.619 97.591 2.6437 0.22929 0.1849 327.856 Oct 1 1989 2000.0 Asteroid 5.22 0.20
- XLachesis 6.968 341.696 237.604 3.1147 0.17930 0.0645 95.139 Oct 1 1989 2000.0 Asteroid 7.73 0.17
- XPalatia 8.134 127.553 296.023 2.7882 0.21170 0.3050 85.494 Oct 1 1989 2000.0 Asteroid 9.38 0.32
- X
- END_OF_FILE
- if test 8972 -ne `wc -c <'samples/ast1990.ell_e'`; then
- echo shar: \"'samples/ast1990.ell_e'\" unpacked with wrong size!
- fi
- # end of 'samples/ast1990.ell_e'
- fi
- if test -f 'starchart/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'starchart/Makefile'\"
- else
- echo shar: Extracting \"'starchart/Makefile'\" \(9487 characters\)
- sed "s/^X//" >'starchart/Makefile' <<'END_OF_FILE'
- X# Makefile for starchart programs
- X#
- X# $Header: Makefile,v 2.16 90/03/08 22:23:04 ccount Exp $
- X#
- X# Read the makefile before making. There are many things you may wish
- X# to customize.
- X#
- X#
- X# Copyright (c) 1990 by Craig Counterman. All rights reserved.
- X#
- X# This software may be redistributed freely, not sold.
- X# This copyright notice and disclaimer of warranty must remain
- X# unchanged.
- X#
- X# No representation is made about the suitability of this
- X# software for any purpose. It is provided "as is" without express or
- X# implied warranty, to the extent permitted by applicable law.
- X#
- X# DISCLAIMER OF WARRANTY
- X# ----------------------
- X# The author disclaims all warranties with regard to this software to
- X# the extent permitted by applicable law, including all implied
- X# warranties of merchantability and fitness. In no event shall the
- X# author be liable for any special, indirect or consequential damages or
- X# any damages whatsoever resulting from loss of use, data or profits,
- X# whether in an action of contract, negligence or other tortious action,
- X# arising out of or in connection with the use or performance of this
- X# software.
- X#
- X#
- X#list ONLY the programs you want to use at your site
- XTARGS= \
- X stardsp \
- X starpost \
- X startek \
- X staruplot \
- X starX11 \
- X starXaw \
- X starsunv \
- X starlaser
- X# starX10
- X# startool must be made specially, see below.
- X# Also consider "postconv.awk"
- X
- X#SITE DEPENDENCIES
- X#
- X# Uncomment out the version appropriate for your site.
- X# At present dependencies for sysV UNIX
- X#
- X#LOCAL=-DSYSV -Dindex=strchr
- X
- X
- X# FOR ALL
- X# define OLD_GREEK if you have the old yale.star file, with a
- X# slightly different greek encoding
- X# To produce programs which allow keyboard user interaction with the -u flag,
- X# see COBJ and starmain.o below.
- X# If you don't want to use the Guide Star Catalog, you can produce
- X# slightly smaller executable by defining NO_GSC
- X# FOR X11
- X# define USE_X_DASHES if your server can draw dashed lines
- X# define RELEASE3_FONTS if you want to use the X11R3 font names
- X# define X11R4 if you are using Release 4 (for the athena widgets).
- X# FOR POSTSCRIPT
- X# define USE_FINE_MACROS if you want to use finer macros than usual:
- X# star size varies with 1/10th magnitude increments
- X# Needs printer with lots of available memory, but produces
- X# smaller postscript files than using the "-a m" option to
- X# postscript.
- X#
- X#DEFINES= -DRELEASE3_FONTS -DUSE_X_DASHES -DUSE_FINE_MACROS
- XDEFINES= -DRELEASE3_FONTS -DUSE_X_DASHES
- X
- X#destination for 'make install', otherwise not important
- XBINDIR = "/usr/local"
- X
- X#XINCLUDES is for DECwindows UWS 2.0
- XXINCLUDES = -I/usr/include/mit
- X#XINCLUDES =
- X
- X#list ALL header files
- XHDRS=icon.h parse_input.h star3.h starXaw.h starXawDlog.h patchlevel.h
- X#list ALL source files, whether or not you use them
- XSRCS= interact.c parse_input.c readfile.c starX10.c starX11.c starXaw.c \
- X starXawDlog.c starXawHelp.c starXawMwin.c starcust.c \
- X stardsp.c starimages.c starlaser.c starm2.c starmain.c \
- X starpost.c starsample.c starsunv.c starsupp.c startek.c staruplot.c
- X
- X#list ALL object files which could be produced
- XOBJS= interact.o parse_input.o readfile.o starX10.o \
- X starX11.o starX11_aw.o starXaw.o starXawDlog.o \
- X starXawHelp.o starXawMwin.o starcust.o stardsp.o \
- X starimages.o starimages_a.o starlaser.o starm2.o starm2_i.o \
- X starmain.o starmain_i.o starpost.o starsunv.o starsupp.o \
- X startek.o staruplot.o
- X
- XSTARTOOL=startool.tt startool.icon startool.sh
- XSUPP=postconv.awk
- XVMSFILES=decwxtk.opt descrip.mms starchart_init.com vaxcrtl.opt
- XIBMFILES=pcstar.h Starchar.MSC staribm.c
- XATARIFILES=README.st makefile.st starst.c vqgdos.txt vqgdos.s
- XMACFILES=README.mac
- XFILES=Makefile README ${SRCS} ${HDRS} ${STARTOOL} ${SUPP} ${VMSFILES} \
- X ${IBMFILES} ${ATARIFILES} ${MACFILES}
- X
- XDISTDIR=../../dist/starchart
- X
- X#The following may be defined here to set default data file locations
- X# filename filetype description
- X# STARFILE STARFTYPE bright star data (yale)
- X# INDEXFILE INDEXFTYPE index to fainter stars (SAO)
- X# NEBFILE NEBFTYPE nebulae
- X# BOUNDFILE BOUNDFTYPE constellation boundaries
- X# PATTERNFILE PATTFTYPE constellation patterns
- X# CNAMEFILE CNAMEFTYPE constellation names
- X# PLANETFILE PLANETFTYPE planet positions
- X
- X# other files
- X# CONSTFILE constellation locations
- X# RCFILE resource file
- X
- X# Define as needed only
- X# Remember, there are defaults in the code
- X
- X# Example
- XFILEROOT=/space/ftp/astro/SAO
- XSTAR="${FILEROOT}/yale.star"
- XSTART=LINEREAD
- XINDEX="${FILEROOT}/index.indx"
- XINDEXT=INDEXTYPE
- X# only currently valid index file type
- XNEB="${FILEROOT}/neb.star"
- XNEBT=LINEREAD
- XBOUND="${FILEROOT}/boundaries.star"
- XBOUNDT=LINEREAD
- XPATT="${FILEROOT}/pattern.star"
- XPATTTY=LINEREAD
- XCNAME="${FILEROOT}/cnames.star"
- XCNAMET=LINEREAD
- XPLANET="./planet.star"
- X# Planets move, so make it local
- XPLANETTY=LINEREAD
- XCONS="${FILEROOT}/con.locs"
- XRC="./.starrc"
- X
- XFILEFLAGS= \
- X -DSTARFILE='$(STAR)' \
- X -DSTARFTYPE='$(START)' \
- X -DINDEXFILE='$(INDEX)' \
- X -DINDEXFTYPE='$(INDEXT)' \
- X -DNEBFILE='$(NEB)' \
- X -DNEBFTYPE='$(NEBT)' \
- X -DBOUNDFILE='$(BOUND)' \
- X -DBOUNDFTYPE='$(BOUNDT)' \
- X -DPATTERNFILE='$(PATT)' \
- X -DPATTFTYPE='$(PATTTY)' \
- X -DCNAMEFILE='$(CNAME)' \
- X -DCNAMEFTYPE='$(CNAMET)' \
- X -DPLANETFILE='$(PLANET)' \
- X -DPLANETFTYPE='$(PLANETTY)' \
- X -DCONSTFILE='$(CONS)' \
- X -DRCFILE='$(RC)'
- X
- X
- Xall: ${TARGS}
- X
- XCFLAGS= ${FILEFLAGS} ${LOCAL} ${DEFINES} -g
- XLDFLAGS = -g
- X
- X
- X#Include interact.o in COBJ to support keyboard user interaction
- X#COBJ=starmain.o starm2.o starsupp.o readfile.o parse_input.o
- XCOBJ=starmain.o starm2.o starsupp.o readfile.o parse_input.o interact.o
- XCOBJIM=${COBJ} starimages.o
- XCOBJIMA=${COBJ} starimages_a.o
- X
- Xstardsp: ${COBJ} stardsp.o starcust.o
- X $(CC) $(LDFLAGS) ${COBJ} stardsp.o starcust.o -lm -o $@
- X
- Xstarlaser: ${COBJIMA} starlaser.o starcust.o
- X $(CC) $(LDFLAGS) ${COBJIMA} starlaser.o starcust.o -lm -o $@
- X
- Xstarpost: $(COBJ) starpost.o starcust.o
- X $(CC) $(LDFLAGS) $(COBJ) starpost.o starcust.o -lm -o $@
- X
- Xstartek: ${COBJIMA} startek.o starcust.o
- X $(CC) $(LDFLAGS) ${COBJIMA} startek.o starcust.o -lm -o $@
- X
- Xstaruplot: ${COBJIMA} staruplot.o starcust.o
- X $(CC) $(LDFLAGS) ${COBJIMA} staruplot.o starcust.o -lm -lplot -o $@
- X
- XstarX10: ${COBJIMA} starX10.o starcust.o
- X $(CC) $(LDFLAGS) ${COBJIMA} starX10.o starcust.o -lm -lX -o $@
- X
- XstarX11: ${COBJIM} starX11.o starcust.o
- X $(CC) $(LDFLAGS) ${COBJIM} starX11.o starcust.o -lm -lX11 -o $@
- X
- XstarXaw: starmain_i.o starm2_i.o starsupp.o readfile.o starX11_aw.o \
- X starXaw.o starXawDlog.o starXawHelp.o starXawMwin.o\
- X starcust.o starimages.o parse_input.o
- X $(CC) $(LDFLAGS) starmain_i.o starm2_i.o starsupp.o readfile.o \
- X starXaw.o starXawDlog.o starXawHelp.o starXawMwin.o \
- X starX11_aw.o starcust.o starimages.o parse_input.o\
- X -lm -lXaw -lXmu -lXt -lX11 -o $@
- X
- Xstarsunv: starmain_i.o starm2_i.o starsupp.o readfile.o starsunv.o \
- X starcust.o starimages.o parse_input.o interact.o
- X $(CC) $(LDFLAGS) starmain_i.o starm2_i.o starsupp.o readfile.o \
- X starsunv.o starcust.o starimages.o parse_input.o interact.o \
- X -lm -lsuntool -lsunwindow -lpixrect -o $@
- X
- Xstartool: starsunv
- X echo "You must edit startool, startool.tt and startool.sh,"
- X echo " and install them"
- X echo "You must have the program tooltool,"
- X echo " which is available from sun PD archives"
- X echo "tooltool -f startool.tt" > startool
- X
- X# use -DINTERACTIVE_CONTROL in starmain.o and starm2.o
- X# to allow keyboard user interaction
- Xstarmain.o: starmain.c Makefile star3.h parse_input.h
- X $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starmain.c
- X
- Xstarm2.o: starm2.c Makefile star3.h
- X $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starm2.c
- X
- X
- X
- Xstarmain_i.o: starmain.c Makefile star3.h parse_input.h
- X -mv starmain.o starmain_n.o
- X $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starmain.c
- X mv starmain.o starmain_i.o
- X -mv starmain_n.o starmain.o
- X
- Xstarm2_i.o: starm2.c Makefile star3.h
- X -mv starm2.o starm2_n.o
- X $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starm2.c
- X mv starm2.o starm2_i.o
- X -mv starm2_n.o starm2.o
- X
- Xreadfile.o: readfile.c star3.h
- X
- Xstarimages.o: starimages.c star3.h
- X $(CC) $(CFLAGS) -c starimages.c
- X
- X#starimages_a.o defines area operations for drivers which otherwise don't
- X# support them
- Xstarimages_a.o: Makefile starimages.c star3.h
- X -mv starimages.o starimages_n.o
- X $(CC) $(CFLAGS) -DAREAS -c starimages.c
- X mv starimages.o starimages_a.o
- X -mv starimages_n.o starimages.o
- X
- XstarX11.o: starX11.c Makefile icon.h star3.h
- X $(CC) $(CFLAGS) $(XINCLUDES) -DSTARX11 -c starX11.c
- X
- XstarX11_aw.o: starX11.c Makefile icon.h star3.h
- X -mv starX11.o starX11_n.o
- X $(CC) $(CFLAGS) $(XINCLUDES) -DSTARXAW -c starX11.c
- X mv starX11.o starX11_aw.o
- X -mv starX11_n.o starX11.o
- X
- XstarXaw.o: starXaw.c star3.h starXaw.h icon.h
- X $(CC) $(CFLAGS) $(XINCLUDES) -c starXaw.c
- X
- XstarXawDlog.o: starXawDlog.c star3.h starXaw.h starXawDlog.h
- X $(CC) $(CFLAGS) $(XINCLUDES) -c starXawDlog.c
- X
- XstarXawHelp.o: starXawHelp.c star3.h starXaw.h
- X $(CC) $(CFLAGS) $(XINCLUDES) -c starXawHelp.c
- X
- XstarXawMwin.o: starXawMwin.c star3.h starXaw.h
- X $(CC) $(CFLAGS) $(XINCLUDES) -c starXawMwin.c
- X
- Xstarsunv.o: star3.h
- Xinteract.o: star3.h parse_input.h patchlevel.h
- Xparse_input.o: star3.h parse_input.h
- Xstarcust.o: star3.h
- Xstardsp.o: star3.h
- Xstarlaser.o: star3.h
- Xstarpost.o: star3.h
- Xstarsample.o: star3.h
- Xstarsupp.o: star3.h
- Xstartek.o: star3.h
- Xstaruplot.o: star3.h
- X
- Xinstall: all
- X strip $(TARGS)
- X mv $(TARGS) $(BINDIR)
- X
- Xdist:
- X cp ${FILES} ${DISTDIR}
- X
- Xclean:
- X rm -f ${OBJS} ${TARGS} a.out core
- END_OF_FILE
- echo shar: 1 control character may be missing from \"'starchart/Makefile'\"
- if test 9487 -ne `wc -c <'starchart/Makefile'`; then
- echo shar: \"'starchart/Makefile'\" unpacked with wrong size!
- fi
- # end of 'starchart/Makefile'
- fi
- if test -f 'starchart/startek.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'starchart/startek.c'\"
- else
- echo shar: Extracting \"'starchart/startek.c'\" \(9586 characters\)
- sed "s/^X//" >'starchart/startek.c' <<'END_OF_FILE'
- X/*
- X * Tektronix driver for startchart.c mainline
- X */
- X
- X/*
- X ! patched December, 1987 by Alan Paeth (awpaeth@watcgl)
- X !
- X ! [1] "bigmaster" chart layout now added
- X !
- X */
- X/*
- X ! Modified for 3.0 January 1989 by Craig Counterman
- X */
- X/*
- X *
- X * Copyright (c) 1990 by Craig Counterman. All rights reserved.
- X *
- X * This software may be redistributed freely, not sold.
- X * This copyright notice and disclaimer of warranty must remain
- X * unchanged.
- X *
- X * No representation is made about the suitability of this
- X * software for any purpose. It is provided "as is" without express or
- X * implied warranty, to the extent permitted by applicable law.
- X *
- X */
- X
- Xstatic char rcsid[]="$Header: startek.c,v 2.5 90/03/10 15:34:53 ccount Exp $";
- X
- X
- X#include <stdio.h>
- X#include <math.h>
- X
- X#include "star3.h"
- X
- X/*
- X * The following rational fractions are for Tek output on limited (and
- X * not 1024x768) bitmap devices, and attempt to cause graceful scaling of
- X * glyphs, by defining the distance between adjacent output pixels in terms
- X * of Tek coordinates. They should be fine-tuned for your Tektronix emulator.
- X * Additional tuning (for rounding considerations) must take place in the
- X * routine where the four values are referenced.
- X *
- X * Typical fractions are 5/8 (yields 640x480), 1/2, and 3/4
- X *
- X * For full resolution Tektronix devices (full 1024x768), all values are 1.
- X */
- X
- X#ifndef TEK
- X#define XSCALEI 1
- X#define XSCALEO 2
- X#define YSCALEI 1
- X#define YSCALEO 2
- X#else
- X#define XSCALEI 1
- X#define XSCALEO 1
- X#define YSCALEI 1
- X#define YSCALEO 1
- X#endif
- X
- X/* Externs */
- Xextern int g_argc;
- Xextern char **g_argv;
- X
- Xextern char *title; /* Title of page */
- X
- Xextern mapwindow *mapwin[MAXWINDOWS];
- Xextern int numwins;
- X
- X
- X
- Xextern int cur_function;
- Xextern int cur_map_type;
- Xextern int cur_map_tag;
- Xextern char *cur_tag_field;
- X
- X/* Scale multiplier, minimum,
- X mangitude change, maximum, for thumbnail,*/
- X#define THSMUL 1.2
- X#define THSMIN 12.0
- X#define THMADJ 2.5
- X#define THMMAX 5.0
- X
- X
- X/* Exports */
- X
- X/* The variables in the first few lines MUST be set by driver */
- Xmapwindow fullpage = {
- X 880, 700, 20, 65, /* width, height, x and y offsets */
- X 8.0, 2.0, 2.05, /* default limiting mags for glyph, name, label */
- X
- X/* The next several variables SHOULD be set by the driver,
- X but are only used by the driver */
- X FULLPAGEMAP, /* Type of map: THUMBNAIL may have
- X some restrictions */
- X 0, /* May be used by driver for whatever */
- X "String", /* May be used by driver for whatever */
- X
- X/* The next several variables may be set by the driver, but the main routines
- X may reset them (and the driver routines may then override that) */
- X SANSONS, /* Projection mode */
- X FALSE, FALSE, /* Draw grids */
- X 0.5, 5.0, /* grid step size */
- X 0.0, 0.0, /* grid origin */
- X
- X FALSE, /* Invert (flip north south) */
- X};
- X
- X/* The variables in the first few lines MUST be set by driver */
- Xmapwindow mainmap = {
- X 880, 500, 20, 265, /* width, height, x and y offsets */
- X 8.0, 2.0, 2.05, /* default limiting mags for glyph, name, label */
- X
- X/* The next several variables SHOULD be set by the driver,
- X but are only used by the driver */
- X MAINMAP, /* Type of map: THUMBNAIL may have
- X some restrictions */
- X 0, /* May be used by driver for whatever */
- X "String", /* May be used by driver for whatever */
- X
- X/* The next several variables may be set by the driver, but the main routines
- X may reset them (and the driver routines may then override that) */
- X SANSONS, /* Projection mode */
- X FALSE, FALSE, /* Draw grids */
- X 0.5, 5.0, /* grid step size */
- X 0.0, 0.0, /* grid origin */
- X
- X FALSE, /* Invert (flip north south) */
- X};
- X
- X
- X/* The variables in the first few lines MUST be set by driver */
- Xmapwindow thumbmap = {
- X 480, 195, 420, 35, /* width, height, x and y offsets */
- X 5.5+THMADJ, 1.0+THMADJ, 2.05+THMADJ,
- X /* default limiting mags for glyph, name, label */
- X
- X/* The next several variables SHOULD be set by the driver,
- X but are only used by the driver */
- X THUMBNAIL, /* Type of map: THUMBNAIL may have
- X some restrictions */
- X 0, /* May be used by driver for whatever */
- X "String", /* May be used by driver for whatever */
- X
- X/* The next several variables may be set by the driver, but the main routines
- X may reset them (and the driver routines may then override that) */
- X SANSONS, /* Projection mode */
- X FALSE, FALSE, /* Draw grids */
- X 0.5, 5.0, /* grid step size */
- X 0.0, 0.0, /* grid origin */
- X
- X FALSE, /* Invert (flip north south) */
- X};
- X
- X/* h & v tick text controls */
- Xint htick_lim = 2;
- Xint htext_lim = 80;
- Xint htext_xoff = 2;
- Xint htext_yoff = 17;
- Xint vtick_lim = 2;
- Xint vtext_lim = 20;
- Xint vtext_xoff = 24;
- Xint vtext_yoff = 0;
- X
- X/* externs for labels */
- Xint x_nameoffset = 10, y_nameoffset = 0;
- Xint x_lbloffset = 0, y_lbloffset = 10;
- Xint x_magoffset = 7, y_magoffset = -15;
- X
- X/* externs for legend: variables of positioning are here */
- Xint l_til=220;
- Xint l_stil=185;
- X
- Xint l_lmar1=40;
- Xint l_lmar2=65;
- Xint l_ltext=95;
- Xint l_rmar1=205;
- Xint l_rmar2=230;
- Xint l_rtext=260;
- X
- Xint l_line1=150;
- Xint l_line2=125;
- Xint l_line3=100;
- Xint l_line4=75;
- Xint l_line5=50;
- Xint l_line6=25;
- X
- X/* Point sizes for font calls */
- Xint titlesize=16;
- Xint subtlsize=12;
- Xint namesize=10;
- Xint lblsize=8;
- Xint magsize=8;
- X
- X/* Fonts for font calls */
- Xint namefnt=TIMESROMAN;
- Xint lblfnt=HELV;
- Xint magfnt=COURIER;
- Xint titlefnt=TIMESBOLD;
- Xint subtlfnt=TIMESROMAN;
- X
- X/* Scale multiplier, minimum,
- X mangitude change, maximum, for thumbnail,*/
- Xdouble th_smul=THSMUL;
- Xdouble th_smin=THSMIN;
- Xdouble th_madj=THMADJ;
- Xdouble th_mmax=THMMAX;
- X
- X
- X#define MAX(a,b) ((a)>(b)?(a):(b))
- X#define MIN(a,b) ((a)<(b)?(a):(b))
- X
- X
- X/* Device control argument */
- XD_control_arg(s)
- Xchar *s;
- X{
- X int i = 0;
- X int c;
- X
- X while (c = s[i++]) switch (c) {
- X default:
- X break;
- X }
- X}
- X
- X/* Open the device */
- XD_open()
- X{
- X tekclear();
- X
- X return TRUE ; /* open successful */
- X}
- X
- X/* Close the device */
- XD_close()
- X{
- X tekmove(0,0);
- X tekalpha();
- X fflush(stdout);
- X}
- X
- X
- X/* Move to (x, y) */
- XD_move(x, y)
- X int x, y;
- X{
- X tekmove(x, y);
- X}
- X
- X/* Draw a line of style line_style from the current point to (x, y) */
- X/* Note, this replaces vecdraw vecdrawdot and vecdrawhyph */
- XD_draw(x, y, line_style)
- X int x, y;
- X int line_style; /* SOLID, DOTTED, DASHED, etc. */
- X{
- X/* all styles are the same */
- X tekdraw(x, y);
- X}
- X/* This routine is encouraged to look at the extern cur_funtion
- X and change the line style drawn as desired */
- X
- X/* Move to (x1, y1) then draw a line of style line_style to (x2, y2) */
- XD_movedraw(x1, y1, x2, y2, line_style)
- X int x1, y1, x2, y2;
- X int line_style; /* SOLID, DOTTED, DASHED, etc. */
- X{
- X/* all styles are the same */
- X tekmove(x1, y1);
- X tekdraw(x2, y2);
- X fflush(stdout);
- X}
- X
- X
- X/* Set the color to be used for lines and text */
- X/* color_str is a 2 char (+ '\0') string
- X containing a specification for a color,
- X e.g. "G2" for the color of a star of spectral class G2, or "r7" for
- X red, level seven. The interpretation of the color string is left to
- X the device driver */
- XD_color(color_str)
- X char *color_str;
- X{
- X switch (color_str[0]) {
- X case 'O':
- X break;
- X case 'B':
- X break;
- X case 'A':
- X break;
- X case 'F':
- X break;
- X case 'G':
- X break;
- X case 'K':
- X break;
- X case 'M':
- X break;
- X case 'R':
- X case 'N':
- X case 'S':
- X break;
- X case ' ':
- X default:
- X break;
- X }
- X}
- X
- X/* Set the font and font size to be used for text. */
- X/* Note order of args */
- XD_fontsize(fsize, font)
- X int fsize; /* Size of font */
- X int font; /* e.g. TIMES, HELV, TIMES+ITALIC */
- X{
- X}
- X/* This routine is encouraged to look at the extern cur_funtion
- X and change the font used as desired */
- X
- X
- X/* Display text string str at x,y, in current font and font size.
- X if star_lbl is TRUE, string is a star label, use
- X greek characters (if possible) */
- XD_text(x, y, str, star_lbl)
- X int x, y;
- X char *str;
- X int star_lbl;
- X{
- X tekmove(x, y-11); /* center character strings */
- X tekalpha();
- X
- X if (star_lbl) {
- X /* remove leading spaces */
- X while (*str == ' ') str++;
- X /* can't display greek characters */
- X }
- X
- X printf(str);
- X}
- X
- X/* Return input coordinate in device coords where there are pointing devices */
- XD_inxy(x, y)
- X int *x, *y;
- X{
- X}
- X
- X/* Put non-displayed comment in output. Allowed in postscript, but
- X few other drivers will be able to support this. */
- XD_comment(str)
- X char *str;
- X{
- X/*
- X fprintf(stderr, "%s\n", str);
- X*/
- X}
- X
- X
- X/**
- XHigher level functions
- X**/
- X
- Xdrawlen(x, y, dx, dy, len)
- X int x, y, dx, dy, len;
- X{
- X D_movedraw((x*XSCALEI/XSCALEO+dx)*XSCALEO/XSCALEI,
- X (y*YSCALEI/YSCALEO+dy)*YSCALEO/YSCALEI,
- X (x*XSCALEI/XSCALEO+dx+len-1)*XSCALEO/XSCALEI+1,
- X (y*YSCALEI/YSCALEO+dy)*YSCALEO/YSCALEI, SOLID);
- X}
- X
- X
- X/*
- X * Low Level Tektronix Plotting Routines
- X */
- X
- X#define GS 035
- X#define US 037
- X#define ESC 033
- X#define FF 014
- X
- Xstatic int oldHiY = 0, oldLoY = 0, oldHiX = 0;
- X
- Xtekplot() /* switch to plot mode */
- X{
- X putchar(GS);
- X putchar('@');
- X oldHiY = oldLoY = oldHiX = 0;
- X}
- X
- Xtekalpha() /* switch to alpha mode */
- X{
- X putchar(US);
- X fflush(stdout);
- X}
- X
- Xtekclear()
- X{
- X putchar(ESC);
- X putchar(FF);
- X fflush(stdout);
- X}
- X
- Xtekmove(x, y) /* move to (x,y) */
- X int x, y;
- X{
- X putchar(GS);
- X tekdraw(x, y);
- X}
- X
- Xtekdraw(x, y) /* draw to (x,y) */
- X int x, y;
- X{
- X int hiY, loY, hiX, loX;
- X if (x < 0) x = 0;
- X if (y < 0) y = 0;
- X if (x > 1023) x = 1023;
- X if (y > 767) y = 767;
- X
- X hiY = 0040 | (y>>5 & 037),
- X loY = 0140 | (y & 037),
- X hiX = 0040 | (x>>5 & 037),
- X loX = 0100 | (x & 037);
- X
- X if (hiY != oldHiY) putchar(hiY);
- X if (loY != oldLoY || hiX != oldHiX) putchar(loY);
- X if (hiX != oldHiX) putchar(hiX);
- X putchar(loX);
- X
- X oldHiY = hiY;
- X oldLoY = loY;
- X oldHiX = hiX;
- X}
- END_OF_FILE
- if test 9586 -ne `wc -c <'starchart/startek.c'`; then
- echo shar: \"'starchart/startek.c'\" unpacked with wrong size!
- fi
- # end of 'starchart/startek.c'
- fi
- if test -f 'starchart/staruplot.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'starchart/staruplot.c'\"
- else
- echo shar: Extracting \"'starchart/staruplot.c'\" \(8607 characters\)
- sed "s/^X//" >'starchart/staruplot.c' <<'END_OF_FILE'
- X/*
- X * Plotter Display driver for starchart.c mainline (UNIX Plot(5) style output)
- X *
- X * Sjoerd Mullender <sjoerd@cs.vu.nl>
- X * Free University, Amsterdam
- X */
- X
- X/*
- X * Produced for starchart 3.0 by Craig Counterman Jan, 1989
- X *
- X * Copyright (c) 1990 by Craig Counterman. All rights reserved.
- X *
- X * This software may be redistributed freely, not sold.
- X * This copyright notice and disclaimer of warranty must remain
- X * unchanged.
- X *
- X * No representation is made about the suitability of this
- X * software for any purpose. It is provided "as is" without express or
- X * implied warranty, to the extent permitted by applicable law.
- X *
- X */
- X
- X
- Xstatic char rcsid[]="$Header: staruplot.c,v 2.2 90/02/19 17:57:49 ccount Exp $";
- X
- X#include <stdio.h>
- X#include <math.h>
- X#ifndef SYSV
- X#include <strings.h>
- X#else
- X#include <string.h>
- X#endif
- X
- X#include "star3.h"
- X
- X/* Externs */
- Xextern int g_argc;
- Xextern char **g_argv;
- X
- Xextern char *title; /* Title of page */
- X
- Xextern mapwindow *mapwin[MAXWINDOWS];
- Xextern int numwins;
- X
- Xextern int cur_function;
- Xextern int cur_map_type;
- Xextern int cur_map_tag;
- Xextern char *cur_tag_field;
- X
- X
- X
- X/* Scale multiplier, minimum,
- X mangitude change, maximum, for thumbnail,*/
- X#define THSMUL 1.2
- X#define THSMIN 12.0
- X#define THMADJ 2.5
- X#define THMMAX 5.0
- X
- X/* Exports */
- X
- X/* The variables in the first few lines MUST be set by driver */
- Xmapwindow fullpage = {
- X 880, 700, 20, 65, /* width, height, x and y offsets */
- X 5.9, 2.0, 2.05, /* default limiting mags for glyph, name, label */
- X
- X/* The next several variables SHOULD be set by the driver,
- X but are only used by the driver */
- X FULLPAGEMAP, /* Type of map: THUMBNAIL may have
- X some restrictions */
- X 0, /* May be used by driver for whatever */
- X "String", /* May be used by driver for whatever */
- X
- X/* The next several variables may be set by the driver, but the main routines
- X may reset them (and the driver routines may then override that) */
- X SANSONS, /* Projection mode */
- X FALSE, FALSE, /* Draw grids */
- X 0.5, 5.0, /* grid step size */
- X 0.0, 0.0, /* grid origin */
- X
- X FALSE, /* Invert (flip north south) */
- X};
- X
- X/* The variables in the first few lines MUST be set by driver */
- Xmapwindow mainmap = {
- X 880, 500, 20, 265, /* width, height, x and y offsets */
- X 5.9, 2.0, 2.05, /* default limiting mags for glyph, name, label */
- X
- X/* The next several variables SHOULD be set by the driver,
- X but are only used by the driver */
- X MAINMAP, /* Type of map: THUMBNAIL may have
- X some restrictions */
- X 0, /* May be used by driver for whatever */
- X "String", /* May be used by driver for whatever */
- X
- X/* The next several variables may be set by the driver, but the main routines
- X may reset them (and the driver routines may then override that) */
- X SANSONS, /* Projection mode */
- X FALSE, FALSE, /* Draw grids */
- X 0.5, 5.0, /* grid step size */
- X 0.0, 0.0, /* grid origin */
- X
- X FALSE, /* Invert (flip north south) */
- X};
- X
- X
- X/* The variables in the first few lines MUST be set by driver */
- Xmapwindow thumbmap = {
- X 480, 195, 420, 35, /* width, height, x and y offsets */
- X 3.0+THMADJ, 1.0+THMADJ, 2.05+THMADJ,
- X /* default limiting mags for glyph, name, label */
- X
- X/* The next several variables SHOULD be set by the driver,
- X but are only used by the driver */
- X THUMBNAIL, /* Type of map: THUMBNAIL may have
- X some restrictions */
- X 0, /* May be used by driver for whatever */
- X "String", /* May be used by driver for whatever */
- X
- X/* The next several variables may be set by the driver, but the main routines
- X may reset them (and the driver routines may then override that) */
- X SANSONS, /* Projection mode */
- X FALSE, FALSE, /* Draw grids */
- X 0.5, 5.0, /* grid step size */
- X 0.0, 0.0, /* grid origin */
- X
- X FALSE, /* Invert (flip north south) */
- X};
- X
- X/* h & v tick text controls */
- Xint htick_lim = 2;
- Xint htext_lim = 80;
- Xint htext_xoff = 2;
- Xint htext_yoff = 17;
- Xint vtick_lim = 2;
- Xint vtext_lim = 20;
- Xint vtext_xoff = 24;
- Xint vtext_yoff = 0;
- X
- X
- X/* externs for labels */
- Xint x_nameoffset = 10, y_nameoffset = 0;
- Xint x_lbloffset = 0, y_lbloffset = 10;
- Xint x_magoffset = 7, y_magoffset = -15;
- X
- X/* externs for legend: variables of positioning are here */
- Xint l_til=220;
- Xint l_stil=185;
- X
- Xint l_lmar1=40;
- Xint l_lmar2=65;
- Xint l_ltext=95;
- Xint l_rmar1=205;
- Xint l_rmar2=230;
- Xint l_rtext=260;
- X
- Xint l_line1=150;
- Xint l_line2=125;
- Xint l_line3=100;
- Xint l_line4=75;
- Xint l_line5=50;
- Xint l_line6=25;
- X
- X/* Point sizes for font calls */
- Xint titlesize=16;
- Xint subtlsize=12;
- Xint namesize=10;
- Xint lblsize=8;
- Xint magsize=8;
- X
- X/* Fonts for font calls */
- Xint namefnt=TIMESROMAN;
- Xint lblfnt=HELV;
- Xint magfnt=COURIER;
- Xint titlefnt=TIMESBOLD;
- Xint subtlfnt=TIMESROMAN;
- X
- X/* Scale multiplier, minimum,
- X mangitude change, maximum, for thumbnail,*/
- Xdouble th_smul=THSMUL;
- Xdouble th_smin=THSMIN;
- Xdouble th_madj=THMADJ;
- Xdouble th_mmax=THMMAX;
- X
- X#define MAX(a,b) ((a)>(b)?(a):(b))
- X#define MIN(a,b) ((a)<(b)?(a):(b))
- X
- X
- X/* Device control argument */
- XD_control_arg(s)
- Xchar *s;
- X{
- X int i = 0;
- X int c;
- X
- X while (c = s[i++]) switch (c) {
- X default:
- X break;
- X }
- X}
- X
- X/* Open the device */
- XD_open()
- X{
- X openpl();
- X space(0, 0, 1024, 1024);
- X erase();
- X
- X return TRUE ; /* open successful */
- X}
- X
- X
- X/* Close the device */
- XD_close()
- X{
- X closepl();
- X}
- X
- X
- X/* Move to (x, y) */
- XD_move(x, y)
- X int x, y;
- X{
- X move(x, y);
- X}
- X
- Xint cur_sty;
- X/* Draw a line of style line_style from the current point to (x, y) */
- X/* Note, this replaces vecdraw vecdrawdot and vecdrawhyph */
- XD_draw(x, y, line_style)
- X int x, y;
- X int line_style; /* SOLID, DOTTED, DASHED, etc. */
- X{
- X int sty;
- X
- X switch(cur_function) {
- X case CHRTOUTLN:
- X case CHRTHTICK:
- X case CHRTVTICK:
- X sty = SOLID;
- X break;
- X case GRID_RA:
- X case GRID_DEC:
- X sty = DOTTED;
- X break;
- X case ECLIPT:
- X sty = DOTTED;
- X break;
- X case CONSTBOUND:
- X sty = DASHED;
- X break;
- X case CONSTPATTRN:
- X sty = SOLID;
- X break;
- X case CONSTNAME:
- X case CHARTFILE:
- X default:
- X sty = line_style;
- X break;
- X }
- X
- X if (sty == cur_sty) { /* Continue current line, style */
- X cont(x,y);
- X } else { /* Change style */
- X switch(sty) {
- X case SOLID:
- X linemod("solid");
- X break;
- X case DOTTED:
- X linemod("dotted");
- X break;
- X case DASHED:
- X linemod("shortdashed");
- X break;
- X case VECSOLID:
- X linemod("solid");
- X break;
- X case VECDOT:
- X linemod("dotted");
- X break;
- X case VECDASH:
- X linemod("shortdashed");
- X break;
- X default:
- X linemod("solid");
- X break;
- X }
- X cur_sty = sty;
- X cont(x,y);
- X }
- X}
- X/* This routine is encouraged to look at the extern cur_funtion
- X and change the line style drawn as desired */
- X
- X
- X/* Move to (x1, y1) then draw a line of style line_style to (x2, y2) */
- XD_movedraw(x1, y1, x2, y2, line_style)
- X int x1, y1, x2, y2;
- X int line_style; /* SOLID, DOTTED, DASHED, etc. */
- X{
- X D_move(x1, y1);
- X D_draw(x2, y2, line_style);
- X}
- X
- X
- X/* Set the color to be used for lines and text */
- X/* color_str is a 2 char (+ '\0') string containing
- X a specification for a color,
- X e.g. "G2" for the color of a star of spectral class G2, or "r7" for
- X red, level seven. The interpretation of the color string is left to
- X the device driver */
- XD_color(color_str)
- X char *color_str;
- X{
- X switch (color_str[0]) {
- X case 'O':
- X break;
- X case 'B':
- X break;
- X case 'A':
- X break;
- X case 'F':
- X break;
- X case 'G':
- X break;
- X case 'K':
- X break;
- X case 'M':
- X break;
- X case 'R':
- X case 'N':
- X case 'S':
- X break;
- X case ' ':
- X default:
- X break;
- X }
- X}
- X
- X
- X/* Set the font and font size to be used for text. */
- X/* Note order of args */
- XD_fontsize(fsize, font)
- X int fsize; /* Size of font */
- X int font; /* e.g. TIMES, HELV, TIMES+ITALIC */
- X{
- X}
- X/* This routine is encouraged to look at the extern cur_funtion
- X and change the font used as desired */
- X
- X
- X/* Display text string str at x,y, in current font and font size.
- X if star_lbl is TRUE, string is a star label, use
- X greek characters (if possible) */
- XD_text(x, y, str, star_lbl)
- X int x, y;
- X char *str;
- X int star_lbl;
- X{
- X move(x, y);
- X if (star_lbl) {
- X /* remove leading spaces */
- X while (*str == ' ') str++;
- X /* can't display greek characters */
- X }
- X label(str);
- X}
- X
- X
- X/* Return input coordinate in device coords where there are pointing devices */
- XD_inxy(x, y)
- X int *x, *y;
- X{
- X}
- X
- X
- X/* Put non-displayed comment in output. Allowed in postscript, but
- X few other drivers will be able to support this. */
- XD_comment(str)
- X char *str;
- X{
- X/*
- X fprintf(stderr, "%s\n", str);
- X*/
- X}
- X
- X
- Xdrawlen(x, y, dx, dy, len)
- X int x, y, dx, dy, len;
- X{
- X D_movedraw(x+dx, y+dy,
- X x+dx+len,
- X y+dy, SOLID);
- X}
- X
- X
- X
- X
- X
- X
- END_OF_FILE
- if test 8607 -ne `wc -c <'starchart/staruplot.c'`; then
- echo shar: \"'starchart/staruplot.c'\" unpacked with wrong size!
- fi
- # end of 'starchart/staruplot.c'
- fi
- echo shar: End of archive 6 \(of 32\).
- cp /dev/null ark6isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 32 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
-
-