From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- noao/astutil/asttools/astgaltoeq.x | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 noao/astutil/asttools/astgaltoeq.x (limited to 'noao/astutil/asttools/astgaltoeq.x') diff --git a/noao/astutil/asttools/astgaltoeq.x b/noao/astutil/asttools/astgaltoeq.x new file mode 100644 index 00000000..94f7861d --- /dev/null +++ b/noao/astutil/asttools/astgaltoeq.x @@ -0,0 +1,37 @@ +include + +# Definition of system +define LP 123.00d0 # Longtitude of pole +define BP 27.40d0 # Latitude of pole +define LO 97.7422d0 # Longitude of origin +define BO -60.1810d0 # Latitude of origin +define GEPOCH 1950.0d0 # Epoch of definition + +# AST_GALTOEQ -- Convert galactic coordinates (1950) to equatorial coordinates. + +procedure ast_galtoeq (lii, bii, ra, dec, epoch) + +double lii # Galactic longitude (degrees) +double bii # Galactic latitude (degrees) +double ra # Right ascension (hours) +double dec # Declination (degrees) +double epoch # Epoch of coordinates + +double ao, bo, ap, bp, a1, b1, a2, b2 + +begin + ao = DEGTORAD (LO) + bo = DEGTORAD (BO) + ap = DEGTORAD (LP) + bp = DEGTORAD (BP) + a1 = DEGTORAD (lii) + b1 = DEGTORAD (bii) + + call ast_coord (ao, bo, ap, bp, a1, b1, a2, b2) + + a2 = mod (24.0d0 + RADTODEG(a2) / 15.0d0, 24.0d0) + b2 = RADTODEG (b2) + + # Precess the coordinates + call ast_precess (a2, b2, GEPOCH, ra, dec, epoch) +end -- cgit