def get_solar_position(time):
    '''
    # Calculates the position of the Sun in Ra and Dec
    '''
    sun = Planet(planet_enum.SUN, res[planet_enum.SUN][0], 
                 res[planet_enum.SUN][1], res[planet_enum.SUN][2])
    sun_coords = hc_get_instance(None, sun, time)
    
    ra_dec = radec_get_instance(None, sun_coords, sun, time)
    return ra_dec
Example #2
0
 def update_coords(self, t_struct):
     self.last_update_time_Ms = time.mktime(t_struct)
     
     p = Planet(planet_enum.SUN, res[planet_enum.SUN][0], 
                     res[planet_enum.SUN][1], res[planet_enum.SUN][2])
     self.sun_coords = get_instance(t_struct=t_struct, planet=p)
     
     ra_dec = radec_get_instance(earth_coord=self.sun_coords, planet=self.planet, time=t_struct)
     self.current_coords.update_from_ra_dec(ra_dec.ra, ra_dec.dec)
     for imgsrc in self.image_sources:
         imgsrc.set_up_vector(self.sun_coords)
Example #3
0
    def update_coords(self, t_struct):
        self.last_update_time_Ms = time.mktime(t_struct)

        p = Planet(planet_enum.SUN, res[planet_enum.SUN][0],
                   res[planet_enum.SUN][1], res[planet_enum.SUN][2])
        self.sun_coords = get_instance(t_struct=t_struct, planet=p)

        ra_dec = radec_get_instance(earth_coord=self.sun_coords,
                                    planet=self.planet,
                                    time=t_struct)
        self.current_coords.update_from_ra_dec(ra_dec.ra, ra_dec.dec)
        for imgsrc in self.image_sources:
            imgsrc.set_up_vector(self.sun_coords)