Changeset 7964
- Timestamp:
- Jul 24, 2006, 3:17:36 PM (20 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 1 added
- 4 edited
-
libohana/include/ohana.h (modified) (1 diff)
-
libohana/src/time.c (modified) (1 diff)
-
opihi/cmd.astro/Makefile (modified) (1 diff)
-
opihi/cmd.astro/getlst.c (added)
-
opihi/cmd.astro/init.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libohana/include/ohana.h
r7929 r7964 156 156 double sec_to_mjd PROTO((time_t second)); 157 157 time_t mjd_to_sec PROTO((double mjd)); 158 double ohana_lst PROTO((double jd, double longitude)); 158 159 159 160 int hstgsc_hms_to_deg PROTO((double *h0, double *h1, double *d0, double *d1, char *string)); -
trunk/Ohana/src/libohana/src/time.c
r6683 r7964 395 395 * 99:02:15:12h23m30s 396 396 */ 397 398 399 /* returns the local MEAN sidereal time (dec hrs) at julian date jd 400 at west longitude long (decimal hours). Follows 401 definitions in 1992 Astronomical Almanac, pp. B7 and L2. 402 Expression for GMST at 0h ut referenced to Aoki et al, A&A 105, 403 p.359, 1982. On workstations, accuracy (numerical only!) 404 is about a millisecond in the 1990s. 405 EAM: function from skycalc (thorstensen) 406 */ 407 #define J2000 2451545. /* Julian date at standard epoch */ 408 #define SEC_IN_DAY 86400. 409 410 double ohana_lst (double jd, double longitude) { 411 412 double t, ut, jdmid, jdint, jdfrac, sid_g, sid; 413 long sid_int; 414 415 jdint = (int) jd; 416 jdfrac = jd - jdint; 417 418 if (jdfrac < 0.5) { 419 jdmid = jdint - 0.5; 420 ut = jdfrac + 0.5; 421 } else { 422 jdmid = jdint + 0.5; 423 ut = jdfrac - 0.5; 424 } 425 426 t = (jdmid - J2000)/36525; 427 sid_g = (24110.54841+8640184.812866*t+0.093104*t*t-6.2e-6*t*t*t)/SEC_IN_DAY; 428 sid_int = sid_g; 429 sid_g = sid_g - (double) sid_int; 430 sid_g = sid_g + 1.0027379093 * ut - longitude/24.; 431 sid_int = sid_g; 432 sid_g = (sid_g - (double) sid_int) * 24.; 433 if (sid_g < 0.) sid_g = sid_g + 24.; 434 return (sid_g); 435 } -
trunk/Ohana/src/opihi/cmd.astro/Makefile
r6642 r7964 33 33 $(SDIR)/gauss.$(ARCH).o \ 34 34 $(SDIR)/getvel.$(ARCH).o \ 35 $(SDIR)/getlst.$(ARCH).o \ 35 36 $(SDIR)/medianmap.$(ARCH).o \ 36 37 $(SDIR)/mkgauss.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.astro/init.c
r6642 r7964 15 15 int gaussfit PROTO((int, char **)); 16 16 int getvel PROTO((int, char **)); 17 int getlst PROTO((int, char **)); 17 18 int imfit PROTO((int, char **)); 18 19 int imsub PROTO((int, char **)); … … 48 49 {"gauss", gauss, "get statistics on a star, assuming gaussian profile"}, 49 50 {"getvel", getvel, "rotcurve to velocities"}, 51 {"getlst", getlst, "return LST given time and longitude"}, 50 52 {"imfit", imfit, "fit function"}, 51 53 {"imsub", imsub, "subtract function"},
Note:
See TracChangeset
for help on using the changeset viewer.
