beacon, prepare integration
[aversive.git] / projects / microb2010 / tests / beacon_tsop / trigo.h
1 /*
2  *  Copyright Droids Corporation (2010)
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  *  Olivier MATZ <zer0@droids-corp.org>
19  */
20
21 extern point_t beacon0;
22 extern point_t beacon1;
23 extern point_t beacon2;
24
25 /* get the position of the robot from the angle of the 3 beacons */
26 int8_t angles_to_posxy(point_t *pos, double a01, double a12, double a20);
27
28 /* get the position and angle of the robot from the angle of the 2
29  * beacons, and the distance of 2 beacons */
30 int8_t ad_to_posxya(point_t *pos, double *a, int algo,
31                     const point_t *b0, const point_t *b1, /* beacon position */
32                     double a0, double a1, /* seen angle of beacons */
33                     double d0, double d1 /* distance to beacons */ );