summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/common-cc/path.hh
diff options
context:
space:
mode:
authorOlivier Lanneluc2013-04-16 20:13:56 +0200
committerNicolas Schodet2013-04-27 00:22:40 +0200
commit1a30f24ef4b749f5209637487ef88a808d94a7d3 (patch)
tree5ecfb655f580b43f3920141181ad84d00c67dc09 /digital/io-hub/src/common-cc/path.hh
parentfa5eaa43b492c6fad8675de3542918c492770eb6 (diff)
Fix the weight of the second layer of navigation points
Diffstat (limited to 'digital/io-hub/src/common-cc/path.hh')
-rw-r--r--digital/io-hub/src/common-cc/path.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/digital/io-hub/src/common-cc/path.hh b/digital/io-hub/src/common-cc/path.hh
index ad283492..58db4623 100644
--- a/digital/io-hub/src/common-cc/path.hh
+++ b/digital/io-hub/src/common-cc/path.hh
@@ -82,10 +82,14 @@ class Path
static const int PATH_RESERVED_NAVPOINTS_NB = 2;
/** Number of navigation points layers for each obstacle. */
static const int PATH_NAVPOINTS_LAYERS = 2;
- /** Number of points. */
+ /** Number of navigation points. */
static const int PATH_NAVPOINTS_NB = (PATH_RESERVED_NAVPOINTS_NB +
PATH_NAVPOINTS_LAYERS * (PATH_OBSTACLES_NB * PATH_OBSTACLES_NAVPOINTS_NB) +
PATH_NAVPOINTS_LAYERS * (PATH_CAKE_NAVPOINTS_NB - PATH_OBSTACLES_NAVPOINTS_NB));
+ /** Navigation points weight precision (2^-n). */
+ static const int PATH_WEIGHT_PRECISION = 4;
+ /** Navigation points weight step (2^-n). */
+ static const int PATH_WEIGHT_STEP = 5;
/** Borders, any point outside borders is eliminated. */
const uint16_t border_xmin, border_ymin, border_xmax, border_ymax;
@@ -98,7 +102,7 @@ class Path
/** List of navigation points coordonates */
vect_t navpoints[PATH_NAVPOINTS_NB];
/** List of navigation points weights */
- uint16_t navweights[PATH_NAVPOINTS_NB];
+ uint32_t navweights[PATH_NAVPOINTS_NB];
/** Number of navigation points */
int navpoints_nb;
/** List of nodes used for A*. */