コード例 #1
0
 def mouse_event_view(self, event):
     '''called on mouse events in View window'''
     x = event.X
     y = event.Y
     if self.current_view >= len(self.images):
         return
     image = self.images[self.current_view]
     latlon = cuav_util.gps_position_from_xy(x,
                                             y,
                                             image.pos,
                                             C=self.c_params,
                                             shape=image.shape,
                                             altitude=image.pos.altitude)
     if self.last_view_latlon is None or latlon is None:
         dist = ''
     else:
         distance = cuav_util.gps_distance(self.last_view_latlon[0],
                                           self.last_view_latlon[1],
                                           latlon[0], latlon[1])
         bearing = cuav_util.gps_bearing(self.last_view_latlon[0],
                                         self.last_view_latlon[1],
                                         latlon[0], latlon[1])
         dist = "dist %.1f bearing %.1f alt=%.1f shape=%s" % (
             distance, bearing, image.pos.altitude, image.shape)
     print("-> %s %s %s" % (latlon, image.filename, dist))
     self.last_view_latlon = latlon
コード例 #2
0
ファイル: cuav_mosaic.py プロジェクト: BeauJoh/cuav
 def mouse_event_view(self, event):
     '''called on mouse events in View window'''
     x = event.X
     y = event.Y
     if self.current_view >= len(self.images):
         return
     image = self.images[self.current_view]
     latlon = cuav_util.gps_position_from_xy(x, y, image.pos, C=self.c_params)
     print("-> %s %s" % (latlon, image.filename))
コード例 #3
0
ファイル: cuav_mosaic.py プロジェクト: jdennings/cuav
 def mouse_event_view(self, event):
     '''called on mouse events in View window'''
     x = event.X
     y = event.Y
     if self.current_view >= len(self.images):
         return
     image = self.images[self.current_view]
     latlon = cuav_util.gps_position_from_xy(x, y, image.pos, C=self.c_params)
     if self.last_view_latlon is None:
         dist = ''
     else:
         dist = "dist %.1f" % cuav_util.gps_distance(latlon[0], latlon[1],
                                                             self.last_view_latlon[0], self.last_view_latlon[1])
     print("-> %s %s %s" % (latlon, image.filename, dist))
     self.last_view_latlon = latlon
コード例 #4
0
 def mouse_event_view(self, event):
     '''called on mouse events in View window'''
     x = event.X
     y = event.Y
     if self.current_view >= len(self.images):
         return
     image = self.images[self.current_view]
     latlon = cuav_util.gps_position_from_xy(x, y, image.pos, C=self.c_params, shape=image.shape)
     if self.last_view_latlon is None or latlon is None:
         dist = ''
     else:
         distance = cuav_util.gps_distance(self.last_view_latlon[0], self.last_view_latlon[1],
                                           latlon[0], latlon[1])
         bearing = cuav_util.gps_bearing(self.last_view_latlon[0], self.last_view_latlon[1],
                                          latlon[0], latlon[1])
         dist = "dist %.1f bearing %.1f alt=%.1f shape=%s" % (distance, bearing, image.pos.altitude, image.shape)
     print("-> %s %s %s" % (latlon, image.filename, dist))
     self.last_view_latlon = latlon
コード例 #5
0
ファイル: cuav_mosaic.py プロジェクト: eyesnears/cuav
 def mouse_event_view(self, event):
     '''called on mouse events in View window'''
     x = event.X
     y = event.Y
     if self.current_view >= len(self.images):
         return
     image = self.images[self.current_view]
     latlon = cuav_util.gps_position_from_xy(x,
                                             y,
                                             image.pos,
                                             C=self.c_params)
     if self.last_view_latlon is None:
         dist = ''
     else:
         dist = "dist %.1f" % cuav_util.gps_distance(
             latlon[0], latlon[1], self.last_view_latlon[0],
             self.last_view_latlon[1])
     print("-> %s %s %s" % (latlon, image.filename, dist))
     self.last_view_latlon = latlon