def act_pos(self, ra, dec):
		(ra_p, dec_p, ra_s, dec_s) = coords.rad_2_stellarium_protocol(ra, dec)
		
		#print 'Received RA: ', ra_s, 'Received DEC: ', dec_s 
		f=open('testfile','w')
		(az_conv, alt_conv) = alt_az(ra_s, dec_s)		
				
		#print 'Converted AZ: ', az_conv, 'Converted ALT: ', alt_conv 
		f.write(str(az_conv)+'\n')
		f.write(str(alt_conv)+'\n')
		f.close
		f=open('testfile','r')		
		while 1:				
			line=f.readline()
			if not line:
				break			
			ser.write(line)			
			print(line)
			
		f.close
		

		#sending AZ, ALT to Arduino
		#(az_send, alt_send) = strtochr(az_conv, alt_conv)		
		#ser.write(az_send)
		#sleep(2)
		#ser.write(alt_send)
		
		times = 10 #Number of times that Stellarium expects to receive new coords //Absolutly empiric..
		for i in range(times):
			self.move(ra_p, dec_p)
Ejemplo n.º 2
0
    def act_pos(self, ra, dec):
        (ra_p, dec_p) = coords.rad_2_stellarium_protocol(float(ra), float(dec))

        # Number of times that Stellarium expects to receive new coords
        # //Absolutly empiric..
        times = 10
        for i in range(times):
            self.move(ra_p, dec_p)
    def act_pos(self, ra, dec):

        # Manu
        print "Manu: this is where I would give stellarium the actual current position of the motors!"
        (ra_p, dec_p) = coords.rad_2_stellarium_protocol(ra, dec)

        times = 10  #Number of times that Stellarium expects to receive new coords //Absolutely empirical..
        for i in range(times):
            self.move(ra_p, dec_p)
Ejemplo n.º 4
0
    def act_pos(self, ra, dec):
        (ra_p, dec_p) = coords.rad_2_stellarium_protocol(ra, dec)
        msize = '0x1800'
        mtype = '0x0000'
        localtime = ConstBitStream(str.replace('int:64=%r' % time(), '.', ''))
        #print "move: (%d, %d)" % (ra, dec)

        sdata = ConstBitStream(msize) + ConstBitStream(mtype)
        sdata += ConstBitStream(intle=localtime.intle,
                                length=64) + ConstBitStream(uintle=ra_p,
                                                            length=32)
        sdata += ConstBitStream(intle=dec_p, length=32) + ConstBitStream(
            intle=0, length=32)
        return sdata
Ejemplo n.º 5
0
 def act_pos(self, ra, dec):
     (ra_p, dec_p) = coords.rad_2_stellarium_protocol(ra, dec)
     
     for i in range(10):
         self.move(ra_p, dec_p)
	def act_pos(self, ra, dec):
		(ra_p, dec_p) = coords.rad_2_stellarium_protocol(ra, dec)
		
		times = 10 #Number of times that Stellarium expects to receive new coords //Absolutly empiric..
		for i in range(times):
			self.move(ra_p, dec_p)
Ejemplo n.º 7
0
    def act_pos(self, ra, dec):
        (ra_p, dec_p) = coords.rad_2_stellarium_protocol(ra, dec)

        for i in range(10):
            self.move(ra_p, dec_p)
Ejemplo n.º 8
0
    def act_pos(self, ra, dec):
        (ra_p, dec_p) = coords.rad_2_stellarium_protocol(ra, dec)
 
        times = 10 #Número de veces que Stellarium espera recibir las coordenadas //Absolutamente empírico...
        for i in range(times):
            self.move(ra_p, dec_p)