unit5_pp/scripts/descentviz.py
def index_to_world_coord(self, index):
        """
        Converts a flatmap index value to world coordinates (meters)
        index: a linear index value, specifying a cell/pixel in an 1-D array
        Returns a list containing x,y coordinates in the world frame of reference
        """
        # convert to x,y grid cell/pixel coordinates
        grid_cell_map_x = index % self.width
        grid_cell_map_y = index // self.width
        # convert to world coordinates
        world_coordinates = []
        world_coordinates.append(self.resolution * grid_cell_map_x + self.origin[0])
        world_coordinates.append(self.resolution * grid_cell_map_y + self.origin[1])

        return world_coordinates

        Converts a flatmap index value to world coordinates (meters)
        index: a linear index value, specifying a cell/pixel in an 1-D array
        Returns a list containing x,y coordinates in the world frame of reference
        
Converts a flatmap index value to world coordinates (meters)
index: a linear index value, specifying a cell/pixel in an 1-D array
Returns a list containing x,y coordinates in the world frame of reference
Converts a flatmap index value to world coordinates ( meters ) index : a linear index value specifying a cell / pixel in an 1 - D array Returns a list containing x y coordinates in the world frame of reference
def index_to_world_coord(self, index):
        grid_cell_map_x = index % self.width
        grid_cell_map_y = index // self.width
        world_coordinates = []
        world_coordinates.append(self.resolution * grid_cell_map_x + self.origin[0])
        world_coordinates.append(self.resolution * grid_cell_map_y + self.origin[1])
        return world_coordinates
def index_to_world_coord ( self , index ) : grid_cell_map_x = index % self . width grid_cell_map_y = index // self . width world_coordinates = [ ] world_coordinates . append ( self . resolution * grid_cell_map_x + self . origin [ 0 ] ) world_coordinates . append ( self . resolution * grid_cell_map_y + self . origin [ 1 ] ) return world_coordinates
Converts a flatmap index value to world coordinates (meters)
index: a linear index value, specifying a cell/pixel in an 1-D array
Returns a list containing x,y coordinates in the world frame of reference
Converts a flatmap index value to world coordinates ( meters ) index : a linear index value specifying a cell / pixel in an 1 - D array Returns a list containing x y coordinates in the world frame of reference
"""
        Converts a flatmap index value to world coordinates (meters)
        index: a linear index value, specifying a cell/pixel in an 1-D array
        Returns a list containing x,y coordinates in the world frame of reference
        """ # convert to x,y grid cell/pixel coordinates # convert to world coordinates
self
index