Changeset 17339 for trunk/FACT++/src
- Timestamp:
- 11/21/13 17:31:58 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fscctrl.cc
r17186 r17339 11 11 #include "Console.h" 12 12 #include "Converter.h" 13 #include " ../externals/Interpolator2D.h"13 #include "externals/Interpolator2D.h" 14 14 15 15 #include "tools.h" … … 37 37 38 38 protected: 39 vector< pair<double,double>> fPositionsSensors;40 vector< pair<double,double>> fPositionsBias;39 vector<Interpolator2D::vec> fPositionsSensors; 40 vector<Interpolator2D::vec> fPositionsBias; 41 41 42 42 virtual void UpdateTemp(float, const vector<float> &) … … 631 631 } 632 632 633 void SetPositionsSensors(const vector< pair<double,double>> &vec)633 void SetPositionsSensors(const vector<Interpolator2D::vec> &vec) 634 634 { 635 635 fPositionsSensors = vec; 636 636 } 637 637 638 void SetPositionsBias(const vector< pair<double,double>> &vec)638 void SetPositionsBias(const vector<Interpolator2D::vec> &vec) 639 639 { 640 640 fPositionsBias = vec; … … 682 682 { 683 683 T.emplace_back(temp[i]); 684 xy.emplace_back(fPositionsSensors[i] .first, fPositionsSensors[i].second);684 xy.emplace_back(fPositionsSensors[i]); 685 685 686 686 avg += temp[i]; … … 913 913 T::AddEvent("RECONNECT", "O", State::kDisconnected, State::kConnected) 914 914 (bind(&StateMachineFSC::Reconnect, this, placeholders::_1)) 915 ("(Re)connect ethernet connection to F TM, a new address can be given"915 ("(Re)connect ethernet connection to FSC, a new address can be given" 916 916 "|[host][string]:new ethernet address in the form <host:port>"); 917 917 … … 924 924 } 925 925 926 vector<pair<double,double>> ReadVector(const string &filename) const927 {928 vector<pair<double,double>> vec;929 930 ifstream fin(filename);931 while (1)932 {933 double x, y;934 fin >> x;935 fin >> y;936 if (!fin)937 break;938 939 vec.emplace_back(x, y);940 }941 942 return vec;943 }944 945 926 int EvalOptions(Configuration &conf) 946 927 { … … 948 929 949 930 const string fname1 = conf.Get<string>("sensor-pos-file"); 950 const auto v1 = ReadVector(fname1);931 const auto v1 = Interpolator2D::ReadGrid(fname1); 951 932 if (v1.size() != 31) 952 933 { 953 Error("Reading sensor positions from "+fname1+"failed ("+to_string(v1.size())+")");934 T::Error("Reading sensor positions from "+fname1+"failed ("+to_string(v1.size())+")"); 954 935 return 1; 955 936 } 956 937 957 938 const string fname2 = conf.Get<string>("patch-pos-file"); 958 const auto v2 = ReadVector(fname2);939 const auto v2 = Interpolator2D::ReadGrid(fname2); 959 940 if (v2.size() != 320) 960 941 { 961 Error("Reading bias patch positions from "+fname2+"failed ("+to_string(v2.size())+")");942 T::Error("Reading bias patch positions from "+fname2+"failed ("+to_string(v2.size())+")"); 962 943 return 1; 963 944 }
Note:
See TracChangeset
for help on using the changeset viewer.