C library of triangulation algorithms (for the problems of mobile robot positioning or resection)
Macros | Functions
triangulation.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <time.h>
#include "const.h"
#include "toolbox.h"
Include dependency graph for triangulation.c:

Go to the source code of this file.

Macros

#define AUTHOR   "Vincent Pierlot"
 
#define DEFAULT_PROGNAME   "triangulation"
 
#define EMAIL   "vpierlot@gmail.com"
 
#define VERSION   "0.7"
 

Functions

int main (int argc, char *argv[])
 
int test0 (tfloat xr, tfloat yr, tfloat or, tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3)
 
int test1 (tfloat alpha1, tfloat alpha2, tfloat alpha3, tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3, int m)
 
int test2 (tfloat xr, tfloat yr, tfloat or, tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3, int m)
 
int test3 (tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3, int m, tfloat xstart, tfloat xend, tfloat ystart, tfloat yend, unsigned int n)
 
int test4 (tfloat xr, tfloat yr, tfloat or, tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3, int m, tfloat sigmaAngle, tfloat sigmaBeacon, unsigned int n, int O)
 
int test5 (tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3, int m, tfloat sigmaAngle, tfloat sigmaBeacon, unsigned int n, tfloat xstart, tfloat xend, tfloat ystart, tfloat yend, tfloat step, unsigned int map, int O, double thresh)
 
void usage (const char *progName)
 Print usage informations. More...
 

Detailed Description

Author
Vincent Pierlot [ vpier.nosp@m.lot@.nosp@m.gmail.nosp@m..com ]
Date
April 2013
Version
: 0.7

Three Object Triangulation algorithms implementation, simulation and benchmarking compile with: make run with: ./triangulation [options]

Definition in file triangulation.c.

Function Documentation

void usage ( const char *  progName)

Print usage informations.

Print usage informations, the only argument is <progName> and is typically argv[0]

Parameters
progName

Definition at line 49 of file triangulation.c.

References get_angles(), initRand(), saveMapAndScale(), triangulationGDOP(), triangulationMethod(), and triangulationSensitivity().

50 {
51  fprintf(stderr ,
52  DEFAULT_PROGNAME " " VERSION " by " AUTHOR " [" EMAIL "]\n"
53  "Three Object Triangulation algorithms implementation, simulation and benchmarking.\n"
54  "http://www2.ulg.ac.be/telecom/triangulation/\n"
55  "http://hdl.handle.net/2268/89435\n"
56  "Usage: %s [options]\n"
57  "[options]:\n"
58  " -t int Test to execute (default=5):\n"
59  " 0: gets angles from robot pose (x;y;o). Displays angles (a;b;c).\n"
60  " 1: triangulates from measured angles (a;b;c). Displays robot pose (x;y;o).\n"
61  " 2: gets angles from robot pose (x;y;o) and triangulates with measured angles. Displays angles and pose.\n"
62  " 3: runs triangulation method n times from random positions in the grid [-x,X]*[y,Y]. Displays execution time.\n"
63  " 4: runs triangulation sensitivity analysis from robot position (x;y). (see -O for output).\n"
64  " 5: runs triangulation sensitivity analysis for each point in the grid [-x,X]*[y,Y]. (see -O for output).\n"
65  " Writes PGM images \"map.pgm\" and \"scale.pgm\" in current directory. Displays step, min and max values.\n"
66  " -m int Triangulation method to use (default=1). For all tests.\n"
67  " 1: Pierlot (ToTal) 2: Esteves 3: FontLlagunes (T) 4: Zalama\n"
68  " 5: McGillem (T) 6: McGillem (G) 7: Easton 8: Hmam\n"
69  " 9: Cohen (T) 10: Cohen (G) 11: Cohen (G)* 12: Tsukiyama\n"
70  " 13: Tsukiyama* 14: Madsen 15: Lukic 16: Lukic*\n"
71  " 17: Tienstra 18: Ligas 19: FontLlagunes (G) 20: Kaestner\n"
72  " 21: Collins 22: Cassini\n"
73  " (*) original method from the paper (typically slower than my implementation)\n"
74  " (G) Geometric solution\n"
75  " (T) Trigonometric solution\n"
76  " -x float X robot position. For tests 0, 2, 4. (default=0.0)\n"
77  " X min value of test grid. For tests 3, 5. (default=-2.0)\n"
78  " -y float Y robot position. For tests 0, 2, 4. (default=0.0)\n"
79  " Y min value of test grid. For tests 3, 5. (default=-2.0)\n"
80  " -o float Robot orientation relative to X axis [deg]. For tests 0, 2, 4. (default=0.0)\n"
81  " -a float alpha1 angle [deg]. For test 1. (default=+90)\n"
82  " -b float alpha2 angle [deg]. For test 1. (default=-150)\n"
83  " -c float alpha3 angle [deg]. For test 1. (default=-30)\n"
84  " -1 float X1 beacon1 position. For all tests. (default=0.0)\n"
85  " -2 float Y1 beacon1 position. For all tests. (default=+1.0)\n"
86  " -3 float X2 beacon2 position. For all tests. (default=-0.866)\n"
87  " -4 float Y2 beacon2 position. For all tests. (default=-0.5)\n"
88  " -5 float X3 beacon3 position. For all tests. (default=+0.866)\n"
89  " -6 float Y3 beacon3 position. For all tests. (default=-0.5)\n"
90  " -O int Output of the sensitivity analysis. For tests 4, 5. (default=1)\n"
91  " 1: std deviation of position error, 2: std deviation of orientation error, 3: return value of method.\n"
92  " -X float X max value of test grid. For tests 3, 5. (default=+2.0)\n"
93  " -Y float Y max value of test grid. For tests 3, 5. (default=+2.0)\n"
94  " -p float Discretization step of the test grid. For test 5. (default=0.02)\n"
95  " -A float Standard deviation of the gaussian noise applied to angles in [deg]. For tests 4, 5. (default=0.1)\n"
96  " -B float Standard deviation of the gaussian noise applied to beacons coordinates. For tests 4, 5. (default=0.0)\n"
97  " -n int Number of tests for the execution time and the sensitivity analysis. For tests 3, 4, 5. (default=100)\n"
98  " -M int Map used to display results from the sensitivity analysis. For test 5. (default=2)\n"
99  " 0: Linear.\n"
100  " 1: Logarithmic.\n"
101  " 2: Histogram equalized.\n"
102  " 3: Linear after removing outliers (1 percent of the highest values).\n"
103  " 4: Logarithmic after removing outliers (1 percent of the highest values).\n"
104  " -T float Threshold for the sensitivity analysis output (must be >= 0 to be active). For test 5. (default=-1)\n"
105  " -h Displays this help and exit.\n"
106  "\n"
107  , progName ) ;
108  exit( -1 ) ;
109 }

Here is the call graph for this function: