home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume11 / starchart / part06 < prev    next >
Text File  |  1990-03-15  |  51KB  |  1,608 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v11i034: starchart 3.2 Part 06/32
  3. from: ccount@ATHENA.MIT.EDU
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 11, Issue 34
  7. Submitted-by: ccount@ATHENA.MIT.EDU
  8. Archive-name: starchart/part06
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then unpack
  12. # it by saving it into a file and typing "sh file".  To overwrite existing
  13. # files, type "sh file -c".  You can also feed this as standard input via
  14. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  15. # will see the following message at the end:
  16. #        "End of archive 6 (of 32)."
  17. # Contents:  observe/mooncalc.c samples/ast1990.ell_e
  18. #   starchart/Makefile starchart/startek.c starchart/staruplot.c
  19. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  20. if test -f 'observe/mooncalc.c' -a "${1}" != "-c" ; then 
  21.   echo shar: Will not clobber existing file \"'observe/mooncalc.c'\"
  22. else
  23. echo shar: Extracting \"'observe/mooncalc.c'\" \(9697 characters\)
  24. sed "s/^X//" >'observe/mooncalc.c' <<'END_OF_FILE'
  25. X/*
  26. X * moonpos.c
  27. X * moon position calculations
  28. X *
  29. X * Copyright (c) 1990 by Craig Counterman. All rights reserved.
  30. X *
  31. X * This software may be redistributed freely, not sold.
  32. X * This copyright notice and disclaimer of warranty must remain
  33. X *    unchanged. 
  34. X *
  35. X * No representation is made about the suitability of this
  36. X * software for any purpose.  It is provided "as is" without express or
  37. X * implied warranty, to the extent permitted by applicable law.
  38. X *
  39. X * DISCLAIMER OF WARRANTY
  40. X * ----------------------
  41. X * The author  disclaims all warranties  with regard to  this software to
  42. X * the   extent  permitted  by applicable   law,  including all   implied
  43. X * warranties  of merchantability  and  fitness. In  no event shall   the
  44. X * author be liable for any special, indirect or consequential damages or
  45. X * any  damages whatsoever resulting from  loss of use, data or  profits,
  46. X * whether in an action of contract, negligence or other tortious action,
  47. X * arising  out of  or in connection with the  use or performance of this
  48. X * software.
  49. X *
  50. X */
  51. X
  52. X
  53. X#ifndef  lint
  54. Xstatic char rcsid[] =
  55. X  "$Header: mooncalc.c,v 1.6 90/02/19 17:20:34 ccount Exp $";
  56. X#endif
  57. X
  58. X
  59. X#include <math.h>
  60. X#include "observe.h"
  61. X#include "degree.h"
  62. X
  63. Xvoid moon_pos(jd, sun_data, moon_data)
  64. X     double jd;
  65. X     sun_data_t sun_data;
  66. X     moon_data_t *moon_data;
  67. X{
  68. X  double T;
  69. X  double L_prime, M, M_prime, delta, f, Omega, e;
  70. X  double lambda, beta, moon_pi;
  71. X  double tmp;
  72. X  double venus_term;
  73. X  double omega1, omega2;
  74. X  double alpha;            /* R.A. and dec.(delta above) both degrees */
  75. X  double alpha2000, delta2000;    /* R.A. and dec. both degrees equin 2000.0 */
  76. X  double epsilon;        /* obliquity */
  77. X
  78. X  T = (jd - 2415020.0)/36525.0;
  79. X
  80. X  /* Compute the mean values for the terms. */
  81. X  L_prime = into_range(270.434164 + 481267.8831 * T
  82. X               - 0.001133 * T*T + 0.0000019 * T*T*T);
  83. X  M = into_range(358.475833 + 35999.0498 * T
  84. X         - 0.000150 * T*T - 0.0000033 * T*T*T);
  85. X  M_prime = into_range(296.104608 + 477198.8491 * T
  86. X               + 0.009192 * T*T + 0.0000144 * T*T*T);
  87. X  delta = into_range(350.737486 + 445267.1142 * T
  88. X             - 0.001436 * T*T + 0.0000019 * T*T*T);
  89. X  f = into_range(11.250889 + 483202.0251 * T
  90. X         - 0.003211 * T*T - 0.0000003 * T*T*T);
  91. X  Omega = into_range(259.183275 - 1934.1420 * T
  92. X             + 0.002078 * T*T + 0.0000022 * T*T*T);
  93. X
  94. X  /* Additive terms. */
  95. X  tmp = DSIN(51.2 + 20.2 * T);
  96. X  L_prime += 0.000233 * tmp;
  97. X  M += -0.001778 * tmp;
  98. X  M_prime += 0.000817 * tmp;
  99. X  delta += 0.002011 * tmp;
  100. X
  101. X  venus_term = 0.003964 * DSIN(346.560 + 132.870 * T - 0.0091731 * T*T );
  102. X  L_prime += venus_term;
  103. X  M_prime += venus_term;
  104. X  delta += venus_term;
  105. X  f += venus_term;
  106. X
  107. X  tmp = DSIN(Omega);
  108. X  L_prime += 0.001964 * tmp;
  109. X  M_prime += 0.002541 * tmp;
  110. X  delta += 0.001964 * tmp;
  111. X  f += -0.024691 * tmp;
  112. X
  113. X  f += -0.004328 * DSIN(Omega + 275.05 - 2.30 * T);
  114. X
  115. X  e = 1 - 0.002495 * T - 0.00000752 * T*T;
  116. X
  117. X  /* Bring these angles within 0 to 360 degrees. */
  118. X  M = into_range(M);
  119. X  M_prime = into_range(M_prime);
  120. X  delta = into_range(delta);
  121. X  f = into_range(f);
  122. X  Omega = into_range(Omega);
  123. X
  124. X
  125. X  /* Calculate lambda, the ecliptical longitude of the Moon's center. */
  126. X  lambda = L_prime + 6.288750 * DSIN(M_prime)
  127. X    + 1.274018 * DSIN(2*delta - M_prime)
  128. X      + 0.658309 * DSIN(2*delta)
  129. X    + 0.213616 * DSIN(2 * M_prime)
  130. X      - e * 0.185596 * DSIN(M)
  131. X        - 0.114336 * DSIN(2*f)
  132. X          + 0.058793 * DSIN(2*delta - 2*M_prime)
  133. X        + e * 0.057212 * DSIN(2*delta - M - M_prime)
  134. X          + 0.053320 * DSIN(2*delta + M_prime)
  135. X            + e * 0.045874 * DSIN(2*delta - M)
  136. X              + e * 0.041024 * DSIN(M_prime - M)
  137. X            - 0.034718 * DSIN(delta)
  138. X              - e * 0.030465 * DSIN(M + M_prime)
  139. X                + 0.015326 * DSIN(2*delta - 2*f)
  140. X                  - 0.012528 * DSIN(2*f + M_prime)
  141. X                - 0.010980 * DSIN(2*f - M_prime)
  142. X                  + 0.010674 * DSIN(4*delta - M_prime)
  143. X                    + 0.010034 * DSIN(3*M_prime)
  144. X                      + 0.008548 * DSIN(4*delta - 2*M_prime);
  145. X  lambda +=
  146. X    - e * 0.007910 * DSIN(M - M_prime + 2*delta)
  147. X      - e * 0.006783 * DSIN(2*delta + M)
  148. X    + 0.005162 * DSIN(M_prime - delta)
  149. X      + e * 0.005000 * DSIN(M + delta)
  150. X        + e * 0.004049 * DSIN(M_prime - M + 2*delta)
  151. X          + 0.003996 * DSIN(2*M_prime + 2*delta)
  152. X        + 0.003862 * DSIN(4*delta)
  153. X          + 0.003665 * DSIN(2*delta - 3*M_prime)
  154. X            + e * 0.002695 * DSIN(2*M_prime - M)
  155. X              + 0.002602 * DSIN(M_prime - 2*f - 2*delta) 
  156. X            + e * 0.002396 * DSIN(2*delta - M - 2*M_prime)
  157. X              - 0.002349 * DSIN(M_prime + delta)
  158. X                + e*e * 0.002249 * DSIN(2*delta - 2*M)
  159. X                  - e * 0.002125 * DSIN(2*M_prime + M)
  160. X                - e*e * 0.002079 * DSIN(2*M)
  161. X                  + e*e * 0.002059 * DSIN(2*delta - M_prime - 2*M)
  162. X                    - 0.001773 * DSIN(M_prime + 2*delta - 2*f)
  163. X                      - 0.001595 * DSIN(2*f + 2*delta)
  164. X                    + e * 0.001220 * DSIN(4*delta - M - M_prime);
  165. X  lambda +=
  166. X    - 0.001110 * DSIN(2*M_prime + 2*f)
  167. X      + 0.000892 * DSIN(M_prime - 3*delta)
  168. X    - e * 0.000811 * DSIN(M + M_prime + 2*delta)
  169. X      + e * 0.000761 * DSIN(4*delta - M - 2*M_prime)
  170. X        + e*e * 0.000717 * DSIN(M_prime - 2*M)
  171. X          + e*e * 0.000704 * DSIN(M_prime - 2*M -2*delta)
  172. X        + e * 0.000693 * DSIN(M - 2*M_prime + 2*delta)
  173. X          + e * 0.000598 * DSIN(2*delta - M - 2*f)
  174. X            + 0.000550 * DSIN(M_prime + 4*delta)
  175. X              + 0.000538 * DSIN(4*M_prime)
  176. X            + e * 0.000521 * DSIN(4*delta - M)
  177. X              + 0.000486 * DSIN(2*M_prime - delta);
  178. X  lambda = into_range(lambda);
  179. X  
  180. X /* Calculate beta, the ecliptical latitude of the Moon's center. */
  181. X  beta = 5.128189 * DSIN(f)
  182. X    + 0.280606 * DSIN(M_prime + f)
  183. X      + 0.277693 * DSIN(M_prime - f)
  184. X    + 0.173238 * DSIN(2*delta - f)
  185. X      + 0.055413 * DSIN(2*delta + f - M_prime)
  186. X        + 0.046272 * DSIN(2*delta - f - M_prime)
  187. X          + 0.032573 * DSIN(2*delta + f)
  188. X        + 0.017198 * DSIN(2*M_prime + f)
  189. X          + 0.009267 * DSIN(2*delta + M_prime - f)
  190. X            + 0.008823 * DSIN(2*M_prime - f)
  191. X              + e * 0.008247 * DSIN(2*delta - M - f)
  192. X            + 0.004323 * DSIN(2*delta - f - 2*M_prime)
  193. X              + 0.004200 * DSIN(2*delta + f + M_prime)
  194. X                + e * 0.003372 * DSIN(f - M - 2*delta)
  195. X                  + e * 0.002472 * DSIN(2*delta + f - M - M_prime)
  196. X                + e * 0.002222 * DSIN(2*delta + f - M)
  197. X                  + e * 0.002072 * DSIN(2*delta - f - M - M_prime)
  198. X                    + e * 0.001877 * DSIN(f - M + M_prime)
  199. X                      + 0.001828 * DSIN(4*delta - f - M_prime);
  200. X  beta +=
  201. X    - e * 0.001803 * DSIN(f + M)
  202. X      - 0.001750 * DSIN(3*f)
  203. X    + e * 0.001570 * DSIN(M_prime - M - f)
  204. X      - 0.001487 * DSIN(f + delta)
  205. X        - e * 0.001481 * DSIN(f + M + M_prime)
  206. X          + e * 0.001417 * DSIN(f - M - M_prime)
  207. X        + e * 0.001350 * DSIN(f - M)
  208. X          + 0.001330 * DSIN(f - delta)
  209. X            + 0.001106 * DSIN(f + 3*M_prime)
  210. X              + 0.001020 * DSIN(4*delta - f)
  211. X            + 0.000833 * DSIN(f + 4*delta - M_prime)
  212. X              + 0.000781 * DSIN(M_prime - 3*f)
  213. X                + 0.000670 * DSIN(f + 4*delta - 2*M_prime)
  214. X                  + 0.000606 * DSIN(2*delta - 3*f)
  215. X                + 0.000597 * DSIN(2*delta + 2*M_prime - f)
  216. X                  + e * 0.000492 * DSIN(2*delta + M_prime - M - f);
  217. X  beta +=
  218. X    0.000450 * DSIN(2*M_prime - f - 2*delta)
  219. X      + 0.000439 * DSIN(3*M_prime - f)
  220. X    + 0.000423 * DSIN(f + 2*delta + 2*M_prime)
  221. X      + 0.000422 * DSIN(2*delta - f - 3*M_prime)
  222. X        - e * 0.000367 * DSIN(M + f + 2*delta - M_prime)
  223. X          - e * 0.000353 * DSIN(M + f + 2*delta)
  224. X        + 0.000331 * DSIN(f + 4*delta)
  225. X          + e * 0.000317 * DSIN(2*delta + f - M + M_prime)
  226. X            + e*e * 0.000306 * DSIN(2*delta - 2*M - f)
  227. X              - 0.000283 * DSIN(M_prime + 3*f);
  228. X  
  229. X  omega1 = 0.0004664 * DCOS(Omega);
  230. X  omega2 = 0.0000754 * DCOS(Omega + 275.05 - 2.30 * T);
  231. X  
  232. X  beta *= (1 - omega1 - omega2);
  233. X  
  234. X  moon_pi = .950724+.051818*DCOS(M_prime)+.009531*DCOS(2*delta-M_prime)
  235. X    +.007843*DCOS(2*delta)+ .002824*DCOS(2*M_prime)
  236. X      +.000857*DCOS(2*delta+M_prime)+e*.000533*DCOS(2*delta-M)
  237. X    + e*.000401*DCOS(2*delta-M_prime-M)+e*.00032*DCOS(M_prime-M)
  238. X      -.000271*DCOS(delta) -e*.000264*DCOS(M+M_prime)
  239. X        -.000198*DCOS(2*f-M_prime);
  240. X
  241. X  moon_pi += .000173*DCOS(3*M_prime)+.000167*DCOS(4*delta-M_prime)
  242. X    -e*.000111*DCOS(M)+.000103*DCOS(4*delta-2*M_prime)
  243. X      -.000084*DCOS(2*M_prime-2*delta)-e*.000083*DCOS(2*delta+M)
  244. X    +.000079*DCOS(2*delta+2*M_prime)+.000072*DCOS(4*delta)+
  245. X      e*.000064*DCOS(2*delta-M+M_prime)-e*.000063*DCOS(2*delta+M-M_prime)+
  246. X        e*.000041*DCOS(M+delta);
  247. X
  248. X  moon_pi += e*.000035*DCOS(2*M_prime-M)-.000033*DCOS(3*M_prime-2*delta)-
  249. X    .00003*DCOS(M_prime+delta)-.000029*DCOS(2*(f-delta))
  250. X      -e*.000029*DCOS(2*M_prime+M)+e*e*.000026*DCOS(2*(delta-M))
  251. X    -.000023*DCOS(2*(f-delta)+M_prime)+ e*.000019*DCOS(4*delta-M-M_prime);
  252. X
  253. X  moon_pi = into_range(moon_pi);
  254. X
  255. X
  256. X  epsilon = obl_jd(jd);
  257. X
  258. X
  259. X  moon_data->lambda = lambda;
  260. X  moon_data->beta = beta;
  261. X  moon_data->moon_pi = moon_pi;
  262. X
  263. X  moon_data->Delta = 6378.14 / DSIN(moon_pi); /* in km */
  264. X  moon_data->size = 2*(358482800.0 / moon_data->Delta);
  265. X  alpha = RAD_TO_DEG * atan2(DSIN(lambda)*DCOS(epsilon)
  266. X                 - DTAN(beta) * DSIN(epsilon),
  267. X                 DCOS(lambda));
  268. X  delta = RAD_TO_DEG * asin(DSIN(beta)*DCOS(epsilon)
  269. X                + DCOS(beta)*DSIN(epsilon)*DSIN(lambda));
  270. X  alpha = into_range(alpha);
  271. X  moon_data->alpha = alpha;
  272. X  moon_data->delta = delta;
  273. X  precess(2000.0 - (2451545.0 - jd) / 365.25,
  274. X      2000.0, alpha, delta, &alpha2000, &delta2000);
  275. X  moon_data->alpha2000 = alpha2000;
  276. X  moon_data->delta2000 = delta2000;
  277. X
  278. X  tmp = RAD_TO_DEG * acos(DCOS(lambda - sun_data.Theta) * DCOS(beta));
  279. X  
  280. X  moon_data->phase = 180 - tmp
  281. X    - 0.1468 * DSIN(tmp) * (1 - 0.0549 * DSIN(M_prime))/(1 - DSIN(M));
  282. X  moon_data->illum_frac = (1 + DCOS(moon_data->phase))/2.0;
  283. X
  284. X  moon_data->chi = /* position angle of bright limb */
  285. X    DATAN2(DCOS(sun_data.delta) * DSIN(sun_data.alpha - alpha),
  286. X      DCOS(delta) * DSIN(sun_data.delta)
  287. X      - DSIN(delta) * DCOS(sun_data.delta) * DCOS(sun_data.alpha - alpha));
  288. X
  289. X
  290. X  moon_data->mag = -12.74 - 2.5 * log10(moon_data->illum_frac);
  291. X  /* Doesn't allow for opposition surge */
  292. X}
  293. X
  294. END_OF_FILE
  295. if test 9697 -ne `wc -c <'observe/mooncalc.c'`; then
  296.     echo shar: \"'observe/mooncalc.c'\" unpacked with wrong size!
  297. fi
  298. # end of 'observe/mooncalc.c'
  299. fi
  300. if test -f 'samples/ast1990.ell_e' -a "${1}" != "-c" ; then 
  301.   echo shar: Will not clobber existing file \"'samples/ast1990.ell_e'\"
  302. else
  303. echo shar: Extracting \"'samples/ast1990.ell_e'\" \(8972 characters\)
  304. sed "s/^X//" >'samples/ast1990.ell_e' <<'END_OF_FILE'
  305. XFirst three lines are ignored.   a = q/(1-e), n = 0.985609/(a*sqrt(a)),
  306. Xif M not given, use M = (Epoch_date - T) * n
  307. XName i Omega omega a n e M Month day year equinox_year body_type H G
  308. 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
  309. 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
  310. 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
  311. 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
  312. 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
  313. 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
  314. 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
  315. 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
  316. 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
  317. X
  318. 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
  319. 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
  320. 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
  321. 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
  322. 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
  323. 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
  324. 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
  325. X
  326. 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
  327. 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
  328. 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
  329. 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
  330. 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
  331. X
  332. 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
  333. 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
  334. 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
  335. 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
  336. X
  337. 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
  338. 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
  339. 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
  340. 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
  341. X
  342. 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
  343. 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
  344. 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
  345. 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
  346. X
  347. 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
  348. 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
  349. X
  350. 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
  351. 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
  352. 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
  353. 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
  354. X
  355. 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
  356. 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
  357. 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
  358. X
  359. 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
  360. 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
  361. 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
  362. 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
  363. X
  364. 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
  365. 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
  366. 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
  367. 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
  368. X
  369. 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
  370. 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
  371. X
  372. 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
  373. 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
  374. X
  375. 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
  376. 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
  377. X
  378. 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
  379. 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
  380. X
  381. 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
  382. 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
  383. X
  384. 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
  385. 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
  386. 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
  387. X
  388. 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
  389. 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
  390. 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
  391. 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
  392. X
  393. 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
  394. 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
  395. X
  396. 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
  397. X
  398. 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
  399. 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
  400. 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
  401. X
  402. 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
  403. X
  404. 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
  405. 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
  406. 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
  407. X
  408. 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
  409. 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
  410. X
  411. 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
  412. 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
  413. X
  414. 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
  415. X
  416. X
  417. 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
  418. 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
  419. 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
  420. 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
  421. 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
  422. 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
  423. 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
  424. X
  425. END_OF_FILE
  426. if test 8972 -ne `wc -c <'samples/ast1990.ell_e'`; then
  427.     echo shar: \"'samples/ast1990.ell_e'\" unpacked with wrong size!
  428. fi
  429. # end of 'samples/ast1990.ell_e'
  430. fi
  431. if test -f 'starchart/Makefile' -a "${1}" != "-c" ; then 
  432.   echo shar: Will not clobber existing file \"'starchart/Makefile'\"
  433. else
  434. echo shar: Extracting \"'starchart/Makefile'\" \(9487 characters\)
  435. sed "s/^X//" >'starchart/Makefile' <<'END_OF_FILE'
  436. X#    Makefile for starchart programs
  437. X#
  438. X#    $Header: Makefile,v 2.16 90/03/08 22:23:04 ccount Exp $
  439. X#
  440. X# Read the makefile before making.  There are many things you may wish
  441. X# to customize.
  442. X#
  443. X#
  444. X# Copyright (c) 1990 by Craig Counterman. All rights reserved.
  445. X#
  446. X# This software may be redistributed freely, not sold.
  447. X# This copyright notice and disclaimer of warranty must remain
  448. X#    unchanged. 
  449. X#
  450. X# No representation is made about the suitability of this
  451. X# software for any purpose.  It is provided "as is" without express or
  452. X# implied warranty, to the extent permitted by applicable law.
  453. X#
  454. X# DISCLAIMER OF WARRANTY
  455. X# ----------------------
  456. X# The author  disclaims all warranties  with regard to  this software to
  457. X# the   extent  permitted  by applicable   law,  including all   implied
  458. X# warranties  of merchantability  and  fitness. In  no event shall   the
  459. X# author be liable for any special, indirect or consequential damages or
  460. X# any  damages whatsoever resulting from  loss of use, data or  profits,
  461. X# whether in an action of contract, negligence or other tortious action,
  462. X# arising  out of  or in connection with the  use or performance of this
  463. X# software.
  464. X#
  465. X#
  466. X#list ONLY the programs you want to use at your site
  467. XTARGS= \
  468. X    stardsp \
  469. X    starpost \
  470. X    startek \
  471. X    staruplot \
  472. X    starX11 \
  473. X    starXaw \
  474. X    starsunv \
  475. X    starlaser 
  476. X#    starX10 
  477. X# startool must be made specially, see below.
  478. X# Also consider "postconv.awk"
  479. X
  480. X#SITE DEPENDENCIES
  481. X#
  482. X# Uncomment out the version appropriate for your site.
  483. X# At present dependencies for sysV UNIX
  484. X#
  485. X#LOCAL=-DSYSV -Dindex=strchr
  486. X
  487. X
  488. X# FOR ALL
  489. X# define OLD_GREEK if you have the old yale.star file, with a
  490. X#                slightly different greek encoding
  491. X# To produce programs which allow keyboard user interaction with the -u flag, 
  492. X#    see COBJ and starmain.o below.
  493. X# If you don't want to use the Guide Star Catalog, you can produce
  494. X#    slightly smaller executable by defining NO_GSC
  495. X# FOR X11
  496. X# define USE_X_DASHES if your server can draw dashed lines
  497. X# define RELEASE3_FONTS if you want to use the X11R3 font names
  498. X# define X11R4 if you are using Release 4  (for the athena widgets).
  499. X# FOR POSTSCRIPT
  500. X# define USE_FINE_MACROS if you want to use finer macros than usual:
  501. X#     star size varies with 1/10th magnitude increments
  502. X#        Needs printer with lots of available memory, but produces
  503. X#        smaller postscript files than using the "-a m" option to
  504. X#        postscript.
  505. X#
  506. X#DEFINES= -DRELEASE3_FONTS -DUSE_X_DASHES -DUSE_FINE_MACROS
  507. XDEFINES= -DRELEASE3_FONTS -DUSE_X_DASHES
  508. X
  509. X#destination for 'make install', otherwise not important
  510. XBINDIR = "/usr/local"
  511. X
  512. X#XINCLUDES is for DECwindows UWS 2.0
  513. XXINCLUDES = -I/usr/include/mit
  514. X#XINCLUDES =
  515. X
  516. X#list ALL header files
  517. XHDRS=icon.h parse_input.h star3.h starXaw.h starXawDlog.h patchlevel.h
  518. X#list ALL source files, whether or not you use them
  519. XSRCS= interact.c parse_input.c readfile.c starX10.c starX11.c starXaw.c \
  520. X    starXawDlog.c starXawHelp.c starXawMwin.c starcust.c \
  521. X    stardsp.c starimages.c starlaser.c starm2.c starmain.c \
  522. X    starpost.c starsample.c starsunv.c starsupp.c startek.c staruplot.c
  523. X
  524. X#list ALL object files which could be produced
  525. XOBJS= interact.o parse_input.o readfile.o starX10.o \
  526. X    starX11.o starX11_aw.o starXaw.o starXawDlog.o \
  527. X    starXawHelp.o starXawMwin.o starcust.o stardsp.o \
  528. X    starimages.o starimages_a.o starlaser.o starm2.o starm2_i.o \
  529. X    starmain.o starmain_i.o starpost.o starsunv.o starsupp.o \
  530. X    startek.o staruplot.o
  531. X
  532. XSTARTOOL=startool.tt startool.icon startool.sh
  533. XSUPP=postconv.awk
  534. XVMSFILES=decwxtk.opt descrip.mms starchart_init.com vaxcrtl.opt
  535. XIBMFILES=pcstar.h Starchar.MSC staribm.c
  536. XATARIFILES=README.st makefile.st starst.c vqgdos.txt vqgdos.s
  537. XMACFILES=README.mac
  538. XFILES=Makefile README ${SRCS} ${HDRS} ${STARTOOL} ${SUPP} ${VMSFILES} \
  539. X    ${IBMFILES} ${ATARIFILES} ${MACFILES}
  540. X
  541. XDISTDIR=../../dist/starchart
  542. X
  543. X#The following may be defined here to set default data file locations
  544. X# filename    filetype    description
  545. X# STARFILE    STARFTYPE    bright star data (yale)
  546. X# INDEXFILE    INDEXFTYPE    index to fainter stars (SAO)
  547. X# NEBFILE    NEBFTYPE    nebulae
  548. X# BOUNDFILE    BOUNDFTYPE    constellation boundaries
  549. X# PATTERNFILE    PATTFTYPE    constellation patterns
  550. X# CNAMEFILE    CNAMEFTYPE    constellation names
  551. X# PLANETFILE    PLANETFTYPE    planet positions
  552. X
  553. X# other files
  554. X# CONSTFILE    constellation locations
  555. X# RCFILE    resource file
  556. X
  557. X# Define as needed only
  558. X# Remember, there are defaults in the code
  559. X
  560. X# Example
  561. XFILEROOT=/space/ftp/astro/SAO
  562. XSTAR="${FILEROOT}/yale.star"
  563. XSTART=LINEREAD
  564. XINDEX="${FILEROOT}/index.indx"
  565. XINDEXT=INDEXTYPE
  566. X# only currently valid index file type
  567. XNEB="${FILEROOT}/neb.star"
  568. XNEBT=LINEREAD
  569. XBOUND="${FILEROOT}/boundaries.star"
  570. XBOUNDT=LINEREAD
  571. XPATT="${FILEROOT}/pattern.star"
  572. XPATTTY=LINEREAD
  573. XCNAME="${FILEROOT}/cnames.star"
  574. XCNAMET=LINEREAD
  575. XPLANET="./planet.star"
  576. X# Planets move, so make it local
  577. XPLANETTY=LINEREAD
  578. XCONS="${FILEROOT}/con.locs"
  579. XRC="./.starrc"
  580. X
  581. XFILEFLAGS= \
  582. X        -DSTARFILE='$(STAR)' \
  583. X        -DSTARFTYPE='$(START)' \
  584. X        -DINDEXFILE='$(INDEX)' \
  585. X        -DINDEXFTYPE='$(INDEXT)' \
  586. X        -DNEBFILE='$(NEB)' \
  587. X        -DNEBFTYPE='$(NEBT)' \
  588. X        -DBOUNDFILE='$(BOUND)' \
  589. X        -DBOUNDFTYPE='$(BOUNDT)' \
  590. X        -DPATTERNFILE='$(PATT)' \
  591. X        -DPATTFTYPE='$(PATTTY)' \
  592. X        -DCNAMEFILE='$(CNAME)' \
  593. X        -DCNAMEFTYPE='$(CNAMET)' \
  594. X        -DPLANETFILE='$(PLANET)' \
  595. X        -DPLANETFTYPE='$(PLANETTY)' \
  596. X        -DCONSTFILE='$(CONS)' \
  597. X        -DRCFILE='$(RC)'
  598. X
  599. X
  600. Xall: ${TARGS}
  601. X
  602. XCFLAGS= ${FILEFLAGS} ${LOCAL} ${DEFINES} -g
  603. XLDFLAGS = -g
  604. X
  605. X
  606. X#Include interact.o in COBJ to support keyboard user interaction
  607. X#COBJ=starmain.o starm2.o starsupp.o readfile.o parse_input.o
  608. XCOBJ=starmain.o starm2.o starsupp.o readfile.o parse_input.o interact.o 
  609. XCOBJIM=${COBJ} starimages.o
  610. XCOBJIMA=${COBJ} starimages_a.o
  611. X
  612. Xstardsp: ${COBJ} stardsp.o starcust.o
  613. X    $(CC) $(LDFLAGS) ${COBJ} stardsp.o starcust.o -lm -o $@
  614. X
  615. Xstarlaser: ${COBJIMA} starlaser.o starcust.o
  616. X    $(CC) $(LDFLAGS) ${COBJIMA} starlaser.o starcust.o -lm -o $@
  617. X
  618. Xstarpost: $(COBJ) starpost.o starcust.o
  619. X    $(CC) $(LDFLAGS) $(COBJ) starpost.o starcust.o -lm -o $@
  620. X
  621. Xstartek:  ${COBJIMA} startek.o starcust.o
  622. X    $(CC) $(LDFLAGS) ${COBJIMA} startek.o starcust.o -lm -o $@
  623. X
  624. Xstaruplot: ${COBJIMA} staruplot.o starcust.o
  625. X    $(CC) $(LDFLAGS) ${COBJIMA} staruplot.o starcust.o -lm -lplot -o $@
  626. X
  627. XstarX10: ${COBJIMA} starX10.o starcust.o
  628. X    $(CC) $(LDFLAGS) ${COBJIMA} starX10.o starcust.o -lm -lX -o $@
  629. X
  630. XstarX11: ${COBJIM} starX11.o starcust.o
  631. X    $(CC) $(LDFLAGS) ${COBJIM} starX11.o starcust.o -lm -lX11 -o $@
  632. X
  633. XstarXaw: starmain_i.o starm2_i.o starsupp.o readfile.o starX11_aw.o \
  634. X        starXaw.o starXawDlog.o starXawHelp.o starXawMwin.o\
  635. X        starcust.o starimages.o parse_input.o
  636. X    $(CC) $(LDFLAGS) starmain_i.o starm2_i.o starsupp.o readfile.o \
  637. X        starXaw.o starXawDlog.o starXawHelp.o starXawMwin.o \
  638. X         starX11_aw.o starcust.o starimages.o parse_input.o\
  639. X        -lm -lXaw -lXmu -lXt -lX11 -o $@
  640. X
  641. Xstarsunv: starmain_i.o starm2_i.o starsupp.o readfile.o starsunv.o \
  642. X        starcust.o starimages.o parse_input.o interact.o
  643. X    $(CC) $(LDFLAGS) starmain_i.o starm2_i.o starsupp.o readfile.o \
  644. X        starsunv.o starcust.o starimages.o parse_input.o interact.o \
  645. X            -lm -lsuntool -lsunwindow -lpixrect -o $@
  646. X
  647. Xstartool: starsunv
  648. X    echo "You must edit startool, startool.tt and startool.sh,"
  649. X    echo "    and install them"
  650. X    echo "You must have the program tooltool,"
  651. X    echo "    which is available from sun PD archives"
  652. X    echo "tooltool -f startool.tt" > startool
  653. X
  654. X# use -DINTERACTIVE_CONTROL in starmain.o and starm2.o
  655. X#     to allow keyboard user interaction
  656. Xstarmain.o: starmain.c Makefile star3.h parse_input.h
  657. X    $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starmain.c
  658. X
  659. Xstarm2.o: starm2.c Makefile star3.h
  660. X    $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starm2.c
  661. X
  662. X
  663. X
  664. Xstarmain_i.o: starmain.c Makefile star3.h parse_input.h
  665. X    -mv starmain.o starmain_n.o
  666. X    $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starmain.c
  667. X    mv starmain.o starmain_i.o
  668. X    -mv starmain_n.o starmain.o
  669. X
  670. Xstarm2_i.o: starm2.c Makefile star3.h
  671. X    -mv starm2.o starm2_n.o
  672. X    $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starm2.c
  673. X    mv starm2.o starm2_i.o
  674. X    -mv starm2_n.o starm2.o
  675. X
  676. Xreadfile.o: readfile.c star3.h
  677. X
  678. Xstarimages.o: starimages.c star3.h
  679. X    $(CC) $(CFLAGS) -c starimages.c
  680. X
  681. X#starimages_a.o defines area operations for drivers which otherwise don't
  682. X#  support them
  683. Xstarimages_a.o: Makefile starimages.c star3.h
  684. X    -mv starimages.o starimages_n.o
  685. X    $(CC) $(CFLAGS) -DAREAS -c starimages.c
  686. X    mv starimages.o starimages_a.o
  687. X    -mv starimages_n.o starimages.o
  688. X
  689. XstarX11.o: starX11.c Makefile icon.h star3.h
  690. X    $(CC) $(CFLAGS) $(XINCLUDES) -DSTARX11 -c starX11.c
  691. X
  692. XstarX11_aw.o: starX11.c Makefile icon.h star3.h
  693. X    -mv starX11.o starX11_n.o
  694. X    $(CC) $(CFLAGS) $(XINCLUDES) -DSTARXAW -c starX11.c
  695. X    mv starX11.o starX11_aw.o
  696. X    -mv starX11_n.o starX11.o
  697. X
  698. XstarXaw.o: starXaw.c star3.h starXaw.h icon.h
  699. X    $(CC) $(CFLAGS) $(XINCLUDES) -c starXaw.c
  700. X
  701. XstarXawDlog.o: starXawDlog.c star3.h starXaw.h starXawDlog.h
  702. X    $(CC) $(CFLAGS) $(XINCLUDES) -c starXawDlog.c
  703. X
  704. XstarXawHelp.o: starXawHelp.c star3.h starXaw.h
  705. X    $(CC) $(CFLAGS) $(XINCLUDES) -c starXawHelp.c
  706. X
  707. XstarXawMwin.o: starXawMwin.c star3.h starXaw.h
  708. X    $(CC) $(CFLAGS) $(XINCLUDES) -c starXawMwin.c
  709. X
  710. Xstarsunv.o: star3.h
  711. Xinteract.o: star3.h parse_input.h patchlevel.h
  712. Xparse_input.o: star3.h parse_input.h
  713. Xstarcust.o: star3.h 
  714. Xstardsp.o: star3.h 
  715. Xstarlaser.o: star3.h 
  716. Xstarpost.o: star3.h 
  717. Xstarsample.o: star3.h 
  718. Xstarsupp.o: star3.h 
  719. Xstartek.o: star3.h 
  720. Xstaruplot.o: star3.h 
  721. X
  722. Xinstall: all
  723. X    strip $(TARGS)
  724. X    mv $(TARGS) $(BINDIR)
  725. X
  726. Xdist:
  727. X    cp ${FILES} ${DISTDIR}
  728. X
  729. Xclean:
  730. X    rm -f ${OBJS} ${TARGS} a.out core
  731. END_OF_FILE
  732. echo shar: 1 control character may be missing from \"'starchart/Makefile'\"
  733. if test 9487 -ne `wc -c <'starchart/Makefile'`; then
  734.     echo shar: \"'starchart/Makefile'\" unpacked with wrong size!
  735. fi
  736. # end of 'starchart/Makefile'
  737. fi
  738. if test -f 'starchart/startek.c' -a "${1}" != "-c" ; then 
  739.   echo shar: Will not clobber existing file \"'starchart/startek.c'\"
  740. else
  741. echo shar: Extracting \"'starchart/startek.c'\" \(9586 characters\)
  742. sed "s/^X//" >'starchart/startek.c' <<'END_OF_FILE'
  743. X/*
  744. X * Tektronix driver for startchart.c mainline
  745. X */
  746. X
  747. X/*
  748. X ! patched December, 1987 by Alan Paeth (awpaeth@watcgl)
  749. X !
  750. X ! [1] "bigmaster" chart layout now added
  751. X !
  752. X */
  753. X/*
  754. X ! Modified for 3.0 January 1989 by Craig Counterman
  755. X */
  756. X/*
  757. X *
  758. X * Copyright (c) 1990 by Craig Counterman. All rights reserved.
  759. X *
  760. X * This software may be redistributed freely, not sold.
  761. X * This copyright notice and disclaimer of warranty must remain
  762. X *    unchanged. 
  763. X *
  764. X * No representation is made about the suitability of this
  765. X * software for any purpose.  It is provided "as is" without express or
  766. X * implied warranty, to the extent permitted by applicable law.
  767. X *
  768. X */
  769. X
  770. Xstatic char rcsid[]="$Header: startek.c,v 2.5 90/03/10 15:34:53 ccount Exp $";
  771. X
  772. X
  773. X#include <stdio.h>
  774. X#include <math.h>
  775. X
  776. X#include "star3.h"
  777. X
  778. X/*
  779. X * The following rational fractions are for Tek output on limited (and
  780. X * not 1024x768) bitmap devices, and attempt to cause graceful scaling of
  781. X * glyphs, by defining the distance between adjacent output pixels in terms
  782. X * of Tek coordinates. They should be fine-tuned for your Tektronix emulator.
  783. X * Additional tuning (for rounding considerations) must take place in the
  784. X * routine where the four values are referenced.
  785. X *
  786. X * Typical fractions are 5/8 (yields 640x480), 1/2, and 3/4
  787. X *
  788. X * For full resolution Tektronix devices (full 1024x768), all values are 1.
  789. X */
  790. X
  791. X#ifndef TEK
  792. X#define XSCALEI 1
  793. X#define XSCALEO 2
  794. X#define YSCALEI 1
  795. X#define YSCALEO 2
  796. X#else
  797. X#define XSCALEI 1
  798. X#define XSCALEO 1
  799. X#define YSCALEI 1
  800. X#define YSCALEO 1
  801. X#endif
  802. X
  803. X/* Externs */
  804. Xextern int g_argc;
  805. Xextern char **g_argv;
  806. X
  807. Xextern char *title;    /* Title of page */
  808. X
  809. Xextern mapwindow *mapwin[MAXWINDOWS];
  810. Xextern int numwins;
  811. X
  812. X
  813. X
  814. Xextern int cur_function;
  815. Xextern int cur_map_type;
  816. Xextern int cur_map_tag;
  817. Xextern char *cur_tag_field;
  818. X
  819. X/* Scale multiplier, minimum,
  820. X   mangitude change, maximum, for thumbnail,*/
  821. X#define THSMUL 1.2
  822. X#define THSMIN 12.0
  823. X#define THMADJ 2.5
  824. X#define THMMAX 5.0
  825. X
  826. X
  827. X/* Exports */
  828. X
  829. X/* The variables in the first few lines MUST be set by driver */
  830. Xmapwindow fullpage = {
  831. X  880, 700, 20, 65,    /* width, height, x and y offsets */
  832. X  8.0, 2.0, 2.05,    /* default limiting mags for glyph, name, label */
  833. X
  834. X/* The next several variables SHOULD be set by the driver,
  835. X   but are only used by the driver */
  836. X  FULLPAGEMAP,        /* Type of map: THUMBNAIL may have
  837. X               some restrictions */
  838. X  0,            /* May be used by driver for whatever */
  839. X  "String",        /* May be used by driver for whatever */
  840. X
  841. X/* The next several variables may be set by the driver, but the main routines
  842. X   may reset them (and the driver routines may then override that) */
  843. X  SANSONS,        /* Projection mode */
  844. X  FALSE, FALSE,        /* Draw grids */
  845. X  0.5, 5.0,        /* grid step size */
  846. X  0.0, 0.0,        /* grid origin */
  847. X
  848. X  FALSE,        /* Invert (flip north south) */
  849. X};
  850. X
  851. X/* The variables in the first few lines MUST be set by driver */
  852. Xmapwindow mainmap = {
  853. X  880, 500, 20, 265,    /* width, height, x and y offsets */
  854. X  8.0, 2.0, 2.05,    /* default limiting mags for glyph, name, label */
  855. X
  856. X/* The next several variables SHOULD be set by the driver,
  857. X   but are only used by the driver */
  858. X  MAINMAP,        /* Type of map: THUMBNAIL may have
  859. X               some restrictions */
  860. X  0,            /* May be used by driver for whatever */
  861. X  "String",        /* May be used by driver for whatever */
  862. X
  863. X/* The next several variables may be set by the driver, but the main routines
  864. X   may reset them (and the driver routines may then override that) */
  865. X  SANSONS,        /* Projection mode */
  866. X  FALSE, FALSE,        /* Draw grids */
  867. X  0.5, 5.0,        /* grid step size */
  868. X  0.0, 0.0,        /* grid origin */
  869. X
  870. X  FALSE,        /* Invert (flip north south) */
  871. X};
  872. X
  873. X
  874. X/* The variables in the first few lines MUST be set by driver */
  875. Xmapwindow thumbmap = {
  876. X  480, 195, 420, 35,    /* width, height, x and y offsets */
  877. X  5.5+THMADJ, 1.0+THMADJ, 2.05+THMADJ,
  878. X            /* default limiting mags for glyph, name, label */
  879. X
  880. X/* The next several variables SHOULD be set by the driver,
  881. X   but are only used by the driver */
  882. X  THUMBNAIL,        /* Type of map: THUMBNAIL may have
  883. X               some restrictions */
  884. X  0,            /* May be used by driver for whatever */
  885. X  "String",        /* May be used by driver for whatever */
  886. X
  887. X/* The next several variables may be set by the driver, but the main routines
  888. X   may reset them (and the driver routines may then override that) */
  889. X  SANSONS,        /* Projection mode */
  890. X  FALSE, FALSE,        /* Draw grids */
  891. X  0.5, 5.0,        /* grid step size */
  892. X  0.0, 0.0,        /* grid origin */
  893. X
  894. X  FALSE,        /* Invert (flip north south) */
  895. X};
  896. X
  897. X/* h & v tick text controls */
  898. Xint htick_lim = 2;
  899. Xint htext_lim = 80;
  900. Xint htext_xoff = 2;
  901. Xint htext_yoff = 17;
  902. Xint vtick_lim = 2;
  903. Xint vtext_lim = 20;
  904. Xint vtext_xoff = 24;
  905. Xint vtext_yoff = 0;
  906. X
  907. X/* externs for labels */
  908. Xint x_nameoffset = 10, y_nameoffset = 0;
  909. Xint x_lbloffset = 0, y_lbloffset = 10;
  910. Xint x_magoffset = 7, y_magoffset = -15;
  911. X
  912. X/* externs for legend: variables of positioning are here */
  913. Xint l_til=220;
  914. Xint l_stil=185;
  915. X
  916. Xint l_lmar1=40;
  917. Xint l_lmar2=65;
  918. Xint l_ltext=95;
  919. Xint l_rmar1=205;
  920. Xint l_rmar2=230;
  921. Xint l_rtext=260;
  922. X
  923. Xint l_line1=150;
  924. Xint l_line2=125;
  925. Xint l_line3=100;
  926. Xint l_line4=75;
  927. Xint l_line5=50;
  928. Xint l_line6=25;
  929. X
  930. X/* Point sizes for font calls */
  931. Xint titlesize=16;
  932. Xint subtlsize=12;
  933. Xint namesize=10;
  934. Xint lblsize=8;
  935. Xint magsize=8;
  936. X
  937. X/* Fonts for font calls */
  938. Xint namefnt=TIMESROMAN;
  939. Xint lblfnt=HELV;
  940. Xint magfnt=COURIER;
  941. Xint titlefnt=TIMESBOLD;
  942. Xint subtlfnt=TIMESROMAN;
  943. X
  944. X/* Scale multiplier, minimum,
  945. X   mangitude change, maximum, for thumbnail,*/
  946. Xdouble th_smul=THSMUL;
  947. Xdouble th_smin=THSMIN;
  948. Xdouble th_madj=THMADJ;
  949. Xdouble th_mmax=THMMAX;
  950. X
  951. X
  952. X#define MAX(a,b) ((a)>(b)?(a):(b))
  953. X#define MIN(a,b) ((a)<(b)?(a):(b))
  954. X
  955. X
  956. X/* Device control argument */
  957. XD_control_arg(s)
  958. Xchar *s;
  959. X{
  960. X  int i = 0;
  961. X  int c;
  962. X
  963. X  while (c = s[i++]) switch (c) {
  964. X  default:
  965. X    break;
  966. X  }
  967. X}
  968. X
  969. X/* Open the device */
  970. XD_open()
  971. X{
  972. X  tekclear();
  973. X
  974. X  return TRUE ;                /* open successful */
  975. X}
  976. X
  977. X/* Close the device */
  978. XD_close()
  979. X{
  980. X  tekmove(0,0);
  981. X  tekalpha();
  982. X  fflush(stdout);
  983. X}
  984. X
  985. X
  986. X/* Move to (x, y) */
  987. XD_move(x, y)
  988. X     int x, y;
  989. X{
  990. X  tekmove(x, y);
  991. X}
  992. X
  993. X/* Draw a line of style line_style from the current point to (x, y) */
  994. X/* Note, this replaces vecdraw vecdrawdot and vecdrawhyph */
  995. XD_draw(x, y, line_style)
  996. X     int x, y;
  997. X     int line_style;    /* SOLID, DOTTED, DASHED, etc. */
  998. X{
  999. X/* all styles are the same */
  1000. X  tekdraw(x, y);
  1001. X}
  1002. X/* This routine is encouraged to look at the extern cur_funtion
  1003. X   and change the line style drawn as desired */
  1004. X
  1005. X/* Move to (x1, y1) then draw a line of style line_style to (x2, y2) */
  1006. XD_movedraw(x1, y1, x2, y2, line_style)
  1007. X     int x1, y1, x2, y2;
  1008. X     int line_style;    /* SOLID, DOTTED, DASHED, etc. */
  1009. X{
  1010. X/* all styles are the same */
  1011. X  tekmove(x1, y1);
  1012. X  tekdraw(x2, y2);
  1013. X  fflush(stdout);
  1014. X}
  1015. X
  1016. X
  1017. X/* Set the color to be used for lines and text */
  1018. X/* color_str is a 2 char (+ '\0') string
  1019. X   containing a specification for a color,
  1020. X   e.g. "G2" for the color of a star of spectral class G2, or "r7" for
  1021. X   red, level seven.  The interpretation of the color string is left to
  1022. X   the device driver */
  1023. XD_color(color_str)
  1024. X     char *color_str;
  1025. X{
  1026. X  switch (color_str[0]) {
  1027. X  case 'O':
  1028. X    break;
  1029. X  case 'B':
  1030. X    break;
  1031. X  case 'A':
  1032. X    break;
  1033. X  case 'F':
  1034. X    break;
  1035. X  case 'G':
  1036. X    break;
  1037. X  case 'K':
  1038. X    break;
  1039. X  case 'M':
  1040. X    break;
  1041. X  case 'R':
  1042. X  case 'N':
  1043. X  case 'S':
  1044. X    break;
  1045. X  case ' ':
  1046. X  default:
  1047. X    break;
  1048. X  }
  1049. X}
  1050. X
  1051. X/* Set the font and font size to be used for text. */
  1052. X/* Note order of args */
  1053. XD_fontsize(fsize, font)
  1054. X     int fsize;        /* Size of font */
  1055. X     int font;        /* e.g. TIMES, HELV, TIMES+ITALIC */
  1056. X{
  1057. X}
  1058. X/* This routine is encouraged to look at the extern cur_funtion
  1059. X   and change the font used as desired */
  1060. X
  1061. X
  1062. X/* Display text string str at x,y, in current font and font size.
  1063. X   if star_lbl is TRUE, string is a star label, use
  1064. X     greek characters (if possible) */
  1065. XD_text(x, y, str, star_lbl)
  1066. X     int x, y;
  1067. X     char *str;
  1068. X     int star_lbl;
  1069. X{
  1070. X  tekmove(x, y-11);            /* center character strings */
  1071. X  tekalpha();
  1072. X
  1073. X  if (star_lbl) {
  1074. X    /* remove leading spaces */
  1075. X    while (*str == ' ') str++;
  1076. X    /* can't display greek characters */
  1077. X  }
  1078. X
  1079. X  printf(str);
  1080. X}
  1081. X
  1082. X/* Return input coordinate in device coords where there are pointing devices */
  1083. XD_inxy(x, y)
  1084. X     int *x, *y;
  1085. X{
  1086. X}
  1087. X
  1088. X/* Put non-displayed comment in output.  Allowed in postscript, but
  1089. X   few other drivers will be able to support this. */ 
  1090. XD_comment(str)
  1091. X     char *str;
  1092. X{
  1093. X/*
  1094. X  fprintf(stderr, "%s\n", str);
  1095. X*/
  1096. X}
  1097. X
  1098. X
  1099. X/**
  1100. XHigher level functions
  1101. X**/
  1102. X
  1103. Xdrawlen(x, y, dx, dy, len)
  1104. X     int x, y, dx, dy, len;
  1105. X{
  1106. X  D_movedraw((x*XSCALEI/XSCALEO+dx)*XSCALEO/XSCALEI,
  1107. X         (y*YSCALEI/YSCALEO+dy)*YSCALEO/YSCALEI,
  1108. X         (x*XSCALEI/XSCALEO+dx+len-1)*XSCALEO/XSCALEI+1,
  1109. X         (y*YSCALEI/YSCALEO+dy)*YSCALEO/YSCALEI, SOLID);
  1110. X}
  1111. X
  1112. X
  1113. X/*
  1114. X * Low Level Tektronix Plotting Routines
  1115. X */
  1116. X
  1117. X#define    GS    035
  1118. X#define    US    037
  1119. X#define ESC    033
  1120. X#define FF    014
  1121. X
  1122. Xstatic int oldHiY = 0, oldLoY = 0, oldHiX = 0;
  1123. X
  1124. Xtekplot()    /* switch to plot mode */
  1125. X{
  1126. X  putchar(GS);
  1127. X  putchar('@');
  1128. X  oldHiY = oldLoY = oldHiX = 0;
  1129. X}
  1130. X
  1131. Xtekalpha()    /* switch to alpha mode */
  1132. X{
  1133. X  putchar(US);
  1134. X  fflush(stdout);
  1135. X}
  1136. X
  1137. Xtekclear()
  1138. X{
  1139. X  putchar(ESC);
  1140. X  putchar(FF);
  1141. X  fflush(stdout);
  1142. X}
  1143. X
  1144. Xtekmove(x, y)    /* move to (x,y) */
  1145. X     int x, y;
  1146. X{
  1147. X  putchar(GS);
  1148. X  tekdraw(x, y);
  1149. X}
  1150. X
  1151. Xtekdraw(x, y)    /* draw to (x,y) */
  1152. X     int x, y;
  1153. X{
  1154. X  int hiY, loY, hiX, loX;
  1155. X  if (x < 0) x = 0;
  1156. X  if (y < 0) y = 0;
  1157. X  if (x > 1023) x = 1023;
  1158. X  if (y > 767) y = 767;
  1159. X
  1160. X  hiY = 0040 | (y>>5 & 037),
  1161. X  loY = 0140 | (y    & 037),
  1162. X  hiX = 0040 | (x>>5 & 037),
  1163. X  loX = 0100 | (x    & 037);
  1164. X
  1165. X  if (hiY != oldHiY) putchar(hiY);
  1166. X  if (loY != oldLoY || hiX != oldHiX) putchar(loY);
  1167. X  if (hiX != oldHiX) putchar(hiX);
  1168. X  putchar(loX);
  1169. X
  1170. X  oldHiY = hiY;
  1171. X  oldLoY = loY;
  1172. X  oldHiX = hiX;
  1173. X}
  1174. END_OF_FILE
  1175. if test 9586 -ne `wc -c <'starchart/startek.c'`; then
  1176.     echo shar: \"'starchart/startek.c'\" unpacked with wrong size!
  1177. fi
  1178. # end of 'starchart/startek.c'
  1179. fi
  1180. if test -f 'starchart/staruplot.c' -a "${1}" != "-c" ; then 
  1181.   echo shar: Will not clobber existing file \"'starchart/staruplot.c'\"
  1182. else
  1183. echo shar: Extracting \"'starchart/staruplot.c'\" \(8607 characters\)
  1184. sed "s/^X//" >'starchart/staruplot.c' <<'END_OF_FILE'
  1185. X/*
  1186. X * Plotter Display driver for starchart.c mainline (UNIX Plot(5) style output)
  1187. X *
  1188. X * Sjoerd Mullender <sjoerd@cs.vu.nl>
  1189. X * Free University, Amsterdam
  1190. X */
  1191. X
  1192. X/*
  1193. X * Produced for starchart 3.0 by Craig Counterman Jan, 1989
  1194. X *
  1195. X * Copyright (c) 1990 by Craig Counterman. All rights reserved.
  1196. X *
  1197. X * This software may be redistributed freely, not sold.
  1198. X * This copyright notice and disclaimer of warranty must remain
  1199. X *    unchanged. 
  1200. X *
  1201. X * No representation is made about the suitability of this
  1202. X * software for any purpose.  It is provided "as is" without express or
  1203. X * implied warranty, to the extent permitted by applicable law.
  1204. X *
  1205. X */
  1206. X
  1207. X
  1208. Xstatic char rcsid[]="$Header: staruplot.c,v 2.2 90/02/19 17:57:49 ccount Exp $";
  1209. X
  1210. X#include <stdio.h>
  1211. X#include <math.h>
  1212. X#ifndef SYSV
  1213. X#include <strings.h>
  1214. X#else
  1215. X#include <string.h>
  1216. X#endif
  1217. X
  1218. X#include "star3.h"
  1219. X
  1220. X/* Externs */
  1221. Xextern int g_argc;
  1222. Xextern char **g_argv;
  1223. X
  1224. Xextern char *title;    /* Title of page */
  1225. X
  1226. Xextern mapwindow *mapwin[MAXWINDOWS];
  1227. Xextern int numwins;
  1228. X
  1229. Xextern int cur_function;
  1230. Xextern int cur_map_type;
  1231. Xextern int cur_map_tag;
  1232. Xextern char *cur_tag_field;
  1233. X
  1234. X
  1235. X
  1236. X/* Scale multiplier, minimum,
  1237. X   mangitude change, maximum, for thumbnail,*/
  1238. X#define THSMUL 1.2
  1239. X#define THSMIN 12.0
  1240. X#define THMADJ 2.5
  1241. X#define THMMAX 5.0
  1242. X
  1243. X/* Exports */
  1244. X
  1245. X/* The variables in the first few lines MUST be set by driver */
  1246. Xmapwindow fullpage = {
  1247. X  880, 700, 20, 65,    /* width, height, x and y offsets */
  1248. X  5.9, 2.0, 2.05,    /* default limiting mags for glyph, name, label */
  1249. X
  1250. X/* The next several variables SHOULD be set by the driver,
  1251. X   but are only used by the driver */
  1252. X  FULLPAGEMAP,        /* Type of map: THUMBNAIL may have
  1253. X               some restrictions */
  1254. X  0,            /* May be used by driver for whatever */
  1255. X  "String",        /* May be used by driver for whatever */
  1256. X  
  1257. X/* The next several variables may be set by the driver, but the main routines
  1258. X   may reset them (and the driver routines may then override that) */
  1259. X  SANSONS,        /* Projection mode */
  1260. X  FALSE, FALSE,        /* Draw grids */
  1261. X  0.5, 5.0,        /* grid step size */
  1262. X  0.0, 0.0,        /* grid origin */
  1263. X
  1264. X  FALSE,        /* Invert (flip north south) */
  1265. X};
  1266. X
  1267. X/* The variables in the first few lines MUST be set by driver */
  1268. Xmapwindow mainmap = {
  1269. X  880, 500, 20, 265,    /* width, height, x and y offsets */
  1270. X  5.9, 2.0, 2.05,    /* default limiting mags for glyph, name, label */
  1271. X
  1272. X/* The next several variables SHOULD be set by the driver,
  1273. X   but are only used by the driver */
  1274. X  MAINMAP,        /* Type of map: THUMBNAIL may have
  1275. X               some restrictions */
  1276. X  0,            /* May be used by driver for whatever */
  1277. X  "String",        /* May be used by driver for whatever */
  1278. X
  1279. X/* The next several variables may be set by the driver, but the main routines
  1280. X   may reset them (and the driver routines may then override that) */
  1281. X  SANSONS,        /* Projection mode */
  1282. X  FALSE, FALSE,        /* Draw grids */
  1283. X  0.5, 5.0,        /* grid step size */
  1284. X  0.0, 0.0,        /* grid origin */
  1285. X
  1286. X  FALSE,        /* Invert (flip north south) */
  1287. X};
  1288. X
  1289. X
  1290. X/* The variables in the first few lines MUST be set by driver */
  1291. Xmapwindow thumbmap = {
  1292. X  480, 195, 420, 35,    /* width, height, x and y offsets */
  1293. X  3.0+THMADJ, 1.0+THMADJ, 2.05+THMADJ,
  1294. X            /* default limiting mags for glyph, name, label */
  1295. X
  1296. X/* The next several variables SHOULD be set by the driver,
  1297. X   but are only used by the driver */
  1298. X  THUMBNAIL,        /* Type of map: THUMBNAIL may have
  1299. X               some restrictions */
  1300. X  0,            /* May be used by driver for whatever */
  1301. X  "String",        /* May be used by driver for whatever */
  1302. X
  1303. X/* The next several variables may be set by the driver, but the main routines
  1304. X   may reset them (and the driver routines may then override that) */
  1305. X  SANSONS,        /* Projection mode */
  1306. X  FALSE, FALSE,        /* Draw grids */
  1307. X  0.5, 5.0,        /* grid step size */
  1308. X  0.0, 0.0,        /* grid origin */
  1309. X
  1310. X  FALSE,        /* Invert (flip north south) */
  1311. X};
  1312. X
  1313. X/* h & v tick text controls */
  1314. Xint htick_lim = 2;
  1315. Xint htext_lim = 80;
  1316. Xint htext_xoff = 2;
  1317. Xint htext_yoff = 17;
  1318. Xint vtick_lim = 2;
  1319. Xint vtext_lim = 20;
  1320. Xint vtext_xoff = 24;
  1321. Xint vtext_yoff = 0;
  1322. X
  1323. X
  1324. X/* externs for labels */
  1325. Xint x_nameoffset = 10, y_nameoffset = 0;
  1326. Xint x_lbloffset = 0, y_lbloffset = 10;
  1327. Xint x_magoffset = 7, y_magoffset = -15;
  1328. X
  1329. X/* externs for legend: variables of positioning are here */
  1330. Xint l_til=220;
  1331. Xint l_stil=185;
  1332. X
  1333. Xint l_lmar1=40;
  1334. Xint l_lmar2=65;
  1335. Xint l_ltext=95;
  1336. Xint l_rmar1=205;
  1337. Xint l_rmar2=230;
  1338. Xint l_rtext=260;
  1339. X
  1340. Xint l_line1=150;
  1341. Xint l_line2=125;
  1342. Xint l_line3=100;
  1343. Xint l_line4=75;
  1344. Xint l_line5=50;
  1345. Xint l_line6=25;
  1346. X
  1347. X/* Point sizes for font calls */
  1348. Xint titlesize=16;
  1349. Xint subtlsize=12;
  1350. Xint namesize=10;
  1351. Xint lblsize=8;
  1352. Xint magsize=8;
  1353. X
  1354. X/* Fonts for font calls */
  1355. Xint namefnt=TIMESROMAN;
  1356. Xint lblfnt=HELV;
  1357. Xint magfnt=COURIER;
  1358. Xint titlefnt=TIMESBOLD;
  1359. Xint subtlfnt=TIMESROMAN;
  1360. X
  1361. X/* Scale multiplier, minimum,
  1362. X   mangitude change, maximum, for thumbnail,*/
  1363. Xdouble th_smul=THSMUL;
  1364. Xdouble th_smin=THSMIN;
  1365. Xdouble th_madj=THMADJ;
  1366. Xdouble th_mmax=THMMAX;
  1367. X
  1368. X#define MAX(a,b) ((a)>(b)?(a):(b))
  1369. X#define MIN(a,b) ((a)<(b)?(a):(b))
  1370. X
  1371. X
  1372. X/* Device control argument */
  1373. XD_control_arg(s)
  1374. Xchar *s;
  1375. X{
  1376. X  int i = 0;
  1377. X  int c;
  1378. X
  1379. X  while (c = s[i++]) switch (c) {
  1380. X  default:
  1381. X    break;
  1382. X  }
  1383. X}
  1384. X
  1385. X/* Open the device */
  1386. XD_open()
  1387. X{
  1388. X  openpl();
  1389. X  space(0, 0, 1024, 1024);
  1390. X  erase();
  1391. X
  1392. X  return TRUE ;                /* open successful */
  1393. X}
  1394. X
  1395. X
  1396. X/* Close the device */
  1397. XD_close()
  1398. X{
  1399. X  closepl();
  1400. X}
  1401. X
  1402. X
  1403. X/* Move to (x, y) */
  1404. XD_move(x, y)
  1405. X     int x, y;
  1406. X{
  1407. X    move(x, y);
  1408. X}
  1409. X
  1410. Xint cur_sty;
  1411. X/* Draw a line of style line_style from the current point to (x, y) */
  1412. X/* Note, this replaces vecdraw vecdrawdot and vecdrawhyph */
  1413. XD_draw(x, y, line_style)
  1414. X     int x, y;
  1415. X     int line_style;    /* SOLID, DOTTED, DASHED, etc. */
  1416. X{
  1417. X  int sty;
  1418. X
  1419. X  switch(cur_function) {
  1420. X  case CHRTOUTLN:
  1421. X  case CHRTHTICK:
  1422. X  case CHRTVTICK:
  1423. X    sty = SOLID;
  1424. X    break;
  1425. X  case GRID_RA:
  1426. X  case GRID_DEC:
  1427. X    sty = DOTTED;
  1428. X    break;
  1429. X  case ECLIPT:
  1430. X    sty = DOTTED;
  1431. X    break;
  1432. X  case CONSTBOUND:
  1433. X    sty = DASHED;
  1434. X    break;
  1435. X  case CONSTPATTRN:
  1436. X    sty = SOLID;
  1437. X    break;
  1438. X  case CONSTNAME:
  1439. X  case CHARTFILE:
  1440. X  default:
  1441. X    sty = line_style;
  1442. X    break;
  1443. X  }
  1444. X
  1445. X  if (sty == cur_sty) {    /* Continue current line, style */
  1446. X    cont(x,y);
  1447. X  } else {            /* Change style */
  1448. X    switch(sty) {
  1449. X    case SOLID:
  1450. X      linemod("solid");
  1451. X      break;
  1452. X    case DOTTED:
  1453. X      linemod("dotted");
  1454. X      break;
  1455. X    case DASHED:
  1456. X      linemod("shortdashed");
  1457. X      break;
  1458. X    case VECSOLID:
  1459. X      linemod("solid");
  1460. X      break;
  1461. X    case VECDOT:
  1462. X      linemod("dotted");
  1463. X      break;
  1464. X    case VECDASH:
  1465. X      linemod("shortdashed");
  1466. X      break;
  1467. X    default:
  1468. X      linemod("solid");
  1469. X      break;
  1470. X    }
  1471. X    cur_sty = sty;
  1472. X    cont(x,y);
  1473. X  }
  1474. X}
  1475. X/* This routine is encouraged to look at the extern cur_funtion
  1476. X   and change the line style drawn as desired */
  1477. X
  1478. X
  1479. X/* Move to (x1, y1) then draw a line of style line_style to (x2, y2) */
  1480. XD_movedraw(x1, y1, x2, y2, line_style)
  1481. X     int x1, y1, x2, y2;
  1482. X     int line_style;    /* SOLID, DOTTED, DASHED, etc. */
  1483. X{
  1484. X  D_move(x1, y1);
  1485. X  D_draw(x2, y2, line_style);
  1486. X}
  1487. X
  1488. X
  1489. X/* Set the color to be used for lines and text */
  1490. X/* color_str is a 2 char (+ '\0') string containing
  1491. X   a specification for a color,
  1492. X   e.g. "G2" for the color of a star of spectral class G2, or "r7" for
  1493. X   red, level seven.  The interpretation of the color string is left to
  1494. X   the device driver */
  1495. XD_color(color_str)
  1496. X     char *color_str;
  1497. X{
  1498. X  switch (color_str[0]) {
  1499. X  case 'O':
  1500. X    break;
  1501. X  case 'B':
  1502. X    break;
  1503. X  case 'A':
  1504. X    break;
  1505. X  case 'F':
  1506. X    break;
  1507. X  case 'G':
  1508. X    break;
  1509. X  case 'K':
  1510. X    break;
  1511. X  case 'M':
  1512. X    break;
  1513. X  case 'R':
  1514. X  case 'N':
  1515. X  case 'S':
  1516. X    break;
  1517. X  case ' ':
  1518. X  default:
  1519. X    break;
  1520. X  }
  1521. X}
  1522. X
  1523. X
  1524. X/* Set the font and font size to be used for text. */
  1525. X/* Note order of args */
  1526. XD_fontsize(fsize, font)
  1527. X     int fsize;    /* Size of font */
  1528. X     int font;    /* e.g. TIMES, HELV, TIMES+ITALIC */
  1529. X{
  1530. X}
  1531. X/* This routine is encouraged to look at the extern cur_funtion
  1532. X   and change the font used as desired */
  1533. X
  1534. X
  1535. X/* Display text string str at x,y, in current font and font size.
  1536. X   if star_lbl is TRUE, string is a star label, use
  1537. X     greek characters (if possible) */
  1538. XD_text(x, y, str, star_lbl)
  1539. X     int x, y;
  1540. X     char *str;
  1541. X     int star_lbl;
  1542. X{
  1543. X  move(x, y);
  1544. X  if (star_lbl) {
  1545. X    /* remove leading spaces */
  1546. X    while (*str == ' ') str++;
  1547. X    /* can't display greek characters */
  1548. X  }
  1549. X  label(str);
  1550. X}
  1551. X
  1552. X
  1553. X/* Return input coordinate in device coords where there are pointing devices */
  1554. XD_inxy(x, y)
  1555. X     int *x, *y;
  1556. X{
  1557. X}
  1558. X
  1559. X
  1560. X/* Put non-displayed comment in output.  Allowed in postscript, but
  1561. X   few other drivers will be able to support this. */ 
  1562. XD_comment(str)
  1563. X     char *str;
  1564. X{
  1565. X/*
  1566. X  fprintf(stderr, "%s\n", str);
  1567. X*/
  1568. X}
  1569. X
  1570. X
  1571. Xdrawlen(x, y, dx, dy, len)
  1572. X     int x, y, dx, dy, len;
  1573. X{
  1574. X  D_movedraw(x+dx, y+dy,
  1575. X         x+dx+len,
  1576. X         y+dy, SOLID);
  1577. X}
  1578. X
  1579. X
  1580. X
  1581. X
  1582. X
  1583. X
  1584. END_OF_FILE
  1585. if test 8607 -ne `wc -c <'starchart/staruplot.c'`; then
  1586.     echo shar: \"'starchart/staruplot.c'\" unpacked with wrong size!
  1587. fi
  1588. # end of 'starchart/staruplot.c'
  1589. fi
  1590. echo shar: End of archive 6 \(of 32\).
  1591. cp /dev/null ark6isdone
  1592. MISSING=""
  1593. 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
  1594.     if test ! -f ark${I}isdone ; then
  1595.     MISSING="${MISSING} ${I}"
  1596.     fi
  1597. done
  1598. if test "${MISSING}" = "" ; then
  1599.     echo You have unpacked all 32 archives.
  1600.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1601. else
  1602.     echo You still need to unpack the following archives:
  1603.     echo "        " ${MISSING}
  1604. fi
  1605. ##  End of shell archive.
  1606. exit 0
  1607.  
  1608.