import math


def calc_distance(ij_start, ij_end, R):
    """"
    Calculate distance from start to end point

    Args:
        ij_start: The coordinate of origin point with (0,0) in the upper-left corner
        ij_end: The coordinate of destination point with (0,0) in the upper-left corner
        R: Map resolution (m/pixel)

    Return:
        The distance from origin to destination in meters
    """
    return R*math.sqrt((ij_start[0]-ij_end[0])**2 + (ij_start[1]-ij_end[1])**2)