home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / source / star.lzh / star.6 < prev    next >
Encoding:
Text File  |  1990-03-27  |  49.9 KB  |  1,600 lines

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