[2551] | 1 | #ifndef _ASTRO_H
|
---|
| 2 | #define _ASTRO_H
|
---|
| 3 |
|
---|
[1457] | 4 | #ifndef PI
|
---|
| 5 | #define PI 3.141592653589793
|
---|
| 6 | #endif
|
---|
| 7 |
|
---|
| 8 | /* conversions among hours (of ra), degrees and radians. */
|
---|
| 9 | #define degrad(x) ((x)*PI/180.)
|
---|
| 10 | #define raddeg(x) ((x)*180./PI)
|
---|
| 11 | #define hrdeg(x) ((x)*15.)
|
---|
| 12 | #define deghr(x) ((x)/15.)
|
---|
| 13 | #define hrrad(x) degrad(hrdeg(x))
|
---|
| 14 | #define radhr(x) deghr(raddeg(x))
|
---|
| 15 |
|
---|
| 16 | /* ratio of from synodic (solar) to sidereal (stellar) rate */
|
---|
| 17 | #define SIDRATE .9972695677
|
---|
| 18 |
|
---|
| 19 | #define SPD (24.0*3600.0) /* seconds per day */
|
---|
| 20 |
|
---|
| 21 | /* manifest names for planets.
|
---|
| 22 | * N.B. must coincide with usage in pelement.c and plans.c.
|
---|
| 23 | * N.B. only the first 8 are valid for use with plans().
|
---|
| 24 | */
|
---|
[2551] | 25 | typedef enum {
|
---|
| 26 | MERCURY,
|
---|
| 27 | VENUS,
|
---|
| 28 | MARS,
|
---|
| 29 | JUPITER,
|
---|
| 30 | SATURN,
|
---|
| 31 | URANUS,
|
---|
| 32 | NEPTUNE,
|
---|
| 33 | PLUTO,
|
---|
| 34 | SUN,
|
---|
| 35 | MOON,
|
---|
| 36 | NOBJ /* total number of basic objects */
|
---|
| 37 | } PLCode;
|
---|
[1457] | 38 |
|
---|
[2551] | 39 | /* moon constants for pl_moon */
|
---|
| 40 | typedef enum {
|
---|
| 41 | X_PLANET = 0, /* use to mean planet itself */
|
---|
| 42 | PHOBOS = NOBJ, DEIMOS,
|
---|
| 43 | IO, EUROPA, GANYMEDE, CALLISTO,
|
---|
| 44 | MIMAS, ENCELADUS, TETHYS, DIONE, RHEA, TITAN, HYPERION, IAPETUS,
|
---|
| 45 | ARIEL, UMBRIEL, TITANIA, OBERON, MIRANDA,
|
---|
| 46 | NBUILTIN
|
---|
| 47 | } MCode;
|
---|
[1457] | 48 |
|
---|
| 49 | /* starting point for MJD calculations
|
---|
| 50 | */
|
---|
| 51 | #define MJD0 2415020.0
|
---|
[2551] | 52 | #define J2000 (2451545.0 - MJD0) /* yes, 2000 January 1 at 12h */
|
---|
[1457] | 53 |
|
---|
[2551] | 54 | /* the Now and Obj typedefs.
|
---|
| 55 | * also, a few miscellaneous constants and declarations.
|
---|
| 56 | */
|
---|
| 57 |
|
---|
| 58 | #define SPD (24.0*3600.0) /* seconds per day */
|
---|
| 59 | #define MAU (1.4959787e11) /* m / au */
|
---|
| 60 | #define LTAU 499.005 /* seconds light takes to travel 1 AU */
|
---|
| 61 | #define ERAD (6.37816e6) /* earth equitorial radius, m */
|
---|
| 62 | #define MRAD (1.740e6) /* moon equitorial radius, m */
|
---|
| 63 | #define SRAD (6.95e8) /* sun equitorial radius, m */
|
---|
| 64 | #define FTPM 3.28084 /* ft per m */
|
---|
| 65 | #define ESAT_MAG 2 /* default satellite magnitude */
|
---|
| 66 | #define FAST_SAT_RPD 0.25 /* max earth sat rev/day considered "fast" */
|
---|
| 67 |
|
---|
| 68 | #define EOD (-9786) /* special epoch flag: use epoch of date */
|
---|
| 69 |
|
---|
| 70 | /* info about the local observing circumstances and misc preferences */
|
---|
| 71 | typedef struct {
|
---|
| 72 | double n_mjd; /* modified Julian date, ie, days since
|
---|
| 73 | * Jan 0.5 1900 (== 12 noon, Dec 30, 1899), utc.
|
---|
| 74 | * enough precision to get well better than 1 second.
|
---|
| 75 | * N.B. if not first member, must move NOMJD inits.
|
---|
| 76 | */
|
---|
| 77 | double n_lat; /* geographic (surface-normal) lt, >0 north, rads */
|
---|
| 78 | double n_lng; /* longitude, >0 east, rads */
|
---|
| 79 | double n_tz; /* time zone, hrs behind UTC */
|
---|
| 80 | double n_temp; /* atmospheric temp, degrees C */
|
---|
| 81 | double n_pressure; /* atmospheric pressure, mBar */
|
---|
| 82 | double n_elev; /* elevation above sea level, earth radii */
|
---|
| 83 | double n_dip; /* dip of sun below hzn at twilight, >0 below, rads */
|
---|
| 84 | double n_epoch; /* desired precession display ep as an mjd, or EOD */
|
---|
| 85 | char n_tznm[8]; /* time zone name; 7 chars or less, always 0 at end */
|
---|
| 86 | } Now;
|
---|
| 87 |
|
---|
| 88 | /* handy shorthands for fields in a Now pointer, np */
|
---|
| 89 | #define mjd np->n_mjd
|
---|
| 90 | #define lat np->n_lat
|
---|
| 91 | #define lng np->n_lng
|
---|
| 92 | #define tz np->n_tz
|
---|
| 93 | #define temp np->n_temp
|
---|
| 94 | #define pressure np->n_pressure
|
---|
| 95 | #define elev np->n_elev
|
---|
| 96 | #define dip np->n_dip
|
---|
| 97 | #define epoch np->n_epoch
|
---|
| 98 | #define tznm np->n_tznm
|
---|
| 99 | #define mjed mm_mjed(np)
|
---|
| 100 |
|
---|
| 101 | /* structures to describe objects of various types.
|
---|
| 102 | */
|
---|
| 103 |
|
---|
| 104 | /* magnitude values in two different systems */
|
---|
| 105 | typedef struct {
|
---|
| 106 | float m1, m2; /* either g/k or H/G, depending on... */
|
---|
| 107 | int whichm; /* one of MAG_gk or MAG_HG */
|
---|
| 108 | } Mag;
|
---|
| 109 |
|
---|
| 110 | /* whichm */
|
---|
| 111 | #define MAG_HG 0 /* using 0 makes HG the initial default */
|
---|
| 112 | #define MAG_gk 1
|
---|
| 113 |
|
---|
| 114 | /* we actually store magnitudes times this scale factor in a short int */
|
---|
| 115 | #define MAGSCALE 100.0
|
---|
| 116 | #define set_smag(op,m) ((op)->s_mag = (short)floor((m)*MAGSCALE + 0.5))
|
---|
| 117 | #define set_fmag(op,m) ((op)->f_mag = (short)floor((m)*MAGSCALE + 0.5))
|
---|
| 118 | #define get_mag(op) ((op)->s_mag / MAGSCALE)
|
---|
| 119 |
|
---|
| 120 | /* longest object name, including trailing '\0' */
|
---|
| 121 | #define MAXNM 21
|
---|
| 122 |
|
---|
| 123 | typedef unsigned char ObjType_t;
|
---|
| 124 | typedef unsigned char ObjAge_t;
|
---|
| 125 | typedef unsigned char byte;
|
---|
| 126 |
|
---|
| 127 | /* Obj is a massive union.
|
---|
| 128 | * many fields are in common so we use macros to make things a little easier.
|
---|
| 129 | */
|
---|
| 130 |
|
---|
| 131 | /* fields common to *all* structs in the Obj union */
|
---|
| 132 | #define OBJ_COMMON_FLDS \
|
---|
| 133 | ObjType_t co_type; /* current object type; see flags, below */ \
|
---|
| 134 | byte co_flags; /* FUSER*... used by others */ \
|
---|
| 135 | ObjAge_t co_age; /* update aging code; see db.c */ \
|
---|
| 136 | char co_name[MAXNM];/* name, including \0 */ \
|
---|
| 137 | float co_ra; /* geo/topo app/mean ra, rads */ \
|
---|
| 138 | float co_dec; /* geo/topo app/mean dec, rads */ \
|
---|
| 139 | float co_gaera; /* geo apparent ra, rads */ \
|
---|
| 140 | float co_gaedec; /* geo apparent dec, rads */ \
|
---|
| 141 | float co_az; /* azimuth, >0 e of n, rads */ \
|
---|
| 142 | float co_alt; /* altitude above topocentric horizon, rads */ \
|
---|
| 143 | float co_elong; /* angular sep btwen obj and sun, >0 E, degs */ \
|
---|
| 144 | float co_size; /* angular size, arc secs */ \
|
---|
| 145 | short co_mag /* visual magnitude * MAGSCALE */
|
---|
| 146 |
|
---|
| 147 | /* fields common to all solar system objects in the Obj union */
|
---|
| 148 | #define OBJ_SOLSYS_FLDS \
|
---|
| 149 | OBJ_COMMON_FLDS; /* all the fixed ones plus ... */ \
|
---|
| 150 | float so_sdist; /* dist from object to sun, au */ \
|
---|
| 151 | float so_edist; /* dist from object to earth, au */ \
|
---|
| 152 | float so_hlong; /* heliocentric longitude, rads */ \
|
---|
| 153 | float so_hlat; /* heliocentric latitude, rads */ \
|
---|
| 154 | float so_phase /* phase, % */
|
---|
| 155 |
|
---|
| 156 | /* fields common to all fixed objects in the Obj union */
|
---|
| 157 | #define OBJ_FIXED_FLDS \
|
---|
| 158 | char fo_spect[2]; /* spectral codes, if appropriate */ \
|
---|
| 159 | float fo_epoch; /* eq of ra/dec and time when pm=0; mjd */ \
|
---|
| 160 | float fo_ra; /* ra, rads, in epoch frame */ \
|
---|
| 161 | float fo_dec; /* dec, rads, in epoch frame */ \
|
---|
| 162 | float fo_pmra; /* ra proper motion, rads/day/cos(dec) */ \
|
---|
| 163 | float fo_pmdec; /* dec proper motion, rads/day */ \
|
---|
| 164 | char fo_class /* object class */
|
---|
| 165 |
|
---|
| 166 | /* a generic object */
|
---|
| 167 | typedef struct {
|
---|
| 168 | OBJ_COMMON_FLDS;
|
---|
| 169 | } ObjAny;
|
---|
| 170 |
|
---|
| 171 | /* a generic sol system object */
|
---|
| 172 | typedef struct {
|
---|
| 173 | OBJ_SOLSYS_FLDS;
|
---|
| 174 | } ObjSS;
|
---|
| 175 |
|
---|
| 176 | /* basic Fixed object info.
|
---|
| 177 | */
|
---|
| 178 | typedef struct {
|
---|
| 179 | OBJ_COMMON_FLDS;
|
---|
| 180 | OBJ_FIXED_FLDS;
|
---|
| 181 |
|
---|
| 182 | /* following are for galaxies */
|
---|
| 183 | byte fo_ratio; /* minor/major diameter ratio. use s/get_ratio() */
|
---|
| 184 | byte fo_pa; /* position angle, E of N, rads. use s/get_pa() */
|
---|
| 185 | } ObjF;
|
---|
| 186 |
|
---|
| 187 | /* true-orbit parameters of binary-star object type */
|
---|
| 188 | typedef struct {
|
---|
| 189 | float bo_T; /* epoch of periastron, years */
|
---|
| 190 | float bo_e; /* eccentricity */
|
---|
| 191 | float bo_o; /* argument of periastron, degress */
|
---|
| 192 | float bo_O; /* longitude of node, degrees */
|
---|
| 193 | float bo_i; /* inclination to plane of sky, degrees */
|
---|
| 194 | float bo_a; /* semi major axis, arc secs */
|
---|
| 195 | float bo_P; /* period, years */
|
---|
| 196 |
|
---|
| 197 | /* companion position, computed by obj_cir() iff b_2compute */
|
---|
| 198 | float bo_pa; /* position angle @ ep, rads E of N */
|
---|
| 199 | float bo_sep; /* separation @ ep, arc secs */
|
---|
| 200 | float bo_ra; /* geo/topo app/mean ra, rads */
|
---|
| 201 | float bo_dec; /* geo/topo app/mean dec, rads */
|
---|
| 202 | } BinOrbit;
|
---|
| 203 | typedef struct {
|
---|
| 204 | float bp_ep; /* epoch of pa/sep, year */
|
---|
| 205 | float bp_pa; /* position angle @ ep, rads E of N */
|
---|
| 206 | float bp_sep; /* separation @ ep, arc secs */
|
---|
| 207 |
|
---|
| 208 | /* companion position, computed by obj_cir() iff b_2compute */
|
---|
| 209 | float bp_ra; /* geo/topo app/mean ra, rads */
|
---|
| 210 | float bp_dec; /* geo/topo app/mean dec, rads */
|
---|
| 211 | } BinPos;
|
---|
| 212 | #define MAXBINPOS 2 /* max discrete epochs to store when no elements */
|
---|
| 213 | typedef struct {
|
---|
| 214 | OBJ_COMMON_FLDS;
|
---|
| 215 | OBJ_FIXED_FLDS;
|
---|
| 216 |
|
---|
| 217 | byte b_2compute; /* whether to compute secondary positions */
|
---|
| 218 | byte b_nbp; /* number of b_bp[] or 0 to use b_bo */
|
---|
| 219 | short b_2mag; /* secondary's magnitude * MAGSCALE */
|
---|
| 220 | char b_2spect[2]; /* secondary's spectrum */
|
---|
| 221 |
|
---|
| 222 | /* either a real orbit or a set of discrete pa/sep */
|
---|
| 223 | union {
|
---|
| 224 | BinOrbit b_bo; /* orbital elements */
|
---|
| 225 | BinPos b_bp[MAXBINPOS]; /* table of discrete positions */
|
---|
| 226 | } u;
|
---|
| 227 | } ObjB;
|
---|
| 228 |
|
---|
| 229 | #define fo_mag co_mag /* pseudonym for so_mag since it is not computed */
|
---|
| 230 | #define fo_size co_size /* pseudonym for so_size since it is not computed */
|
---|
| 231 |
|
---|
| 232 | /* macros to pack/unpack some fields */
|
---|
| 233 | #define SRSCALE 255.0 /* galaxy size ratio scale */
|
---|
| 234 | #define PASCALE (255.0/(2*PI)) /* pos angle scale factor */
|
---|
| 235 | #define get_ratio(op) (((int)(op)->f_ratio)/SRSCALE)
|
---|
| 236 | #define set_ratio(op,maj,min) ((op)->f_ratio = (byte)(((maj) > 0) \
|
---|
| 237 | ? ((min)*SRSCALE/(double)(maj)+0.5) \
|
---|
| 238 | : 0))
|
---|
| 239 | #define get_pa(op) ((double)(op)->f_pa/PASCALE)
|
---|
| 240 | #define set_pa(op,s) ((op)->f_pa = (byte)((s)*PASCALE + 0.5))
|
---|
| 241 |
|
---|
| 242 | #define NCLASSES 128 /* n potential fo_classes -- allow for all ASCII */
|
---|
| 243 |
|
---|
| 244 | /* basic planet object info */
|
---|
| 245 | typedef struct {
|
---|
| 246 | OBJ_SOLSYS_FLDS;
|
---|
| 247 | PLCode plo_code; /* which planet */
|
---|
| 248 | MCode plo_moon; /* which moon, or X_PLANET if planet */
|
---|
| 249 | char plo_evis, plo_svis; /* if moon: whether visible from earth, sun */
|
---|
| 250 | double plo_x, plo_y, plo_z; /* if moon: eq dist from center, planet radii */
|
---|
| 251 | double plo_aux1, plo_aux2; /* various values, depending on type */
|
---|
| 252 | } ObjPl;
|
---|
| 253 |
|
---|
| 254 | /* basic info about an object in elliptical heliocentric orbit */
|
---|
| 255 | typedef struct {
|
---|
| 256 | OBJ_SOLSYS_FLDS;
|
---|
| 257 | float eo_inc; /* inclination, degrees */
|
---|
| 258 | float eo_Om; /* longitude of ascending node, degrees */
|
---|
| 259 | float eo_om; /* argument of perihelion, degress */
|
---|
| 260 | float eo_a; /* mean distance, aka,semi-maj axis,AU */
|
---|
| 261 | float eo_M; /* mean anomaly, ie, degrees from perihelion at cepoch*/
|
---|
| 262 | float eo_size; /* angular size, in arc seconds at 1 AU */
|
---|
| 263 | float eo_startok; /* nominal first mjd this set is ok, else 0 */
|
---|
| 264 | float eo_endok; /* nominal last mjd this set is ok, else 0 */
|
---|
| 265 | double eo_e; /* eccentricity (double for when near 1 computing q) */
|
---|
| 266 | double eo_cepoch; /* epoch date (M reference), as an mjd */
|
---|
| 267 | double eo_epoch; /* equinox year (inc/Om/om reference), as an mjd. */
|
---|
| 268 | Mag eo_mag; /* magnitude */
|
---|
| 269 | } ObjE;
|
---|
| 270 |
|
---|
| 271 | /* basic info about an object in hyperbolic heliocentric orbit */
|
---|
| 272 | typedef struct {
|
---|
| 273 | OBJ_SOLSYS_FLDS;
|
---|
| 274 | double ho_epoch; /* equinox year (inc/Om/om reference), as an mjd */
|
---|
| 275 | double ho_ep; /* epoch of perihelion, as an mjd */
|
---|
| 276 | float ho_startok; /* nominal first mjd this set is ok, else 0 */
|
---|
| 277 | float ho_endok; /* nominal last mjd this set is ok, else 0 */
|
---|
| 278 | float ho_inc; /* inclination, degs */
|
---|
| 279 | float ho_Om; /* longitude of ascending node, degs */
|
---|
| 280 | float ho_om; /* argument of perihelion, degs. */
|
---|
| 281 | float ho_e; /* eccentricity */
|
---|
| 282 | float ho_qp; /* perihelion distance, AU */
|
---|
| 283 | float ho_g, ho_k; /* magnitude model coefficients */
|
---|
| 284 | float ho_size; /* angular size, in arc seconds at 1 AU */
|
---|
| 285 | } ObjH;
|
---|
| 286 |
|
---|
| 287 | /* basic info about an object in parabolic heliocentric orbit */
|
---|
| 288 | typedef struct {
|
---|
| 289 | OBJ_SOLSYS_FLDS;
|
---|
| 290 | double po_epoch; /* reference epoch, as an mjd */
|
---|
| 291 | double po_ep; /* epoch of perihelion, as an mjd */
|
---|
| 292 | float po_startok; /* nominal first mjd this set is ok, else 0 */
|
---|
| 293 | float po_endok; /* nominal last mjd this set is ok, else 0 */
|
---|
| 294 | float po_inc; /* inclination, degs */
|
---|
| 295 | float po_qp; /* perihelion distance, AU */
|
---|
| 296 | float po_om; /* argument of perihelion, degs. */
|
---|
| 297 | float po_Om; /* longitude of ascending node, degs */
|
---|
| 298 | float po_g, po_k; /* magnitude model coefficients */
|
---|
| 299 | float po_size; /* angular size, in arc seconds at 1 AU */
|
---|
| 300 | } ObjP;
|
---|
| 301 |
|
---|
| 302 | /* basic earth satellite object info */
|
---|
| 303 | typedef struct {
|
---|
| 304 | OBJ_COMMON_FLDS;
|
---|
| 305 | double eso_epoch; /* reference epoch, as an mjd */
|
---|
| 306 | double eso_n; /* mean motion, rev/day
|
---|
| 307 | * N.B. we need double due to a sensitive differencing
|
---|
| 308 | * operation used to compute MeanAnomaly in
|
---|
| 309 | * esat_main()/satellite.c.
|
---|
| 310 | */
|
---|
| 311 | float eso_startok; /* nominal first mjd this set is ok, else 0 */
|
---|
| 312 | float eso_endok; /* nominal last mjd this set is ok, else 0 */
|
---|
| 313 | float eso_inc; /* inclination, degs */
|
---|
| 314 | float eso_raan; /* RA of ascending node, degs */
|
---|
| 315 | float eso_e; /* eccentricity */
|
---|
| 316 | float eso_ap; /* argument of perigee at epoch, degs */
|
---|
| 317 | float eso_M; /* mean anomaly, ie, degrees from perigee at epoch */
|
---|
| 318 | float eso_decay; /* orbit decay rate, rev/day^2 */
|
---|
| 319 | float eso_drag; /* object drag coefficient, (earth radii)^-1 */
|
---|
| 320 | int eso_orbit; /* integer orbit number of epoch */
|
---|
| 321 |
|
---|
| 322 | /* computed "sky" results unique to earth satellites */
|
---|
| 323 | float ess_elev; /* height of satellite above sea level, m */
|
---|
| 324 | float ess_range; /* line-of-site distance from observer to satellite, m*/
|
---|
| 325 | float ess_rangev; /* rate-of-change of range, m/s */
|
---|
| 326 | float ess_sublat; /* latitude below satellite, >0 north, rads */
|
---|
| 327 | float ess_sublng; /* longitude below satellite, >0 east, rads */
|
---|
| 328 | int ess_eclipsed;/* 1 if satellite is in earth's shadow, else 0 */
|
---|
| 329 | } ObjES;
|
---|
| 330 |
|
---|
| 331 | typedef union {
|
---|
| 332 | ObjAny any; /* these fields valid for all types */
|
---|
| 333 | ObjSS anyss; /* these fields valid for all solar system types */
|
---|
| 334 | ObjPl pl; /* planet */
|
---|
| 335 | ObjF f; /* fixed object, plus proper motion */
|
---|
| 336 | ObjB b; /* bona fide binary stars (doubles are stored in f) */
|
---|
| 337 | ObjE e; /* object in heliocentric elliptical orbit */
|
---|
| 338 | ObjH h; /* object in heliocentric hyperbolic trajectory */
|
---|
| 339 | ObjP p; /* object in heliocentric parabolic trajectory */
|
---|
| 340 | ObjES es; /* earth satellite */
|
---|
| 341 | } Obj;
|
---|
| 342 |
|
---|
| 343 |
|
---|
| 344 | /* for o_flags -- everybody must agree */
|
---|
| 345 | #define FUSER0 0x01
|
---|
| 346 | #define FUSER1 0x02
|
---|
| 347 | #define FUSER2 0x04
|
---|
| 348 | #define FUSER3 0x08
|
---|
| 349 | #define FUSER4 0x10
|
---|
| 350 | #define FUSER5 0x20
|
---|
| 351 | #define FUSER6 0x40
|
---|
| 352 | #define FUSER7 0x80
|
---|
| 353 |
|
---|
| 354 | /* mark an object as being a "field star" */
|
---|
| 355 | #define FLDSTAR FUSER3
|
---|
| 356 | /* mark an object as circum calculation failed */
|
---|
| 357 | #define NOCIRCUM FUSER7
|
---|
| 358 |
|
---|
| 359 | /* Obj shorthands: */
|
---|
| 360 | #define o_type any.co_type
|
---|
| 361 | #define o_name any.co_name
|
---|
| 362 | #define o_flags any.co_flags
|
---|
| 363 | #define o_age any.co_age
|
---|
| 364 | #define s_ra any.co_ra
|
---|
| 365 | #define s_dec any.co_dec
|
---|
| 366 | #define s_gaera any.co_gaera
|
---|
| 367 | #define s_gaedec any.co_gaedec
|
---|
| 368 | #define s_az any.co_az
|
---|
| 369 | #define s_alt any.co_alt
|
---|
| 370 | #define s_elong any.co_elong
|
---|
| 371 | #define s_size any.co_size
|
---|
| 372 | #define s_mag any.co_mag
|
---|
| 373 |
|
---|
| 374 | #define s_sdist anyss.so_sdist
|
---|
| 375 | #define s_edist anyss.so_edist
|
---|
| 376 | #define s_hlong anyss.so_hlong
|
---|
| 377 | #define s_hlat anyss.so_hlat
|
---|
| 378 | #define s_phase anyss.so_phase
|
---|
| 379 |
|
---|
| 380 | #define s_elev es.ess_elev
|
---|
| 381 | #define s_range es.ess_range
|
---|
| 382 | #define s_rangev es.ess_rangev
|
---|
| 383 | #define s_sublat es.ess_sublat
|
---|
| 384 | #define s_sublng es.ess_sublng
|
---|
| 385 | #define s_eclipsed es.ess_eclipsed
|
---|
| 386 |
|
---|
| 387 | #define f_class f.fo_class
|
---|
| 388 | #define f_spect f.fo_spect
|
---|
| 389 | #define f_ratio f.fo_ratio
|
---|
| 390 | #define f_pa f.fo_pa
|
---|
| 391 | #define f_epoch f.fo_epoch
|
---|
| 392 | #define f_RA f.fo_ra
|
---|
| 393 | #define f_pmRA f.fo_pmra
|
---|
| 394 | #define f_dec f.fo_dec
|
---|
| 395 | #define f_pmdec f.fo_pmdec
|
---|
| 396 | #define f_mag f.fo_mag
|
---|
| 397 | #define f_size f.fo_size
|
---|
| 398 |
|
---|
| 399 | #define e_cepoch e.eo_cepoch
|
---|
| 400 | #define e_epoch e.eo_epoch
|
---|
| 401 | #define e_startok e.eo_startok
|
---|
| 402 | #define e_endok e.eo_endok
|
---|
| 403 | #define e_inc e.eo_inc
|
---|
| 404 | #define e_Om e.eo_Om
|
---|
| 405 | #define e_om e.eo_om
|
---|
| 406 | #define e_a e.eo_a
|
---|
| 407 | #define e_e e.eo_e
|
---|
| 408 | #define e_M e.eo_M
|
---|
| 409 | #define e_size e.eo_size
|
---|
| 410 | #define e_mag e.eo_mag
|
---|
| 411 |
|
---|
| 412 | #define h_epoch h.ho_epoch
|
---|
| 413 | #define h_startok h.ho_startok
|
---|
| 414 | #define h_endok h.ho_endok
|
---|
| 415 | #define h_ep h.ho_ep
|
---|
| 416 | #define h_inc h.ho_inc
|
---|
| 417 | #define h_Om h.ho_Om
|
---|
| 418 | #define h_om h.ho_om
|
---|
| 419 | #define h_e h.ho_e
|
---|
| 420 | #define h_qp h.ho_qp
|
---|
| 421 | #define h_g h.ho_g
|
---|
| 422 | #define h_k h.ho_k
|
---|
| 423 | #define h_size h.ho_size
|
---|
| 424 |
|
---|
| 425 | #define p_epoch p.po_epoch
|
---|
| 426 | #define p_startok p.po_startok
|
---|
| 427 | #define p_endok p.po_endok
|
---|
| 428 | #define p_ep p.po_ep
|
---|
| 429 | #define p_inc p.po_inc
|
---|
| 430 | #define p_qp p.po_qp
|
---|
| 431 | #define p_om p.po_om
|
---|
| 432 | #define p_Om p.po_Om
|
---|
| 433 | #define p_g p.po_g
|
---|
| 434 | #define p_k p.po_k
|
---|
| 435 | #define p_size p.po_size
|
---|
| 436 |
|
---|
| 437 | #define es_epoch es.eso_epoch
|
---|
| 438 | #define es_startok es.eso_startok
|
---|
| 439 | #define es_endok es.eso_endok
|
---|
| 440 | #define es_inc es.eso_inc
|
---|
| 441 | #define es_raan es.eso_raan
|
---|
| 442 | #define es_e es.eso_e
|
---|
| 443 | #define es_ap es.eso_ap
|
---|
| 444 | #define es_M es.eso_M
|
---|
| 445 | #define es_n es.eso_n
|
---|
| 446 | #define es_decay es.eso_decay
|
---|
| 447 | #define es_drag es.eso_drag
|
---|
| 448 | #define es_orbit es.eso_orbit
|
---|
| 449 |
|
---|
| 450 | #define pl_code pl.plo_code
|
---|
| 451 | #define pl_moon pl.plo_moon
|
---|
| 452 | #define pl_evis pl.plo_evis
|
---|
| 453 | #define pl_svis pl.plo_svis
|
---|
| 454 | #define pl_x pl.plo_x
|
---|
| 455 | #define pl_y pl.plo_y
|
---|
| 456 | #define pl_z pl.plo_z
|
---|
| 457 | #define pl_aux1 pl.plo_aux1
|
---|
| 458 | #define pl_aux2 pl.plo_aux2
|
---|
| 459 |
|
---|
| 460 | #define b_2compute b.b_2compute
|
---|
| 461 | #define b_2spect b.b_2spect
|
---|
| 462 | #define b_2mag b.b_2mag
|
---|
| 463 | #define b_bo b.u.b_bo
|
---|
| 464 | #define b_bp b.u.b_bp
|
---|
| 465 | #define b_nbp b.b_nbp
|
---|
| 466 |
|
---|
| 467 | /* insure we always refer to the fields and no monkey business */
|
---|
| 468 | #undef OBJ_COMMON_FLDS
|
---|
| 469 | #undef OBJ_SOLSYS_FLDS
|
---|
| 470 |
|
---|
| 471 | /* o_type code.
|
---|
| 472 | * N.B. names are assigned in order in objmenu.c
|
---|
| 473 | * N.B. if add one add switch in obj_cir().
|
---|
| 474 | * N.B. UNDEFOBJ must be zero so new objects are undefinied by being zeroed.
|
---|
| 475 | * N.B. maintain the bitmasks too.
|
---|
| 476 | */
|
---|
| 477 | enum ObjType {
|
---|
| 478 | UNDEFOBJ=0,
|
---|
| 479 | FIXED, BINARYSTAR, ELLIPTICAL, HYPERBOLIC, PARABOLIC, EARTHSAT, PLANET,
|
---|
| 480 | NOBJTYPES
|
---|
| 481 | };
|
---|
| 482 |
|
---|
| 483 | /* types as handy bitmasks too */
|
---|
| 484 | #define OBJTYPE2MASK(t) (1<<(t))
|
---|
| 485 | #define FIXEDM OBJTYPE2MASK(FIXED)
|
---|
| 486 | #define BINARYSTARM OBJTYPE2MASK(BINARYSTAR)
|
---|
| 487 | #define ELLIPTICALM OBJTYPE2MASK(ELLIPTICAL)
|
---|
| 488 | #define HYPERBOLICM OBJTYPE2MASK(HYPERBOLIC)
|
---|
| 489 | #define PARABOLICM OBJTYPE2MASK(PARABOLIC)
|
---|
| 490 | #define EARTHSATM OBJTYPE2MASK(EARTHSAT)
|
---|
| 491 | #define PLANETM OBJTYPE2MASK(PLANET)
|
---|
| 492 | #define ALLM (~0)
|
---|
| 493 |
|
---|
| 494 | /* rise, set and transit information.
|
---|
| 495 | */
|
---|
| 496 | typedef struct {
|
---|
| 497 | int rs_flags; /* info about what has been computed and any
|
---|
| 498 | * special conditions; see flags, below.
|
---|
| 499 | */
|
---|
| 500 | double rs_risetm; /* mjd time of rise today */
|
---|
| 501 | double rs_riseaz; /* azimuth of rise, rads E of N */
|
---|
| 502 | double rs_trantm; /* mjd time of transit today */
|
---|
| 503 | double rs_tranalt; /* altitude of transit, rads up from horizon */
|
---|
| 504 | double rs_settm; /* mjd time of set today */
|
---|
| 505 | double rs_setaz; /* azimuth of set, rads E of N */
|
---|
| 506 | } RiseSet;
|
---|
| 507 |
|
---|
| 508 | /* RiseSet flags */
|
---|
| 509 | #define RS_NORISE 0x0001 /* object does not rise as such today */
|
---|
| 510 | #define RS_NOSET 0x0002 /* object does not set as such today */
|
---|
| 511 | #define RS_NOTRANS 0x0004 /* object does not transit as such today */
|
---|
| 512 | #define RS_CIRCUMPOLAR 0x0010 /* object stays up all day today */
|
---|
| 513 | #define RS_NEVERUP 0x0020 /* object never up at all today */
|
---|
| 514 | #define RS_ERROR 0x1000 /* can't figure out anything! */
|
---|
| 515 | #define RS_RISERR (0x0100|RS_ERROR) /* error computing rise */
|
---|
| 516 | #define RS_SETERR (0x0200|RS_ERROR) /* error computing set */
|
---|
| 517 | #define RS_TRANSERR (0x0400|RS_ERROR) /* error computing transit */
|
---|
| 518 |
|
---|
| 519 | #define is_type(op,m) (OBJTYPE2MASK((op)->o_type) & (m))
|
---|
| 520 |
|
---|
| 521 | /* any planet or its moons */
|
---|
| 522 | #define is_planet(op,p) (is_type(op,PLANETM) && op->pl_code == (p))
|
---|
| 523 |
|
---|
| 524 | /* any solar system object */
|
---|
| 525 | #define is_ssobj(op) is_type(op,PLANETM|HYPERBOLICM|PARABOLICM|ELLIPTICALM)
|
---|
| 526 |
|
---|
[1457] | 527 | |
---|
[2551] | 528 |
|
---|
| 529 | /* natural satellite support */
|
---|
| 530 |
|
---|
| 531 | typedef struct {
|
---|
| 532 | char *full; /* full name */
|
---|
[2643] | 533 | char *tag; /* Roman numeral tag */
|
---|
| 534 | float x, y, z; /* sky loc in planet radii: +x:east +y:south +z:front */
|
---|
| 535 | float ra, dec; /* sky location in ra/dec */
|
---|
[2551] | 536 | float mag; /* magnitude */
|
---|
| 537 | int evis; /* whether geometrically visible from earth */
|
---|
[2643] | 538 | int svis; /* whether in sun light */
|
---|
| 539 | int pshad; /* whether moon is casting shadow on planet */
|
---|
| 540 | int trans; /* whether moon is transiting */
|
---|
[2551] | 541 | float sx, sy; /* shadow sky loc in planet radii: +x:east +y:south */
|
---|
| 542 | } MoonData;
|
---|
| 543 |
|
---|
| 544 | /* separate set for each planet -- use in pl_moon */
|
---|
| 545 |
|
---|
| 546 |
|
---|
| 547 | enum _marsmoons {
|
---|
| 548 | M_MARS = 0, /* == X_PLANET */
|
---|
| 549 | M_PHOBOS, M_DEIMOS,
|
---|
| 550 | M_NMOONS /* including planet at 0 */
|
---|
| 551 | };
|
---|
| 552 |
|
---|
| 553 | enum _jupmoons {
|
---|
| 554 | J_JUPITER = 0, /* == X_PLANET */
|
---|
| 555 | J_IO, J_EUROPA, J_GANYMEDE, J_CALLISTO,
|
---|
| 556 | J_NMOONS /* including planet */
|
---|
| 557 | };
|
---|
| 558 |
|
---|
| 559 | enum _satmoons {
|
---|
| 560 | S_SATURN = 0, /* == X_PLANET */
|
---|
| 561 | S_MIMAS, S_ENCELADUS, S_TETHYS, S_DIONE,
|
---|
| 562 | S_RHEA, S_TITAN, S_HYPERION, S_IAPETUS,
|
---|
| 563 | S_NMOONS /* including planet */
|
---|
| 564 | };
|
---|
| 565 |
|
---|
| 566 | enum _uramoons {
|
---|
| 567 | U_URANUS = 0, /* == X_PLANET */
|
---|
| 568 | U_ARIEL, U_UMBRIEL, U_TITANIA, U_OBERON, U_MIRANDA,
|
---|
| 569 | U_NMOONS /* including planet */
|
---|
| 570 | };
|
---|
| 571 |
|
---|
| 572 | #define X_MAXNMOONS S_NMOONS /* N.B. chosen by hand */
|
---|
| 573 |
|
---|
[1457] | 574 | |
---|
| 575 |
|
---|
[2551] | 576 | /* global function declarations */
|
---|
[1457] | 577 |
|
---|
[2551] | 578 |
|
---|
| 579 | /* aa_hadec.c */
|
---|
| 580 | extern void aa_hadec (double lt, double alt, double az, double *ha,
|
---|
| 581 | double *dec);
|
---|
[1457] | 582 | extern void hadec_aa (double lt, double ha, double dec, double *alt,
|
---|
| 583 | double *az);
|
---|
[2551] | 584 |
|
---|
| 585 | /* aberration.c */
|
---|
[1457] | 586 | extern void ab_ecl (double m, double lsn, double *lam, double *bet);
|
---|
| 587 | extern void ab_eq (double m, double lsn, double *ra, double *dec);
|
---|
[2551] | 588 |
|
---|
[1457] | 589 | /* airmass.c */
|
---|
| 590 | extern void airmass (double aa, double *Xp);
|
---|
[2551] | 591 |
|
---|
[1457] | 592 | /* anomaly.c */
|
---|
[2551] | 593 | extern void anomaly (double ma, double s, double *nu, double *ea);
|
---|
| 594 |
|
---|
| 595 | /* ap_as.c */
|
---|
| 596 | extern void ap_as ( Now *np, double Mjd, double *rap, double *decp);
|
---|
| 597 | extern void as_ap ( Now *np, double Mjd, double *rap, double *decp);
|
---|
| 598 |
|
---|
| 599 | /* atlas.c */
|
---|
| 600 | extern char *um_atlas (double ra, double dec);
|
---|
| 601 | extern char *u2k_atlas (double ra, double dec);
|
---|
| 602 | extern char *msa_atlas (double ra, double dec);
|
---|
| 603 |
|
---|
| 604 | /* aux.c */
|
---|
[1457] | 605 | extern double mm_mjed (Now *np);
|
---|
[2551] | 606 |
|
---|
[1457] | 607 | /* chap95.c */
|
---|
| 608 | extern int chap95 (double m, int obj, double prec, double *ret);
|
---|
| 609 |
|
---|
[2551] | 610 | /* chap95_data.c */
|
---|
| 611 |
|
---|
| 612 | /* circum.c */
|
---|
[1457] | 613 | extern int obj_cir (Now *np, Obj *op);
|
---|
[2551] | 614 |
|
---|
[1457] | 615 | /* comet.c */
|
---|
[2551] | 616 | extern void comet (double m, double ep, double inc, double ap, double qp,
|
---|
[1457] | 617 | double om, double *lpd, double *psi, double *rp, double *rho, double *lam,
|
---|
[2551] | 618 | double *bet);
|
---|
| 619 |
|
---|
| 620 | /* constel.c */
|
---|
| 621 | #define NCNS 89
|
---|
| 622 | extern int cns_pick (double r, double d, double e);
|
---|
| 623 | extern int cns_id (char *abbrev);
|
---|
| 624 | extern char *cns_name (int id);
|
---|
| 625 | extern int cns_edges (double e, double **ra0p, double **dec0p, double **ra1p,
|
---|
| 626 | double **dec1p);
|
---|
| 627 | extern int cns_list (double ra, double dec, double e, double rad, int ids[]);
|
---|
| 628 | extern int cns_figure (int id, double e, double ra[],double dec[],int dcodes[]);
|
---|
| 629 | extern int cns_reyfigure (int id, double e, double ra[], double dec[],
|
---|
| 630 | int dcodes[]);
|
---|
| 631 |
|
---|
| 632 | /* dbfmt.c */
|
---|
| 633 | extern int db_crack_line (char s[], Obj *op, char nm[][MAXNM], int nnm,
|
---|
| 634 | char whynot[]);
|
---|
| 635 | extern void db_write_line (Obj *op, char *lp);
|
---|
| 636 | extern int dbline_candidate (char line[]);
|
---|
| 637 | extern int get_fields (char *s, int delim, char *fields[]);
|
---|
| 638 | extern int db_tle (char *name, char *l1, char *l2, Obj *op);
|
---|
[1457] | 639 | extern int dateRangeOK (Now *np, Obj *op);
|
---|
[2551] | 640 |
|
---|
[1457] | 641 | /* deltat.c */
|
---|
[2551] | 642 | extern double deltat (double m);
|
---|
| 643 |
|
---|
| 644 | /* earthsat.c */
|
---|
[1457] | 645 | extern int obj_earthsat (Now *np, Obj *op);
|
---|
[2551] | 646 |
|
---|
| 647 | /* eq_ecl.c */
|
---|
[1457] | 648 | extern void eq_ecl (double m, double ra, double dec, double *lt,double *lg);
|
---|
| 649 | extern void ecl_eq (double m, double lt, double lg, double *ra,double *dec);
|
---|
[2551] | 650 |
|
---|
| 651 | /* eq_gal.c */
|
---|
[1457] | 652 | extern void eq_gal (double m, double ra, double dec, double *lt,double *lg);
|
---|
| 653 | extern void gal_eq (double m, double lt, double lg, double *ra,double *dec);
|
---|
[2551] | 654 |
|
---|
| 655 | /* formats.c */
|
---|
| 656 | extern int fs_sexa (char *out, double a, int w, int fracbase);
|
---|
| 657 | extern int fs_date (char out[], double jd);
|
---|
[1457] | 658 | extern int f_scansexa (const char *str, double *dp);
|
---|
| 659 | extern void f_sscandate (char *bp, int pref, int *m, double *d, int *y);
|
---|
[2551] | 660 |
|
---|
[1457] | 661 | /* helio.c */
|
---|
[2551] | 662 | extern void heliocorr (double jd, double ra, double dec, double *hcp);
|
---|
[2643] | 663 |
|
---|
| 664 | /* jupmoon.c */
|
---|
| 665 | extern void jupiter_data (double Mjd, char dir[], Obj *sop, Obj *jop,
|
---|
[2551] | 666 | double *jupsize, double *cmlI, double *cmlII, double *polera,
|
---|
[1457] | 667 | double *poledec, MoonData md[J_NMOONS]);
|
---|
[2551] | 668 |
|
---|
[1457] | 669 | /* libration.c */
|
---|
[2551] | 670 | extern void llibration (double JD, double *llatp, double *llonp);
|
---|
| 671 |
|
---|
| 672 | /* magdecl.c */
|
---|
| 673 | extern int magdecl (double l, double L, double e, double y, char *dir,
|
---|
| 674 | double *dp, char *err);
|
---|
[2643] | 675 |
|
---|
| 676 | /* marsmoon.c */
|
---|
[2551] | 677 | extern void marsm_data (double Mjd, char dir[], Obj *sop, Obj *mop,
|
---|
[1457] | 678 | double *marssize, double *polera, double *poledec, MoonData md[M_NMOONS]);
|
---|
[2551] | 679 |
|
---|
| 680 | /* misc.c */
|
---|
| 681 | extern void zero_mem (void *loc, unsigned len);
|
---|
| 682 | extern int tickmarks (double min, double max, int numdiv, double ticks[]);
|
---|
| 683 | extern int lc (int cx, int cy, int cw, int x1, int y1, int x2, int y2,
|
---|
| 684 | int *sx1, int *sy1, int *sx2, int *sy2);
|
---|
| 685 | extern void hg_mag (double h, double g, double rp, double rho, double rsn,
|
---|
| 686 | double *mp);
|
---|
| 687 | extern int magdiam (int fmag, int magstp, double scale, double mag,
|
---|
| 688 | double size);
|
---|
| 689 | extern void gk_mag (double g, double k, double rp, double rho, double *mp);
|
---|
| 690 | extern double atod (char *buf);
|
---|
| 691 | extern void solve_sphere (double A, double b, double cc, double sc,
|
---|
| 692 | double *cap, double *Bp);
|
---|
| 693 | extern double delra (double dra);
|
---|
| 694 | extern void now_lst (Now *np, double *lstp);
|
---|
| 695 | extern void radec2ha (Now *np, double ra, double dec, double *hap);
|
---|
[1457] | 696 | extern char *obj_description (Obj *op);
|
---|
| 697 | extern int is_deepsky (Obj *op);
|
---|
[2551] | 698 |
|
---|
| 699 | /* mjd.c */
|
---|
| 700 | extern void cal_mjd (int mn, double dy, int yr, double *m);
|
---|
| 701 | extern void mjd_cal (double m, int *mn, double *dy, int *yr);
|
---|
| 702 | extern int mjd_dow (double m, int *dow);
|
---|
| 703 | extern int isleapyear (int year);
|
---|
| 704 | extern void mjd_dpm (double m, int *ndays);
|
---|
| 705 | extern void mjd_year (double m, double *yr);
|
---|
| 706 | extern void year_mjd (double y, double *m);
|
---|
| 707 | extern void rnd_second (double *t);
|
---|
| 708 | extern void mjd_dayno (double jd, int *yr, double *dy);
|
---|
| 709 | extern double mjd_day (double jd);
|
---|
| 710 | extern double mjd_hr (double jd);
|
---|
[1457] | 711 | extern void range (double *v, double r);
|
---|
| 712 | extern void radecrange (double *ra, double *dec);
|
---|
[2551] | 713 |
|
---|
| 714 | /* moon.c */
|
---|
[1457] | 715 | extern void moon (double m, double *lam, double *bet, double *rho,
|
---|
| 716 | double *msp, double *mdp);
|
---|
[2551] | 717 |
|
---|
| 718 | /* mooncolong.c */
|
---|
[1457] | 719 | extern void moon_colong (double jd, double lt, double lg, double *cp,
|
---|
[2551] | 720 | double *kp, double *ap, double *sp);
|
---|
| 721 |
|
---|
| 722 | /* moonnf.c */
|
---|
[1457] | 723 | extern void moonnf (double mj, double *mjn, double *mjf);
|
---|
[2551] | 724 |
|
---|
| 725 | /* nutation.c */
|
---|
[1457] | 726 | extern void nutation (double m, double *deps, double *dpsi);
|
---|
| 727 | extern void nut_eq (double m, double *ra, double *dec);
|
---|
[2551] | 728 |
|
---|
[1457] | 729 | /* obliq.c */
|
---|
| 730 | extern void obliquity (double m, double *eps);
|
---|
[2551] | 731 |
|
---|
| 732 | /* parallax.c */
|
---|
[1457] | 733 | extern void ta_par (double tha, double tdec, double phi, double ht,
|
---|
[2551] | 734 | double *rho, double *aha, double *adec);
|
---|
| 735 |
|
---|
| 736 | /* parallactic.c */
|
---|
| 737 | extern double parallacticLDA (double lt, double dec, double alt);
|
---|
[1457] | 738 | extern double parallacticLHD (double lt, double ha, double dec);
|
---|
[2551] | 739 |
|
---|
[1457] | 740 | /* plans.c */
|
---|
[2551] | 741 | extern void plans (double m, PLCode p, double *lpd0, double *psi0,
|
---|
[1457] | 742 | double *rp0, double *rho0, double *lam, double *bet, double *dia,
|
---|
[2551] | 743 | double *mag);
|
---|
[2643] | 744 |
|
---|
| 745 | /* plshadow.c */
|
---|
[2551] | 746 | extern int plshadow (Obj *op, Obj *sop, double polera,
|
---|
| 747 | double poledec, double x, double y, double z, float *sxp, float *syp);
|
---|
| 748 |
|
---|
| 749 | /* plmoon_cir.c */
|
---|
| 750 | extern int plmoon_cir (Now *np, Obj *moonop);
|
---|
| 751 | extern int getBuiltInObjs (Obj **opp);
|
---|
[1457] | 752 | extern void setMoonDir (char *dir);
|
---|
[2551] | 753 |
|
---|
[1457] | 754 | /* precess.c */
|
---|
| 755 | extern void precess (double mjd1, double mjd2, double *ra, double *dec);
|
---|
[2551] | 756 |
|
---|
| 757 | /* reduce.c */
|
---|
[1457] | 758 | extern void reduce_elements (double mjd0, double m, double inc0,
|
---|
| 759 | double ap0, double om0, double *inc, double *ap, double *om);
|
---|
[2551] | 760 |
|
---|
| 761 | /* refract.c */
|
---|
[1457] | 762 | extern void unrefract (double pr, double tr, double aa, double *ta);
|
---|
[1719] | 763 | extern void refract (double pr, double tr, double ta, double *aa);
|
---|
[2551] | 764 |
|
---|
| 765 | /* rings.c */
|
---|
[1719] | 766 | extern void satrings (double sb, double sl, double sr, double el, double er,
|
---|
[1457] | 767 | double JD, double *etiltp, double *stiltp);
|
---|
[2551] | 768 |
|
---|
| 769 | /* riset.c */
|
---|
[1457] | 770 | extern void riset (double ra, double dec, double lt, double dis,
|
---|
[2551] | 771 | double *lstr, double *lsts, double *azr, double *azs, int *status);
|
---|
| 772 |
|
---|
| 773 | /* riset_cir.c */
|
---|
| 774 | extern void riset_cir (Now *np, Obj *op, double dis, RiseSet *rp);
|
---|
| 775 | extern void twilight_cir (Now *np, double dis, double *dawn, double *dusk,
|
---|
| 776 | int *status);
|
---|
| 777 |
|
---|
[2643] | 778 | /* satmoon.c */
|
---|
| 779 | extern void saturn_data (double Mjd, char dir[], Obj *eop, Obj *sop,
|
---|
[2551] | 780 | double *satsize, double *etilt, double *stlit, double *polera,
|
---|
[1457] | 781 | double *poledec, MoonData md[S_NMOONS]);
|
---|
[2551] | 782 |
|
---|
| 783 | /* sphcart.c */
|
---|
| 784 | extern void sphcart (double l, double b, double r, double *x, double *y,
|
---|
| 785 | double *z);
|
---|
[1457] | 786 | extern void cartsph (double x, double y, double z, double *l, double *b,
|
---|
| 787 | double *r);
|
---|
[2551] | 788 |
|
---|
[1457] | 789 | /* sun.c */
|
---|
[1719] | 790 | extern void sunpos (double m, double *lsn, double *rsn, double *bsn);
|
---|
[2551] | 791 |
|
---|
[1719] | 792 | /* twobody.c */
|
---|
[2551] | 793 | extern int vrc (double *v, double *r, double tp, double e, double q);
|
---|
[2643] | 794 |
|
---|
| 795 | /* umoon.c */
|
---|
[2551] | 796 | extern void uranus_data (double Mjd, char dir[], Obj *sop, Obj *uop,
|
---|
[1457] | 797 | double *usize, double *polera, double *poledec, MoonData md[U_NMOONS]);
|
---|
[2551] | 798 |
|
---|
| 799 | /* utc_gst.c */
|
---|
[1457] | 800 | extern void utc_gst (double m, double utc, double *gst);
|
---|
| 801 | extern void gst_utc (double m, double gst, double *utc);
|
---|
[2551] | 802 |
|
---|
[1457] | 803 | /* vsop87.c */
|
---|
[2551] | 804 | extern int vsop87 (double m, int obj, double prec, double *ret);
|
---|
| 805 |
|
---|
[1457] | 806 | #endif /* _ASTRO_H */
|
---|
[2643] | 807 |
|
---|
[1457] | 808 | /* For RCS Only -- Do Not Edit
|
---|
| 809 | * @(#) $RCSfile: astro.h,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
|
---|
| 810 | */
|
---|