summaryrefslogtreecommitdiff
path: root/digital/beacon/simu/position.h
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/simu/position.h')
-rw-r--r--digital/beacon/simu/position.h49
1 files changed, 33 insertions, 16 deletions
diff --git a/digital/beacon/simu/position.h b/digital/beacon/simu/position.h
index de962e5a..9010e705 100644
--- a/digital/beacon/simu/position.h
+++ b/digital/beacon/simu/position.h
@@ -26,34 +26,51 @@
#ifndef _POSITION_H
#define _POSITION_H
-#define LARGEUR_TABLE 2000
-#define LONGUEUR_TABLE 3000
-#define LARGEUR_DEMI_TABLE LARGEUR_TABLE/2
-#define M_PI 3.14
+#define MAX_OBSTACLE 2
+#define MAX_BEACON 3
+#define MAX_TEMP_POSITION MAX_OBSTACLE * 2
+#define OBSTACLE_RADIUS 100
+#define IGNORE_ANGLE 1000
+/* Status returns */
+typedef enum{
+ POSITION_NO_ERROR,
+ POSITION_IGNORE_ANGLE
+} TPositionStatus;
+
+/* Structures definition */
+
+/* Beacon Structure */
typedef struct
{
- float angle[4];
- int last_updated_beacon;
- int before_last_updated_beacon;
-
-}beacon_value_s;
+ int angleNumber;
+ float angle[MAX_OBSTACLE+1];
+}beacon_s;
+/* Obstacle structure */
typedef struct
{
int x;
int y;
- int old_x;
- int old_y;
+ int trust
}opponent_s;
-
+
+/* Coordinates structure */
+typedef struct
+{
+ int x;
+ int y;
+}coord_s;
+
+/* Recovery Structure */
typedef struct
{
- int lost_beacon;
-}status_s;
+ int x;
+ int y;
+ int occurence;
+}recovery_s;
+/* This function is used to initialize all needed structures */
void init_struct(void);
-void update_position(int beacon_number,double angle);
-void distance_filter(void);
#endif \ No newline at end of file