Have using AStar algoritm for callculating interpolation coefficents