def update_waypoints(self):
        self.wayPoints = []
        bbox = self.imageMetadata["bbox"]
        print(bbox)
        imagesize = self.imageMetadata["size"]
        list_wp = []
        for i in range(len(self.wayPoints_lat_lon)):
            geo_point = self.wayPoints_lat_lon[i]
            point = ImageUtils.posCoords2Image(bbox[0], bbox[1], bbox[2],
                                               bbox[3], geo_point[0],
                                               geo_point[1], imagesize[0],
                                               imagesize[1])

            self.wayPoints.append(point)
    def update_position(self):

        if self.pose != None:
            pose = self.getPose3D().getPose3D()
            lat = pose.x
            lon = pose.y
            bbox = self.imageMetadata["bbox"]
            self.limit_warning = GeoUtils.is_position_close_border(
                lat, lon, bbox)
            if self.limit_warning:
                self.download_zoomed_map()
            else:
                bbox = self.imageMetadata["bbox"]
                imagesize = self.imageMetadata["size"]
                x, y = ImageUtils.posCoords2Image(bbox[0], bbox[1], bbox[2],
                                                  bbox[3], lat, lon,
                                                  imagesize[0], imagesize[1])
                angle = self.sensorsWidget.quatToYaw(pose.q0, pose.q1, pose.q2,
                                                     pose.q3)
                self.setPosition(x, y, angle)