Esempio n. 1
0
 def getDegFromDMS(self, dmsstr):
     """Get the degrees from a DD:MM:SS.ss format string"""
     dmsstr = "%sd%sm%ss"%tuple(dmsstr.split(":"))
     dms = positions.parsehmsdms(dmsstr)[0][0]
     if dmsstr.startswith("-"):
         # check if negative - positions module doesn't take into account
         dms = -1 * dms
     return dms
Esempio n. 2
0
 def getDegFromHMS(self, hmsstr):
     """Get the degrees from a HH:MM:SS.ss format string"""
     hmsstr = "%sh%sm%ss"%tuple(hmsstr.split(":"))
     hms = positions.parsehmsdms(hmsstr)[0][0]
     if hmsstr.startswith("-"):
         # check if negative - positions module doesn't take into account
         hms = -1 * hms
     return hms