Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/Math/GaussBell.cpp

Go to the documentation of this file.
00001 /**
00002  * @file Tools/Math/GaussBell.cpp
00003  * This class describes a gaussian normal distributen to use with the 
00004  * gaussBellTeamBallLocator with the ability to merge 2 different gaussbells
00005  *
00006  * @author <a href=mailto:Kai_Engel@gmx.de>Kai Engel</a>
00007  */
00008 
00009 #include "GaussBell.h"
00010 #include "Tools/FieldDimensions.h"
00011 #include "Platform/SystemCall.h"
00012 #include <math.h>
00013 #include "Platform/File.h"
00014 
00015 
00016 const double GaussBell::factor = 1.0/1.78;
00017 
00018 const int GaussBell::phi[] = {
00019     5000, 5040, 5080, 5120, 5160, 5199, 5239, 5279, 5319, 5359,
00020     5398, 5438, 5478, 5517, 5557, 5596, 5636, 5675, 5714, 5753,
00021     5793, 5832, 5871, 5910, 5948, 5987, 6026, 6064, 6103, 6141, 
00022     6179, 6217, 6255, 6293, 6331, 6368, 6406, 6443, 6480, 6517, 
00023     6554, 6591, 6628, 6664, 6700, 6736, 6772, 6808, 6844, 6879, 
00024    
00025     6915, 6950, 6985, 7019, 7054, 7088, 7123, 7157, 7190, 7224,
00026     7257, 7291, 7324, 7357, 7389, 7422, 7454, 7486, 7517, 7549, 
00027     7580, 7611, 7642, 7673, 7704, 7734, 7764, 7794, 7823, 7852, 
00028     7881, 7910, 7939, 7967, 7995, 8023, 8051, 8078, 8106, 8133, 
00029     8159, 8186, 8212, 8238, 8264, 8289, 8315, 8340, 8365, 8389, 
00030     
00031     8413, 8438, 8461, 8485, 8508, 8531, 8554, 8577, 8599, 8621, 
00032     8643, 8665, 8686, 8708, 8729, 8749, 8770, 8790, 8810, 8830, 
00033     8849, 8869, 8888, 8907, 8925, 8944, 8962, 8980, 8997, 9015,
00034     9032, 9049, 9066, 9082, 9099, 9115, 9131, 9147, 9162, 9177, 
00035     9192, 9207, 9222, 9236, 9251, 9265, 9279, 9292, 9306, 9319, 
00036     
00037     9332, 9345, 9357, 9370, 9382, 9394, 9406, 9418, 9429, 9441, 
00038     9452, 9463, 9474, 9484, 9495, 9505, 9515, 9525, 9535, 9545, 
00039     9554, 9564, 9573, 9582, 9591, 9599, 9608, 9616, 9625, 9633, 
00040     9641, 9649, 9656, 9664, 9671, 9678, 9686, 9693, 9699, 9706, 
00041     9713, 9719, 9726, 9732, 9738, 9744, 9750, 9756, 9761, 9767,
00042     
00043     9772, 9778, 9783, 9788, 9793, 9798, 9803, 9808, 9812, 9817, 
00044     9821, 9826, 9830, 9834, 9838, 9842, 9846, 9850, 9854, 9857,
00045     9861, 9864, 9868, 9871, 9875, 9878, 9881, 9884, 9887, 9890, 
00046     9893, 9896, 9898, 9901, 9904, 9906, 9909, 9911, 9913, 9916,
00047     9918, 9920, 9922, 9925, 9927, 9929, 9931, 9932, 9934, 9936, 
00048     
00049     9938, 9940, 9941, 9943, 9945, 9946, 9948, 9949, 9951, 9952, 
00050     9953, 9955, 9956, 9957, 9959, 9960, 9961, 9962, 9963, 9964, 
00051     9965, 9966, 9967, 9968, 9969, 9970, 9971, 9972, 9973, 9974, 
00052     9974, 9975, 9976, 9977, 9977, 9978, 9979, 9979, 9980, 9981, 
00053     9981, 9982, 9982, 9983, 9984, 9984, 9985, 9985, 9986, 9986,
00054     
00055     9986, 9987, 9987, 9988, 9988, 9989, 9989, 9989, 9990, 9990,
00056     9990, 9991, 9991, 9991, 9992, 9992, 9992, 9992, 9993, 9993,
00057     9993, 9993, 9994, 9994, 9994, 9994, 9994, 9995, 9995, 9995};
00058      
00059     const int GaussBell::invProb[] = {
00060      
00061        1,   1,   1,   1,   1,   1,   1,   1,   1,   2,
00062        2,   2,   2,   2,   2,   2,   2,   3,   3,   3,
00063        3,   3,   3,   3,   3,   4,   4,   4,   4,   4,
00064        4,   4,   4,   5,   5,   5,   5,   5,   5,   5,
00065        6,   6,   6,   6,   6,   6,   6,   6,   7,   7,
00066 
00067        7,   7,   7,   7,   7,   7,   8,   8,   8,   8,
00068        8,   8,   8,   8,   9,   9,   9,   9,   9,   9,
00069        9,   9,  10,  10,  10,  10,  10,  10,  10,  10,
00070       11,  11,  11,  11,  11,  11,  11,  11,  12,  12,
00071       12,  12,  12,  12,  12,  12,  13,  13,  13,  13,
00072 
00073       13,  13,  13,  13,  14,  14,  14,  14,  14,  14,
00074       14,  14,  15,  15,  15,  15,  15,  15,  15,  15,
00075       16,  16,  16,  16,  16,  16,  16,  16,  17,  17,
00076       17,  17,  17,  17,  17,  18,  18,  18,  18,  18, 
00077       18,  18,  18,  19,  19,  19,  19,  19,  19,  19, 
00078 
00079       19,  20,  20,  20,  20,  20,  20,  20,  20,  21, 
00080       21,  21,  21,  21,  21,  21,  21,  22,  22,  22, 
00081       22,  22,  22,  22,  22,  23,  23,  23,  23,  23, 
00082       23,  23,  24,  24,  24,  24,  24,  24,  24,  24, 
00083       25,  25,  25,  25,  25,  25,  25,  25,  26,  26, 
00084 
00085       26,  26,  26,  26,  26,  26,  27,  27,  27,  27, 
00086       27,  27,  27,  28,  28,  28,  28,  28,  28,  28, 
00087       28,  29,  29,  29,  29,  29,  29,  29,  29,  30, 
00088       30,  30,  30,  30,  30,  30,  31,  31,  31,  31, 
00089       31,  31,  31,  31,  32,  32,  32,  32,  32,  32, 
00090     
00091       32,  33,  33,  33,  33,  33,  33,  33,  33,  34, 
00092       34,  34,  34,  34,  34,  34,  34,  35,  35,  35, 
00093       35,  35,  35,  35,  36,  36,  36,  36,  36,  36, 
00094       36,  36,  37,  37,  37,  37,  37,  37,  37,  38, 
00095       38,  38,  38,  38,  38,  38,  39,  39,  39,  39, 
00096     
00097       39,  39,  39,  39,  40,  40,  40,  40,  40,  40, 
00098       40,  41,  41,  41,  41,  41,  41,  41,  41,  42, 
00099       42,  42,  42,  42,  42,  42,  43,  43,  43,  43, 
00100       43,  43,  43,  44,  44,  44,  44,  44,  44,  44, 
00101       45,  45,  45,  45,  45,  45,  45,  45,  46,  46, 
00102     
00103       46,  46,  46,  46,  46,  47,  47,  47,  47,  47, 
00104       47,  47,  48,  48,  48,  48,  48,  48,  48,  49, 
00105       49,  49,  49,  49,  49,  49,  50,  50,  50,  50, 
00106       50,  50,  50,  51,  51,  51,  51,  51,  51,  51, 
00107       52,  52,  52,  52,  52,  52,  52,  53,  53,  53, 
00108     
00109       53,  53,  53,  53,  54,  54,  54,  54,  54,  54, 
00110       54,  55,  55,  55,  55,  55,  55,  55,  56,  56, 
00111       56,  56,  56,  56,  56,  57,  57,  57,  57,  57, 
00112       57,  57,  58,  58,  58,  58,  58,  58,  59,  59, 
00113       59,  59,  59,  59,  59,  60,  60,  60,  60,  60, 
00114     
00115       60,  60,  61,  61,  61,  61,  61,  61,  61,  62, 
00116       62,  62,  62,  62,  62,  63,  63,  63,  63,  63, 
00117       63,  63,  64,  64,  64,  64,  64,  64,  65,  65, 
00118       65,  65,  65,  65,  65,  66,  66,  66,  66,  66, 
00119       66,  67,  67,  67,  67,  67,  67,  67,  68,  68, 
00120     
00121       68,  68,  68,  68,  69,  69,  69,  69,  69,  69, 
00122       70,  70,  70,  70,  70,  70,  71,  71,  71,  71, 
00123       71,  71,  71,  72,  72,  72,  72,  72,  72,  73, 
00124       73,  73,  73,  73,  73,  74,  74,  74,  74,  74, 
00125       74,  75,  75,  75,  75,  75,  75,  76,  76,  76, 
00126     
00127       76,  76,  76,  77,  77,  77,  77,  77,  77,  78, 
00128       78,  78,  78,  78,  78,  79,  79,  79,  79,  79, 
00129       79,  80,  80,  80,  80,  80,  80,  81,  81,  81, 
00130       81,  81,  82,  82,  82,  82,  82,  82,  83,  83, 
00131       83,  83,  83,  83,  84,  84,  84,  84,  84,  85, 
00132     
00133       85,  85,  85,  85,  85,  86,  86,  86,  86,  86, 
00134       86,  87,  87,  87,  87,  87,  88,  88,  88,  88, 
00135       88,  88,  89,  89,  89,  89,  89,  90,  90,  90, 
00136       90,  90,  91,  91,  91,  91,  91,  91,  92,  92, 
00137       92,  92,  92,  93,  93,  93,  93,  93,  94,  94, 
00138     
00139       94,  94,  94,  95,  95,  95,  95,  95,  96,  96, 
00140       96,  96,  96,  97,  97,  97,  97,  97,  98,  98, 
00141       98,  98,  98,  99,  99,  99,  99,  99, 100, 100,
00142       100, 100, 100, 101, 101, 101, 101, 101, 102, 102,
00143       102, 102, 102, 103, 103, 103, 103, 104, 104, 104,
00144     
00145       104, 104, 105, 105, 105, 105, 105, 106, 106, 106,
00146       106, 107, 107, 107, 107, 107, 108, 108, 108, 108,
00147       109, 109, 109, 109, 109, 110, 110, 110, 110, 111,
00148       111, 111, 111, 112, 112, 112, 112, 112, 113, 113,
00149       113, 113, 114, 114, 114, 114, 115, 115, 115, 115,
00150     
00151       116, 116, 116, 116, 117, 117, 117, 117, 118, 118,
00152       118, 118, 119, 119, 119, 119, 120, 120, 120, 120,
00153       121, 121, 121, 121, 122, 122, 122, 122, 123, 123,
00154       123, 123, 124, 124, 124, 125, 125, 125, 125, 126,
00155       126, 126, 126, 127, 127, 127, 128, 128, 128, 128,
00156     
00157       129, 129, 129, 130, 130, 130, 130, 131, 131, 131,
00158       132, 132, 132, 132, 133, 133, 133, 134, 134, 134,
00159       135, 135, 135, 136, 136, 136, 136, 137, 137, 137,
00160       138, 138, 138, 139, 139, 139, 140, 140, 140, 141,
00161       141, 141, 142, 142, 142, 143, 143, 143, 144, 144,
00162     
00163       144, 145, 145, 146, 146, 146, 147, 147, 147, 148,
00164       148, 148, 149, 149, 150, 150, 150, 151, 151, 152,
00165       152, 152, 153, 153, 154, 154, 154, 155, 155, 156,
00166       156, 156, 157, 157, 158, 158, 159, 159, 159, 160,
00167       160, 161, 161, 162, 162, 163, 163, 164, 164, 165,
00168     
00169       165, 166, 166, 167, 167, 168, 168, 169, 169, 170,
00170       170, 171, 171, 172, 172, 173, 173, 174, 174, 175,
00171       176, 176, 177, 177, 178, 179, 179, 180, 180, 181,
00172       182, 182, 183, 184, 184, 185, 186, 186, 187, 188,
00173       189, 189, 190, 191, 192, 192, 193, 194, 195, 196,
00174     
00175       197, 197, 198, 199, 200, 201, 202, 203, 204, 205,
00176       206, 207, 208, 209, 210, 211, 213, 214, 215, 216,
00177       218, 219, 220, 222, 223, 225, 226, 228, 230, 231,
00178       233, 235, 237, 239, 242, 244, 246, 249, 252, 255,
00179       258, 262, 266, 271, 276, 282, 289, 298, 311, 329
00180     
00181     };
00182 
00183 const double GaussBell::radiusMaj = 300;
00184 const double GaussBell::radiusMin = 150;
00185 
00186 
00187 // Constructor:
00188 GaussBell::GaussBell()
00189 {
00190   /** standard initialization */
00191   this->setTimeStamp(SystemCall::getCurrentSystemTime());
00192   position.x = 0.0;
00193   position.y = 0.0;
00194   rotationAngle = 0.0;
00195   sigmaMaj = 0.0;
00196   sigmaMin = 0.0;
00197   validity = 0.0;
00198 }
00199 
00200 
00201 // Destructor:
00202 GaussBell::~GaussBell()
00203 {
00204 }
00205 
00206 
00207 /**
00208   * Returns the Cavariance-Matrix.
00209   */  
00210 Matrix2x2<double> GaussBell::getCovarianceMatrix()
00211 {
00212   return covarianceMatrix;
00213 }
00214 
00215 
00216 /**
00217   * Returns the position with the maximum validity.
00218   */ 
00219 Vector2<double> GaussBell::getPositionOfMaximum()
00220 {
00221   return position;
00222 }
00223 
00224 
00225 /**
00226   * Returns the validity.
00227   */ 
00228 double GaussBell::getValidity(Vector2<double> _position)
00229 {
00230   return validity;
00231 }
00232 
00233 
00234 /**
00235   * Returns the validity.
00236   */ 
00237 double GaussBell::getValidityAtPositionOfMaximum()
00238 {
00239   // Validity :  I define the validity here as the probabilty that
00240   //             the  Zufallsvariable X (eg. the ball) is in the a given
00241   //             radius around the  Erwartungswert of the normal distribution
00242     return validity;
00243 }
00244 
00245 
00246 /**
00247   * Returns the time stamp
00248   */ 
00249 unsigned int GaussBell::getTimeStamp()
00250 {
00251   return this->timeStampGaussBell;
00252 }
00253 
00254 
00255 /**
00256   * Two gauss-bells will be operated. Result is a gauss-bell, 
00257   */
00258 void GaussBell::mergeBells(GaussBell _gaussBell1, GaussBell _gaussBell2)
00259 {
00260   // Merging of the Covariance-Matrices:
00261   this->covarianceMatrix = _gaussBell1.covarianceMatrix - _gaussBell1.covarianceMatrix
00262                  * ((_gaussBell1.covarianceMatrix + _gaussBell2.covarianceMatrix).invert())
00263                  * _gaussBell1.covarianceMatrix;
00264   this->position = _gaussBell1.position + _gaussBell1.covarianceMatrix 
00265                  * ((_gaussBell1.covarianceMatrix + _gaussBell2.covarianceMatrix).invert())
00266                  * (_gaussBell2.position - _gaussBell1.position);
00267 
00268 
00269   this->timeStampGaussBell = SystemCall::getCurrentSystemTime();
00270   this->timeStampGaussBell = this->getTimeStamp();
00271 
00272   this->updateSigmasAndAngle();
00273   this->transformSigmaToValidity();
00274 }
00275 
00276 
00277 /**
00278   * validity = _validity
00279   * Error-correction included
00280   */
00281 void GaussBell::setValidity(double _validity)
00282 {
00283   this->validity = _validity;
00284   if (validity >= 1.0 ) validity = 0.9;
00285   this->transformValidityToSigma();// calculate new SigmaMin / SigmaMai
00286   this->updateCovarianceMatrix();  // calculate new covariance-Matrix
00287 }
00288 
00289 
00290 /**
00291   * Sets the covariance-matrix (sigmas and validity will be correctly set, too)
00292   */
00293 void GaussBell::setCovarianceMatrix(Matrix2x2<double> _covarianceMatrix)
00294 {
00295   this->covarianceMatrix = _covarianceMatrix;
00296   this->updateSigmasAndAngle();
00297   this->transformSigmaToValidity();
00298 }
00299 
00300 
00301 /**
00302   * Sets the covariance-matrix (sigmas and validity will be correctly set, too)
00303   */
00304 void GaussBell::setCovarianceMatrix(double _validity, double _angle)
00305 { 
00306   this->validity = _validity;
00307   this->rotationAngle = _angle;
00308   this->transformValidityToSigma(); // creates sigmaMaj and sigmaMin
00309   this->updateCovarianceMatrix();
00310 }
00311 
00312 
00313 /**
00314   * Sets the covariance-matrix (sigmas and validity will be correctly set, too)
00315   */
00316 void GaussBell::setCovarianceMatrix(double _validity, double _deltaX, double _deltaY)
00317 { 
00318   double diagonal = sqrt(sqr(_deltaX) + sqr(_deltaY)); // Pythagoras
00319   
00320   if (diagonal > 0.00001) 
00321   {
00322      this->rotationAngle = asin(_deltaX / diagonal);
00323   }
00324   else
00325   {
00326       this->rotationAngle = 0;
00327   }
00328 
00329   validity = _validity;
00330   transformValidityToSigma(); // creates sigmaMaj and sigmaMin
00331   updateCovarianceMatrix();
00332 
00333 }
00334 
00335 
00336 /**
00337   * Sets the covariance-matrix (sigmas and validity will be correctly set, too)
00338   */
00339 void GaussBell::setCovarianceMatrix(double _sigmaMaj, double _sigmaMin, double _deltaX, double _deltaY)
00340 { 
00341   double diagonal = sqrt(sqr(_deltaX) + sqr(_deltaY)); // Pythagoras
00342   if (diagonal > 0.00001) 
00343   {
00344       rotationAngle = asin(_deltaX / diagonal);
00345   }
00346   else
00347   {
00348       rotationAngle = 0;
00349   }
00350   
00351   sigmaMaj = _sigmaMaj;
00352   sigmaMin = _sigmaMin;
00353   transformSigmaToValidity();
00354   updateCovarianceMatrix(); 
00355 }
00356 
00357 
00358 /** 
00359   * position = _positionOfMaximum
00360   */
00361 void GaussBell::setPositionOfMaximum(Vector2<double> _positionOfMaximum)
00362 {
00363   position = _positionOfMaximum;
00364 }
00365 
00366 
00367 /** 
00368   * Sets the rotation-angle and updates the covariance-matrix
00369   */
00370 void GaussBell::setRotationAngle(double _rotationAngle)
00371 {
00372   rotationAngle = _rotationAngle;
00373   updateCovarianceMatrix();
00374 }
00375 
00376 
00377 /** 
00378   * timeStamp = _timeStampGaussBell
00379   */
00380 void GaussBell::setTimeStamp(unsigned long _timeStampGaussBell)
00381 {
00382   timeStampGaussBell = _timeStampGaussBell;
00383 }
00384 
00385 
00386 /** 
00387   * Sets a dafault time-stamp (current system time)
00388   */
00389 void GaussBell::setTimeStamp()
00390 {
00391   timeStampGaussBell =  SystemCall::getCurrentSystemTime();
00392 }
00393 
00394 
00395 /** 
00396   * Sets the sigma-values and updates the covariance-matrix and the validity
00397   */
00398 void GaussBell::setSigmas(double _sigmaMaj, double _sigmaMin)
00399 {
00400   sigmaMaj = _sigmaMaj;
00401   sigmaMin = _sigmaMin;
00402 
00403   updateCovarianceMatrix();
00404   transformSigmaToValidity();
00405 }
00406 
00407 
00408 /** 
00409   * similar to setValidity
00410   */
00411 void GaussBell::updateValidity(double _validity)
00412 {
00413   this->validity = _validity;
00414   if (validity >= 1.0) 
00415     validity = 0.99;
00416 
00417   transformValidityToSigma();
00418   updateCovarianceMatrix();
00419 }
00420 
00421 
00422 /** 
00423   * Calculates the sigma-values from the validity
00424   */
00425 void GaussBell::transformValidityToSigma()
00426 {
00427   if (validity == 1) 
00428   {
00429     validity = 0.999; // validity == 1 is not possibel, because the bell would be a peac.
00430   }
00431   double factor = invProb[(int)(sqrt(validity)*1000)] / 100.0;
00432   sigmaMaj = radiusMaj / factor;
00433   sigmaMin = radiusMin / factor;
00434 }
00435 
00436 
00437 /** 
00438   * Calculates the validity from the sigma-values
00439   */
00440 void GaussBell::transformSigmaToValidity()
00441 {
00442   double index1 = 329;
00443   double index2 = 329;
00444   if (sigmaMaj > 0.5) {
00445     index1 = (radiusMaj / sigmaMaj) * 100.0;
00446   }
00447   if (sigmaMin > 0.5) {
00448     index2 = (radiusMin / sigmaMin) * 100.0;
00449   }
00450 
00451   if (index1>329) {
00452     index1=329;
00453   } else {
00454     if (index1 < 0) {
00455       index1 = 0;
00456     }
00457   }
00458   if (index2>329) {
00459     index2=329;
00460   } else {
00461     if (index2 < 0) {
00462       index2 = 0;
00463     }
00464   }
00465   validity = (2 * phi[ int(index1) ] / 10000.0 - 1) 
00466                *
00467              (2 * phi[ int(index2) ] / 10000.0 - 1);
00468 }
00469 
00470 
00471 /**
00472   * Returns the angle of the gauss bell. (angle between x-axis and major-axis of bell).
00473   */ 
00474 double GaussBell::getAngle() 
00475 {
00476      return rotationAngle;
00477 }
00478 
00479 
00480 void GaussBell::getSigmas(double& SigmaMaj, double& SigmaMin) {
00481   SigmaMaj = this->sigmaMaj;
00482   SigmaMin = this->sigmaMin;  
00483 }
00484 
00485 
00486 /**
00487   * Update the Covariance-Matrix if the rotationAngel or the sigmas changed.
00488   */ 
00489 void GaussBell::updateCovarianceMatrix()
00490 {
00491   // Update the Covariance-Matrix if the rotationAngel or the sigmas changed
00492 
00493   Matrix2x2<double> rotationMatrix;
00494 
00495   rotationMatrix.c[0].x =  rotationMatrix.c[1].y = cos(-rotationAngle);
00496   rotationMatrix.c[0].y =  sin(-rotationAngle);
00497   rotationMatrix.c[1].x =  -rotationMatrix.c[0].y;  
00498  
00499   this->covarianceMatrix.c[0].x = (this->sigmaMaj)*(this->sigmaMaj);
00500   this->covarianceMatrix.c[1].y = (this->sigmaMin)*(this->sigmaMin);
00501   this->covarianceMatrix.c[0].y = 0.0;
00502   this->covarianceMatrix.c[1].x = 0.0;
00503  
00504   // C_new = R(-TETA)trans*C_old*R(-TETA):
00505   this->covarianceMatrix = (rotationMatrix.transpose()) * this->covarianceMatrix * rotationMatrix; 
00506 }
00507 
00508 
00509 /** 
00510   * Updates the sigmas and the angle
00511   */
00512 void GaussBell::updateSigmasAndAngle()
00513 {
00514   
00515   if ((covarianceMatrix.c[0].x-covarianceMatrix.c[1].y) > 0.0000001)
00516     rotationAngle = (atan(2*covarianceMatrix.c[1].x/(covarianceMatrix.c[0].x-covarianceMatrix.c[1].y)) / 2.0);
00517   else 
00518   {
00519     if (covarianceMatrix.c[0].y < 0.0)
00520       rotationAngle = -pi_4;   // -45 degree
00521     else rotationAngle = pi_4; //  45 degree
00522   }
00523   
00524   Matrix2x2<double> rotationMatrix;
00525 
00526   rotationMatrix.c[0].x = cos(rotationAngle);
00527   rotationMatrix.c[0].y = sin(rotationAngle);
00528   rotationMatrix.c[1].x = - rotationMatrix.c[0].y;
00529   rotationMatrix.c[1].y = rotationMatrix.c[0].x;
00530 
00531   Matrix2x2<double> tmp = 
00532          (rotationMatrix.transpose()) * covarianceMatrix * rotationMatrix;
00533   sigmaMaj = sqrt(tmp.c[0].x);
00534   sigmaMin = sqrt(tmp.c[1].y);
00535 }
00536 
00537 
00538 
00539 /*
00540  * Changelog:
00541  * 
00542  * $Log: GaussBell.cpp,v $
00543  * Revision 1.1.1.1  2004/05/22 17:37:03  cvsadm
00544  * created new repository GT2004_WM
00545  *
00546  * Revision 1.3  2004/01/28 08:28:02  dueffert
00547  * beautified
00548  *
00549  * Revision 1.2  2003/11/17 15:15:20  dueffert
00550  * doxygen docu corrected
00551  *
00552  * Revision 1.1  2003/10/07 10:13:24  cvsadm
00553  * Created GT2004 (M.J.)
00554  *
00555  * Revision 1.2  2003/09/28 09:28:48  juengel
00556  * Comments corrected.
00557  *
00558  * Revision 1.1  2003/09/26 11:40:40  juengel
00559  * - sorted tools
00560  * - clean-up in DataTypes
00561  *
00562  * Revision 1.1.1.1  2003/07/02 09:40:28  cvsadm
00563  * created new repository for the competitions in Padova from the 
00564  * tamara CVS (Tuesday 2:00 pm)
00565  *
00566  * removed unused solutions
00567  *
00568  * Revision 1.2  2003/05/19 15:35:01  wachter
00569  * Moved genration of debug-drawing
00570  *
00571  * Revision 1.1  2003/05/19 09:17:30  wachter
00572  * Renamed SensorFusionGaussBell to GaussBell as requested.
00573  *
00574  * Revision 1.32  2003/05/05 12:02:00  dueffert
00575  * platform independence restored
00576  *
00577  * Revision 1.31  2003/04/25 16:09:41  engel
00578  * Comments inserted
00579  *
00580  * Revision 1.30  2003/04/19 03:09:28  pruente
00581  * Changes by Sebastian S.: -Bugfix and avoidance of phantoms
00582  *
00583  * Revision 1.30  2003/04/10 16:32:44  schmidt
00584  * Bugfix and avoidance of phantoms
00585  *
00586  * Revision 1.29  2003/04/07 17:03:18  thiel
00587  * Catch wrong values causing a crash
00588  *
00589  * Revision 1.28  2003/04/06 15:57:52  engel
00590  * Little changes (cosmetic and some improvements).
00591  *
00592  * Revision 1.27  2003/04/01 16:12:11  schmidt
00593  * Bugfix
00594  *
00595  * Revision 1.26  2003/04/01 15:57:52  wachter
00596  * Fix of transformValidityToSigma
00597  *
00598  * Revision 1.25  2003/04/01 15:16:26  engel
00599  * if-case befor a division to fix a possibel division by zero
00600  *
00601  * Revision 1.24  2003/04/01 10:35:09  schmidt
00602  * Removed outcommented code line
00603  *
00604  * Revision 1.23  2003/04/01 09:18:33  schumann
00605  * fixed division by zero
00606  *
00607  * Revision 1.22  2003/04/01 08:06:22  engel
00608  * Adaption of InvProb[]-Table.
00609  * Division by Zero fixed...
00610  *
00611  * Revision 1.21  2003/03/31 14:03:06  wachter
00612  * Cleanup of SensorFusionGaussBell,
00613  * added "real" Validity to SensorFusionGaussBell
00614  *
00615  * Revision 1.20  2003/03/27 16:17:23  engel
00616  * Invalid BallPercepepts will be destroyed or repaired...
00617  *
00618  * Revision 1.19  2003/03/26 15:36:00  engel
00619  * Body for calculateValidityOfBall(...) inserted.
00620  * Changes for test-text-files.
00621  * Calculation of sigmas from Validity.
00622  *
00623  * Revision 1.18  2003/03/21 15:11:52  engel
00624  * fixed crash for dx=dy=0
00625  * inserted getValitityAtPositionOfMaximum()
00626  *
00627  * Revision 1.17  2003/03/20 18:28:16  engel
00628  * Bug in Hisrtory fixed. The Value (0,0) is NOT an angle.
00629  *
00630  * Revision 1.16  2003/03/18 13:40:53  wachter
00631  * Bugfixes
00632  *
00633  * Revision 1.15  2003/03/14 16:04:46  wachter
00634  * Bugfixes
00635  *
00636  * Revision 1.14  2003/03/11 11:34:30  engel
00637  * Debug-changes
00638  *
00639  * Revision 1.13  2003/03/06 16:22:11  wachter
00640  * Divsion by zero fixed.
00641  *
00642  * Revision 1.12  2003/03/06 11:33:05  engel
00643  * Debug-Changes
00644  *
00645  * Revision 1.11  2003/03/05 16:44:37  engel
00646  * Factor set to 1.0/3.0 (again)
00647  *
00648  * Revision 1.10  2003/03/05 16:20:57  engel
00649  * Initialization changed.
00650  * If one ball was seen with validity 0 it will not be merged!
00651  * Still working on...
00652  *
00653  * Revision 1.9  2003/03/04 16:44:07  engel
00654  * still working on (testing)
00655  *
00656  * Revision 1.8  2003/03/04 11:55:04  engel
00657  * still working on...
00658  *
00659  * Revision 1.7  2003/02/28 16:29:26  engel
00660  * still working on ;-))
00661  *
00662  * Revision 1.6  2003/02/28 12:08:35  engel
00663  * Still working on ;-)
00664  *
00665  * Revision 1.5  2003/02/26 19:08:37  roefer
00666  * warnings removed
00667  *
00668  * Revision 1.4  2003/02/25 16:49:57  engel
00669  * some changes to calculate the validity (mean-Value)
00670  *
00671  * Revision 1.3  2003/02/21 16:34:16  dueffert
00672  * common pi in own code, warnings removed, platform compatibility restored
00673  *
00674  * Revision 1.2  2003/02/21 12:21:14  engel
00675  * Now the angles PI/4 and -PI/4 can be calculated.
00676  * The angles are allways given in [0, 2PI].ö
00677  *
00678  * Revision 1.1  2003/02/14 14:34:02  wachter
00679  * Added SensorFusionBallLocator
00680  *
00681  */
00682 
00683 
00684 
00685 

Generated on Thu Sep 23 19:57:38 2004 for GT2004 by doxygen 1.3.6