20 #ifndef _PKSENSORMODEL_H_ 21 #define _PKSENSORMODEL_H_ 25 #include "models/SensorModel.h" 27 double objFunction(
const std::vector<double> &x, std::vector<double> &grad,
void *my_func_data);
32 DataModel(
const SensorModel::SensorModel& theModel) : m_model(theModel), m_threshold(0){};
34 void setModel(
const SensorModel::SensorModel& theModel){m_model=theModel;};
35 const SensorModel::SensorModel& getModel()
const {
return m_model;};
36 int getSize()
const{
return m_posGCP.size();};
37 void setThreshold(
double theThreshold){m_threshold=theThreshold;};
38 double getThreshold(){
return m_threshold;};
40 m_attPlatform.erase(m_attPlatform.begin()+index);
41 m_posPlatform.erase(m_posPlatform.begin()+index);
42 m_posGCP.erase(m_posGCP.begin()+index);
43 m_row.erase(m_row.begin()+index);
44 m_col.erase(m_col.begin()+index);
46 int pushAttPlatform(
const arma::vec& atp){m_attPlatform.push_back(atp);
return m_attPlatform.size();};
47 int pushPosPlatform(
const arma::vec& ppl){m_posPlatform.push_back(ppl);
return m_posPlatform.size();};
48 int pushPosGCP(
const arma::vec& pgcp){m_posGCP.push_back(pgcp);
return m_posGCP.size();};
49 int pushRow(
int r){m_row.push_back(r);
return m_row.size();};
50 int pushCol(
int c){m_col.push_back(c);
return m_col.size();};
51 arma::vec getPosPlatform(
int index)
const{assert(index>=0);assert(index<m_posPlatform.size());
return(m_posPlatform[index]);};
52 arma::vec getAttPlatform(
int index)
const{assert(index>=0);assert(index<m_attPlatform.size());
return(m_attPlatform[index]);};
53 arma::vec getPosGCP(
int index)
const{assert(index>=0);assert(index<m_posGCP.size());
return(m_posGCP[index]);};
54 arma::vec getPos(
int index)
const{
56 assert(index<m_posPlatform.size());
57 assert(index<m_attPlatform.size());
58 assert(index<m_row.size());
59 assert(index<m_col.size());
60 assert(index<m_posGCP.size());
61 return(m_model.getPos(m_posPlatform[index],m_attPlatform[index],m_row[index],m_col[index],m_posGCP[index][2]));
63 double getDistGeo(
int index)
const{assert(index>=0);assert(index<m_posGCP.size());
return(m_model.getDistGeo(m_posGCP[index],getPos(index)));};
64 int getRow(
int index)
const{assert(index>=0);assert(index<m_row.size());
return(m_row[index]);};
65 int getCol(
int index)
const{assert(index>=0);assert(index<m_col.size());
return(m_col[index]);};
66 double getHeight(
int index)
const{assert(index>=0);assert(index<m_posGCP.size());
return(m_posGCP[index][2]);};
67 void setBoresightAtt(
const arma::vec& bc_att){
68 m_model.setBoresightAtt(bc_att);
73 SensorModel::SensorModel m_model;
74 vector<arma::vec> m_posPlatform;
75 vector<arma::vec> m_posGCP;
76 vector<arma::vec> m_attPlatform;
82 #endif //_PKSENSORMODEL_H_