Esempio n. 1
0
 def gui_addsat(self):
     'Gui button to add the satellite tracks'
     from tkMessageBox import askquestion
     answer = askquestion('Verify import satellite tracks','Do you want to get the satellite tracks from the internet?')
     if answer == 'yes':
         from map_interactive import load_sat_from_net, get_sat_tracks, plot_sat_tracks
         self.line.tb.set_message('Loading satellite kml File from internet')
         kml = load_sat_from_net()
         if kml:
             self.line.tb.set_message('parsing file...')
             sat = get_sat_tracks(self.line.ex.datestr,kml)
             self.line.tb.set_message('Plotting satellite tracks')
             self.sat_obj = plot_sat_tracks(self.line.m,sat)
     elif answer ==  'no':
         from map_interactive import load_sat_from_file, get_sat_tracks, plot_sat_tracks
         filename = self.gui_file_select(ext='.kml',ftype=[('All files','*.*'),
                                                      ('Google Earth','*.kml')])
         if not filename:
             print 'Cancelled, no file selected'
             return
         self.line.tb.set_message('Opening kml File:'+filename)
         kml = load_sat_from_file(filename)
         self.line.tb.set_message('parsing file...')
         sat = get_sat_tracks(self.line.ex.datestr,kml)
         self.line.tb.set_message('Plotting satellite tracks') 
         self.sat_obj = plot_sat_tracks(self.line.m,sat)
     self.line.get_bg()
Esempio n. 2
0
 def gui_addsat_tle(self):
     'Gui button to add the satellite tracks'
     from map_interactive import get_sat_tracks_from_tle, plot_sat_tracks
     self.line.tb.set_message('Loading satellite info from sat.tle file')
     sat = get_sat_tracks_from_tle(self.line.ex.datestr)
     self.line.tb.set_message('Plotting Satellite tracks')
     self.sat_obj = plot_sat_tracks(self.line.m,sat)
     self.line.get_bg(redraw=True)