]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/pathplan/aalgorithm.h
src: raw code a changes
[eurobot/public.git] / src / pathplan / aalgorithm.h
index 118f81bfc7d57c4501081c4ee066b71bb3f05fb1..09226bc2bdfab9134c9a92f20241184f19f6c507 100644 (file)
@@ -12,7 +12,9 @@
 #include <rbtree.h>
 #endif
 
-#define AALGORITHM_DEBUG
+#define AALGORITHM_DEBUG_EXP_CELLS
+//#define AALGORITHM_DEBUG
+//#define AALGORITHM_DEBUG_PNG
 //#define HOLOMIC
 
 /**
@@ -40,9 +42,37 @@ void GraphCell2XY(GraphMapCell *c, int *x, int *y);
 
 #ifdef HOLOMIC
 int aAlgorithm(double xstart_real,double ystart_real, double xgoal_real, double ygoal_real, GraphMapCell **original_path);
+#else
+int aAlgorithm(double xstart_real,double ystart_real, double xgoal_real, double ygoal_real, double start_angle, double goal_angle, GraphMapCell **original_path);
 #endif
 
-int aAlgorithm(double xstart_real,double ystart_real, double xgoal_real, double ygoal_real, double start_angle, double goal_angle, GraphMapCell **original_path);
+// init of mask, its need call before aAlgorithm
+int init_aalgorithm(void);
+
+// free masks memory, call on the end of programs
+int freemem_aalgorithm(void);
+
+typedef struct { 
+       int x; 
+       int y; 
+} cell_coordinates_t; 
+
+typedef enum {
+       DIRECT_MASK = 0,
+       ROTATE_MASK = 1
+} TYPE_OF_MASK;
+
+typedef struct {
+       cell_coordinates_t *p_first_cell; 
+       int nbr_mask_cells;
+       TYPE_OF_MASK  type_of_mask;
+} mask_t;
+
+// public variable for test programs
+extern mask_t mask_0pi, mask_pi4, mask_rot;
+
+// public function for test programs
+cell_coordinates_t transform( cell_coordinates_t coor, int angle_index, TYPE_OF_MASK type_of_mask);
 
 #ifdef __cplusplus
 }