merged windows stuff from bulli... hope it works now

This commit is contained in:
toni
2018-05-15 09:42:13 +02:00
2 changed files with 39 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
#include "main.h"
//#include "main.h"
#include "navMesh/mesh.h"
#include "navMesh/filter.h"
@@ -8,6 +8,7 @@
#include <memory>
#include <thread>
#include <experimental/filesystem>
#include <Indoor/floorplan/v2/FloorplanReader.h>
#include <Indoor/sensors/radio/model/WiFiModelLogDistCeiling.h>
@@ -34,24 +35,23 @@ Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std::string
WiFiFingerprints fingerprints(setup.fingerprints);
std::ifstream inp(setup.wifiModel, std::ifstream::binary);
//ground truth
// ground truth
std::vector<int> gtPath;
for(int i = 0; i < setup.numGTPoints; ++i){gtPath.push_back(i);}
Interpolator<uint64_t, Point3> gtInterpolator = fr.getGroundTruthPath(map, gtPath);
Stats::Statistics<float> errorStats;
//error file
// error file
const long int t = static_cast<long int>(time(NULL));
const std::string evalDir = Settings::errorDir + folder;
struct stat statStruct;
stat(evalDir.c_str(), &statStruct);
if(!S_ISDIR(statStruct.st_mode)){
if(mkdir(evalDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1){
Assert::doThrow("Eval folder couldn't be created!");
}
}
auto evalDir = std::experimental::filesystem::path(Settings::errorDir);
evalDir.append(folder);
if (!std::experimental::filesystem::exists(evalDir)) {
std::experimental::filesystem::create_directory(evalDir);
}
std::ofstream errorFile;
errorFile.open (evalDir + "/" + std::to_string(numFile) + "_" + std::to_string(t) + ".csv");
errorFile.open (evalDir.string() + "/" + std::to_string(numFile) + "_" + std::to_string(t) + ".csv");
// wifi