Path: Math/AStar
% Finds the cost for going from startNode to nextNode. Assumes a square grid. -------------------------------------------------------------------------- Form: cost = GridPathCost( startLoc, goalLoc, d ) -------------------------------------------------------------------------- ------ Inputs ------ startNode (1,1) Id of start location goalNode (1,1) Id of next location d (1,1) Data structure .n (1,1) Number of nodes ------- Outputs ------- cost (1,:) List of nodes in path --------------------------------------------------------------------------
Math: AStar/TransformGridCoordinates
Back to the Math Module page