Affichage debug dans monitorClient()

Qql affichages de débug dans monitorClient pour Soum.
(et Dom qui parle de têtes et de queues à Seb en face de moi)

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@61 785a6c6c-259e-4ff1-8b91-dc31627914f0
This commit is contained in:
Frédéric Lassabe 2008-07-17 14:58:53 +00:00 committed by Matteo Cypriani
parent 87ce0df1c5
commit 9b12e3cb0d
3 changed files with 45 additions and 36 deletions

View File

@ -16,4 +16,4 @@
00:13:CE:8F:77:43;7.085;4.13;0.74;2417000000;5.0;20.0
# mini1 (Adrien)
00:13:CE:8F:78:D9;30.35;5.74;0.98;2417000000;5.0;20.0
00:13:CE:8F:78:D9;5.74;30.35;0.98;2417000000;5.0;20.0

View File

@ -1092,7 +1092,7 @@ Point Server::fbcm(const vector<Measurement> &m, const int &client_idx)const
minmax_res = 1000000;
for (x = MINMAX_X_START ; x < MINMAX_X_STOP ; x += MINMAX_STEP)
for (y = MINMAX_Y_START ; y < MINMAX_Y_STOP ; y += MINMAX_STEP)
for(z = MINMAX_Z_START ; z <= MINMAX_Z_STOP ; z += MINMAX_Z_STEP)
for(z = MINMAX_Z_START ; z <= MINMAX_Z_STOP ; z += MINMAX_STEP)
{
minmax_max = 0;
for (i = 0 ; i < centres.size() ; i++)
@ -2143,8 +2143,6 @@ vector<float> Server::computeFriisFromRefList(const Point &p, const vector<Measu
}
}
}
for (unsigned int k=0; k < friis_idx_list.size();k++)
cout<<"friis_idx_list"<< k <<": "<<friis_idx_list[k]<<endl;//
#ifdef DEBUG_T
cout << "//<-- Server::computeFriisFromRefList(&Point, &vector<Measurement>)" << endl ; fflush(stdout) ;
@ -2263,6 +2261,11 @@ void Server::monitorClient(const unsigned int &client_id, const ALGORITHM &algo)
cout << "Position: " << position << endl;
friisFromList = computeFriisFromRefList(position, vm) ;
//fbcm_friis(vm, friisFromList) ;
//Just to see
cout << "---------------------------" << endl;
for(unsigned int prout = 0 ; prout < access_point_list.size() ; prout ++)
cout << "Dist between ap " << access_point_list[prout].getCoordinates() << " and true point = " << access_point_list[prout].getCoordinates().distance(peregrination_point_list[pt].getCoordinates()) << endl;
//end of 'just to see'
Frbhmbasique = fbcm_friis(vm, friisFromList, position.getZ());
cout << "Point selectionné final: " << Frbhmbasique << endl;
fichier.open(filename.c_str(), std::ios::app);
@ -2277,6 +2280,13 @@ void Server::monitorClient(const unsigned int &client_id, const ALGORITHM &algo)
case ALGO_CONTINU_FRBHM : /* Application de l'algorithme FRBHM continu */
cout << "--------FRBHM CONTINU------------" << endl ;
//computeFriisFromRefList();
//Just to see
cout << "---------------------------" << endl;
for(unsigned int prout = 0 ; prout < access_point_list.size() ; prout ++)
cout << "Dist between ap " << access_point_list[prout].getCoordinates() << " and true point " << peregrination_point_list[pt].getCoordinates() << " = " << access_point_list[prout].getCoordinates().distance(peregrination_point_list[pt].getCoordinates()) << endl;
//end of 'just to see'
for (unsigned int i = 0 ; i < E_current.size() ; i++)
{
friisFromList = computeFriisFromRefList(E_current[i], vm) ;

View File

@ -40,13 +40,12 @@ typedef ClientInfo::float_index float_index ;
#define DEFAULT_LISTEN_PORT 7777
#define LIGHT_SPEED 300000000
#define MINMAX_STEP 0.5
#define MINMAX_Z_STEP 3
#define MINMAX_X_START -1
#define MINMAX_Y_START -1
#define MINMAX_Z_START 0
#define MINMAX_X_STOP 15
#define MINMAX_Y_STOP 45
#define MINMAX_Z_STOP 3
#define MINMAX_Z_STOP 6
#define BUFFER_LENGTH 5000
//#define DEFAULT_Z 3 // Décommenter pour utiliser des fichiers d'entrée avec des coordonnées dans un seul plan (X, Y).
//#define FRED_CSV_FORMAT // Décommenter pour utiliser les fichiers CSV au « format Fred » (plusieurs lignes par mesure, avec un AP par ligne).