Esempio n. 1
0
 def _incrementRa(self, ra, speed, sign):
     ra = astronomy.getHours(ra)
     if speed == 1:
         ra = astronomy.getHours(ra + astronomy.RA_SECOND * sign)
     if speed == 2:
         ra = astronomy.getHours(ra + astronomy.RA_MINUTE * sign)
     if speed == 3:
         ra = astronomy.getHours(ra + astronomy.RA_HOUR * sign)
     if ra > astronomy.normRa(ra) or ra < astronomy.normRa(ra):
         ra = astronomy.normRa(ra)
     return str(ra)
Esempio n. 2
0
    def getCurrentPosition(self):
        """ Returns current telescope position in radians """
        #TODO ask Ivan ra = self._readCoordinate(self._axes['ra_cur'])
        raw_ra = self._readCoordinate(self._axes['st_task']) - self.getCurrentHourAngle()
        ra = normRa(ephem.hours(raw_ra))
#        print("orig: "+str(raw_ra)+" norm: "+str(ra.real))
        dec = self._readCoordinate(self._axes['dec_cur'])
        return ra.real, dec