2 * Copyright Droids Corporation (2010)
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.
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.
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
18 * Olivier MATZ <zer0@droids-corp.org>
21 extern const point_t beacon0;
22 extern const point_t beacon1;
23 extern const point_t beacon2;
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);
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 */ );