#include <node.h>
Data Fields | |
| uint8 | x |
| word | y |
| uint8 | cost |
| word | Gvalue |
| word | rhs |
| rhs is used for Hvalue in A*, rhs in D* | |
| Node * | parent |
Node struct. This is the structure for a single node in the Star field grid. The node represents a location on the field, and maintains the values G, H in the function: F = G + H where: G is the actual distance from last position to current position H is a heuristic used for the cost from current position to goal. In real units, a node is equal to Local_Map_Spec::unit() millimeters square.
|
|
The type of terrain of the node--how easily this terrain is to move through (0=clear-255=impassible) (Ref. OGrid). Note: Can also implement a cost from node to each edge cost[EDGES] as done elsewhere; |
|
|
Actual cheapest cost to this node from start. This is the cost of the current cheapest path from the start node. |
|
|
The parent of this node. By following the parent links back to the starting node, the cheapest path from the start to this node can be found. |
|
|
rhs is used for Hvalue in A*, rhs in D* Heuristic estimate to goal. This is the heuristic estimate of cost to the goal from this node. With the cost from the start. |
|
|
The x coordinate. This is the actual x-coordinate of this node on the field. |
|
|
The y coordinate. This is the actual y-coordinate of this node on the field. |
1.3