38 std::string outFile =
"CalibrationTest_" + type;
41 if (fit ==
"identity1") {
45 double param0 = std::stof(string0);
47 out = std::to_string(param0);
48 outFile +=
"_" + string0 ;
49 }
else if (fit ==
"identity2") {
53 double param0 = std::stof(string0);
55 double param1 = std::stof(string1);
57 out = std::to_string(param0) +
' ' + std::to_string(param1);
58 outFile +=
"_" + string0 +
"_" + string1;
59 }
else if (fit ==
"calibration43") {
63 double restitutionCoefficient = std::stof(string0);
65 double slidingFriction = std::stof(string1);
67 double rollingFriction = std::stof(string2);
69 double bondNumber = std::stof(string3);
74 double ffc = 1.0/bondNumber;
75 double angleOfRepose = slidingFriction;
76 double drum = rollingFriction;
78 out = std::to_string(ffc) +
' ' + std::to_string(angleOfRepose) +
' ' + std::to_string(drum);
79 outFile +=
"_" + string0 +
"_" + string1 +
"_" + string2 +
"_" + string3;
80 }
else if (fit ==
"calibration44") {
84 double restitutionCoefficient = std::stof(string0);
86 double slidingFriction = std::stof(string1);
88 double rollingFriction = std::stof(string2);
90 double bondNumber = std::stof(string3);
92 double dummy = restitutionCoefficient;
93 double ffc = 1.0/bondNumber;
94 double angleOfRepose = slidingFriction;
95 double drum = rollingFriction;
97 out = std::to_string(dummy) +
' ' + std::to_string(ffc) +
' ' + std::to_string(angleOfRepose) +
' ' + std::to_string(drum);
98 outFile +=
"_" + string0 +
"_" + string1 +
"_" + string2 +
"_" + string3;
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
bool readFromCommandLine(int argc, char *argv[], std::string varName)
Returns true if command line arguments contain varName, false else.
Definition: CommandLineHelpers.cc:103
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:58