]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robodim/robodim.c
robodim: Structures with chessboard squares centers extended to whole table squares.
[eurobot/public.git] / src / robodim / robodim.c
1 #include "robodim.h"
2 #include <robomath.h>
3
4 /*
5  * Beacon positions. For some version of MCL, this must be sorted in
6  * the same order as laser rotation.
7  *
8  * (pecam1, 2009: not sure, if the sense is right for laser MCL;
9  *  anyway, I hope, we will be happy without the laser)
10  */
11
12 const struct bonus_pos bonus[BONUS_CNT] = { //bonus[1].x
13         {975,  1575},
14         {975,  875},
15         {1325, 175},
16         {1675, 175},
17         {2025, 1575},
18         {2025, 875},
19 };
20
21 const struct pawn_pos pawn[PAWN_CNT] = {
22         {800, 1400},    // center
23         {800, 350},
24         {1150, 1750},
25         {1150, 350},
26         {1500, 1050},
27         {1850, 1750},
28         {1850, 350},
29         {2200, 1400},
30         {2200, 350},
31         {200, 290},     // left dispensing
32         {200, 290 + 1*280},
33         {200, 290 + 2*280},
34         {2800, 290},    // right dispensing
35         {2800, 290 + 1*280},
36         {2800, 290 + 2*280},
37 };
38
39 const struct queen_pos queen[QUEEN_CNT] = {
40         {200, 290 + 3*280},
41         {2800, 290 + 3*280},
42 };
43
44 const struct king_pos king[KING_CNT] = {
45         {200, 290 + 4*280},
46         {2800, 290 + 4*280},
47 };
48
49 const struct square_center_red red_sq[SQ_CNTR] = {
50         {0.45 + 0.175 + 5*0.35, 5*0.35 + 0.175}, // 1
51         {0.45 + 0.175 + 5*0.35, 3*0.35 + 0.175}, // 2
52         {0.45 + 0.175 + 5*0.35, 1*0.35 + 0.175}, // 3
53         {0.45 + 0.175 + 4*0.35, 4*0.35 + 0.175}, // 4
54         {0.45 + 0.175 + 4*0.35, 2*0.35 + 0.175}, // 5
55         {0.45 + 0.175 + 3*0.35, 5*0.35 + 0.175}, // 6
56         {0.45 + 0.175 + 3*0.35, 3*0.35 + 0.175}, // 7
57         {0.45 + 0.175 + 3*0.35, 1*0.35 + 0.175}, // 8
58         {0.45 + 0.175 + 2*0.35, 4*0.35 + 0.175}, // 9
59         {0.45 + 0.175 + 2*0.35, 2*0.35 + 0.175}, // 10
60         {0.45 + 0.175 + 1*0.35, 5*0.35 + 0.175}, // 11
61         {0.45 + 0.175 + 1*0.35, 3*0.35 + 0.175}, // 12
62         {0.45 + 0.175 + 1*0.35, 1*0.35 + 0.175}, // 13
63         {0.45 + 0.175 + 0*0.35, 4*0.35 + 0.175}, // 14
64         {0.45 + 0.175 + 0*0.35, 2*0.35 + 0.175}, // 15
65 };
66
67 const struct square_center_blue blue_sq[SQ_CNTR] = {
68         {0.45 + 0.175 + 0*0.35, 5*0.35 + 0.175}, // 1
69         {0.45 + 0.175 + 0*0.35, 3*0.35 + 0.175}, // 2
70         {0.45 + 0.175 + 0*0.35, 1*0.35 + 0.175}, // 3
71         {0.45 + 0.175 + 1*0.35, 4*0.35 + 0.175}, // 4
72         {0.45 + 0.175 + 1*0.35, 2*0.35 + 0.175}, // 5
73         {0.45 + 0.175 + 2*0.35, 5*0.35 + 0.175}, // 6
74         {0.45 + 0.175 + 2*0.35, 3*0.35 + 0.175}, // 7
75         {0.45 + 0.175 + 2*0.35, 1*0.35 + 0.175}, // 8
76         {0.45 + 0.175 + 3*0.35, 4*0.35 + 0.175}, // 9
77         {0.45 + 0.175 + 3*0.35, 2*0.35 + 0.175}, // 10
78         {0.45 + 0.175 + 4*0.35, 5*0.35 + 0.175}, // 11
79         {0.45 + 0.175 + 4*0.35, 3*0.35 + 0.175}, // 12
80         {0.45 + 0.175 + 4*0.35, 1*0.35 + 0.175}, // 13
81         {0.45 + 0.175 + 5*0.35, 4*0.35 + 0.175}, // 14
82         {0.45 + 0.175 + 5*0.35, 2*0.35 + 0.175}, // 15
83 };
84 // const struct beacon_pos beacon_green[BEACON_CNT] = {
85 //      { 3.062, -0.05},  /* EB2009: one side is 10mm only plexiglass */
86 //      {-0.062,  1.05},  /* the rest is 22mm wood */
87 //      { 3.062,  2.162},
88 // };
89 //
90 // const struct beacon_pos beacon_red[BEACON_CNT] = {
91 //      /* beacons are rotated, not mirrored! */
92 //      {-0.062,  2.162},
93 //      { 3.062,  1.05},
94 //      {-0.062, -0.05},
95 // };
96
97
98 /*
99  * Ukrizovavse pak jej, rozdelili roucha jeho, mecice o ne los, aby se
100  * naplnilo povedeni proroka, rkouciho: Rozdelili sobe roucho me, a o muj
101  * odev metali los. (Mt 27,35)
102  *
103  * And they crucified him, and parted his garments, casting lots: that it
104  * might be fulfilled which was spoken by the prophet, They parted my garments
105  * among them, and upon my vesture did they cast lots.
106  *
107  *
108  * Mame dost mongoloidni souradnej system, vsimli jste si?
109  * Inteligent by dal cervenej ctverec do 0,0. No, proletosek uz na to chmatat
110  * nebudeme.
111  */