Skip to content

Commit

Permalink
cMes1GCP::SigmasXYZ()
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmuller committed Jun 13, 2024
1 parent c0261e5 commit 44fbb21
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
6 changes: 5 additions & 1 deletion MMVII/include/MMVII_MeasuresIm.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,16 @@ class cMes1GCP
{
public :

cMes1GCP(const cPt3dr & aPt,const std::string & aNamePt,tREAL4 aSigma,
// aSigma==-1 for free point
cMes1GCP(const cPt3dr & aPt,const std::string & aNamePt,tREAL4 aSigma=-1,
const std::string &aAdditionalInfo="");

cMes1GCP();
/// change the coordinate with mapping ! For now dont update sigma using the jacobian, maybe later ...
void ChangeCoord(const cDataMapping<tREAL8,3,3>&);
bool isFree() const {return !mOptSigma2;}
cPt3dr SigmasXYZ() const;

cPt3dr mPt;
std::string mNamePt;
static constexpr int IndXX = 0;
Expand Down
24 changes: 19 additions & 5 deletions MMVII/src/Sensors/Measures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,15 +505,19 @@ cMes1GCP::cMes1GCP(const cPt3dr & aPt, const std::string & aNamePt, tREAL4 aSigm
mPt (aPt),
mNamePt (aNamePt),
mAdditionalInfo(aAdditionalInfo),
mOptSigma2 { {0,0,0,0,0,0} }
mOptSigma2(std::nullopt)
{
(*mOptSigma2)[IndXX] = aSigma;
(*mOptSigma2)[IndYY] = aSigma;
(*mOptSigma2)[IndZZ] = aSigma;
if (aSigma>=0.)
{
mOptSigma2 = {0.,0.,0.,0.,0.,0.};
(*mOptSigma2)[IndXX] = Square(aSigma);
(*mOptSigma2)[IndYY] = Square(aSigma);
(*mOptSigma2)[IndZZ] = Square(aSigma);
}
}

cMes1GCP::cMes1GCP() :
cMes1GCP (cPt3dr(0,0,0),"??",-1)
cMes1GCP (cPt3dr(0,0,0),"??")
{
}

Expand All @@ -531,6 +535,16 @@ void cMes1GCP::ChangeCoord(const cDataMapping<tREAL8,3,3>& aMapping)
mPt = aMapping.Value(mPt);
}

cPt3dr cMes1GCP::SigmasXYZ() const
{
if (mOptSigma2)
{
return {sqrt((*mOptSigma2)[IndXX]), sqrt((*mOptSigma2)[IndXX]), sqrt((*mOptSigma2)[IndXX]) };
} else {
return cPt3dr::Dummy();
}
}

/* ********************************************* */
/* */
/* cSetMesGCP */
Expand Down

0 comments on commit 44fbb21

Please sign in to comment.