Go to the documentation of this file.00001
00012 #ifndef REDNAV_SENSORMODEL_HPP
00013 #define REDNAV_SENSORMODEL_HPP
00014
00015 #include <stdlib.h>
00016
00017 #include <lgl/Attributes.hpp>
00018 #include <lgl/GeoData.hpp>
00019
00020 namespace jafar {
00021 namespace rednav {
00022
00027 class SensorModel {
00028 private:
00047 double* sensormat;
00048
00054 int sensormatSize;
00055
00056 int randomModel;
00057
00059 double sensorRange;
00060
00062 double maxChanfreinDist;
00063
00065 double shortRangeChanfreinDist;
00066
00071 int distanceDampingModel;
00072
00074 double distanceDampingFactor;
00075
00079 double visibilityMinRadius;
00080
00081 public:
00083 ~SensorModel();
00084
00086 SensorModel();
00087
00089 SensorModel(int n);
00090
00092 bool watchCell(int i, int j, jafar::lgl::GeoData* gdin, jafar::lgl::GeoData* gdout);
00093
00095 bool watchAttributes(const jafar::lgl::Attributes &attin, jafar::lgl::Attributes& attout);
00096
00098 bool calculateInformationGain(int i, int j, jafar::lgl::GeoData* gdin, double& result);
00099
00101 bool simulateCellVision(int i, int j, jafar::lgl::GeoData* gdin, jafar::lgl::GeoData* gdout);
00102
00109 bool simulateAttributes(const jafar::lgl::Attributes &attreal, jafar::lgl::Attributes& attout, double dist);
00110
00115 bool checkModelAppliance(const jafar::lgl::Attributes &attin);
00116
00124 double chanfreinDistance(int ao, int bo, int a, int b);
00125
00135 bool isIntervisible(jafar::lgl::GeoData* geoWorld, int x1coord, int y1coord, int x2coord, int y2coord);
00136
00152 bool isLandDrivable(jafar::lgl::GeoData* geoWorld, int x1coord, int y1coord, int x2coord, int y2coord);
00153
00163 double getDistanceFactor(int ox, int oy, int i, int j, jafar::lgl::GeoData* geoW=NULL);
00164
00168 double getVisibilityMinRadius();
00169
00171 bool setSensorMatrix(int i, int j, double val);
00172
00174 void setSensorRange(double ssr);
00175
00177 void setDistanceDampingModel(int mod_);
00178
00184 void setVisibilityMinRadius(double vmr_);
00185 };
00186 }
00187 }
00188
00189 #endif
00190