Esempio n. 1
0
 def testFmtDelta(self):
     """tpm.fmt_delta() => convert radians into declination string."""
     self.assertEqual(tpm.fmt_delta(tpm.M_PI), "+00D 00\' 00.000\"")
     self.assertEqual(tpm.fmt_delta(tpm.M_PI / 2.0), "+90D 00\' 00.000\"")
     self.assertEqual(tpm.fmt_delta(tpm.M_PI * 1.2345),
                      "-42D 12\' 35.999\"")
Esempio n. 2
0
 def testFmtDelta(self):
     """tpm.fmt_delta() => convert radians into declination string."""
     self.assertEqual(tpm.fmt_delta(tpm.M_PI), "+00D 00\' 00.000\"")
     self.assertEqual(tpm.fmt_delta(tpm.M_PI/2.0), "+90D 00\' 00.000\"")
     self.assertEqual(tpm.fmt_delta(tpm.M_PI*1.2345), "-42D 12\' 35.999\"")
Esempio n. 3
0
    tstate.utc = tpm.J2000
    tstate.lon = tpm.d2r(-111.598333)
    tstate.lat = tpm.d2r(31.956389)
    tstate.alt = 2093.093
    tstate.delta_ut = tpm.delta_UT(tstate.utc)
    tpm.tpm_data(tstate, tpm.TPM_ALL)

    v6 = tpm.V6S()
    v6.r = 1e9
    v6.alpha = ra
    v6.delta = de
    

    pvec[s1] = v6.s2c()
    s2 = i
    tpm.tpm(pvec, s1, s2, ep, eq, tstate)
    v6 = pvec[s2].c2s()

    ra1 = v6.alpha
    de1 = v6.delta
    ra1_d = tpm.r2d(ra1)
    if ra1_d < 0.0 : ra1_d += 360.0
    de1_d = tpm.r2d(de1)
    if de1_d < 0.0 : de1_d += 360.0

    s = "{0:02d}-{1:02d} {2:<17s} {3:s} {4:s} {5:8.4f} {6:8.4f}"
    print s.format(s1, s2, tpm.tpm_state(s2),
                   tpm.fmt_alpha(ra1), tpm.fmt_delta(de1), ra1_d,
                   de1_d)