Skip to content

Commit

Permalink
clean topo
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmuller committed Oct 10, 2024
1 parent 080ceab commit 475b0ea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
4 changes: 2 additions & 2 deletions MMVII/include/MMVII_Topo.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class cBA_Topo : public cMemCheck
{
friend class cTopoData;
public :
cBA_Topo(cPhotogrammetricProject *aPhProj, cMMVII_BundleAdj *aBA);
cBA_Topo(cPhotogrammetricProject *aPhProj);
~cBA_Topo();
void clear();

Expand All @@ -50,7 +50,7 @@ public :
bool tryInitAll();
bool tryInit(cTopoPoint & aTopoPt, tStationsMap & stationsMap, tSimpleObsMap &allSimpleObs);

bool mergeUnknowns(cResolSysNonLinear<tREAL8> &aSys); //< if several stations share origin etc.
bool mergeUnknowns(); //< if several stations share origin etc.
void makeConstraints(cResolSysNonLinear<tREAL8> &aSys);
const std::map<std::string, cTopoPoint> & getAllPts() const { return mAllPts; }
std::map<std::string, cTopoPoint> & getAllPts() { return mAllPts; }
Expand Down
2 changes: 1 addition & 1 deletion MMVII/src/BundleAdjustment/cMMVII_BundleAdj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ void cMMVII_BundleAdj::SaveTopo()

void cMMVII_BundleAdj::AddTopo() // TOPO
{
mTopo = new cBA_Topo(mPhProj, this);
mTopo = new cBA_Topo(mPhProj);
}

}; // MMVII
Expand Down
8 changes: 4 additions & 4 deletions MMVII/src/Topo/Topo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void cMMVII_BundleAdj::InitItereTopo()


cBA_Topo::cBA_Topo
(cPhotogrammetricProject *aPhProj, cMMVII_BundleAdj* aBA) :
(cPhotogrammetricProject *aPhProj) :
mPhProj (aPhProj),
mTopoObsType2equation
{
Expand Down Expand Up @@ -82,7 +82,7 @@ void cBA_Topo::findPtsUnknowns(const std::vector<cBA_GCP*> & vGCP, cPhotogrammet
{
for (auto & [aName, aTopoPt] : getAllPts())
{
aTopoPt.findUK(vGCP, aPhProj, aTopoPt.getInitCoord());
aTopoPt.findUK(vGCP, aPhProj);
}
}

Expand Down Expand Up @@ -236,7 +236,7 @@ void cBA_Topo::AddToSys(cSetInterUK_MultipeObj<tREAL8> & aSetInterUK)
aSetInterUK.AddOneObj(anObsSet);
}

bool cBA_Topo::mergeUnknowns(cResolSysNonLinear<tREAL8> &aSys)
bool cBA_Topo::mergeUnknowns()
{
bool ok = true;
for (auto &set: mAllObsSets)
Expand Down Expand Up @@ -291,7 +291,7 @@ const cTopoPoint & cBA_Topo::getPoint(std::string name) const
void cBA_Topo::SetFrozenAndSharedVars(cResolSysNonLinear<tREAL8> & aSys)
{
// create unknowns for all stations
mergeUnknowns(aSys); //
mergeUnknowns(); //
makeConstraints(aSys);
}

Expand Down
8 changes: 1 addition & 7 deletions MMVII/src/Topo/ctopopoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ cTopoPoint::cTopoPoint(const std::string &name) :
{
}

cTopoPoint::cTopoPoint(const std::string & name, const cPt3dr &aInitCoord, bool aIsFree, const cPt3dr &aSigmas) :
mName(name), mInitCoord(aInitCoord),
mVertDefl(std::nullopt), mUK(nullptr), mPt(nullptr)
{
}


cTopoPoint::cTopoPoint() :
mName(""), mInitCoord(cPt3dr::Dummy()), mVertDefl(std::nullopt),
Expand All @@ -26,7 +20,7 @@ cTopoPoint::cTopoPoint() :
}


void cTopoPoint::findUK(const std::vector<cBA_GCP *> & vGCP, cPhotogrammetricProject *aPhProj, const cPt3dr & aCoordIfPureTopo)
void cTopoPoint::findUK(const std::vector<cBA_GCP *> & vGCP, cPhotogrammetricProject *aPhProj)
{
#ifdef VERBOSE_TOPO
StdOut() << "findUK "<<mName<<": ";
Expand Down
3 changes: 1 addition & 2 deletions MMVII/src/Topo/ctopopoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ class cTopoPoint : public cMemCheck
friend class cTopoData;
public:
cTopoPoint(const std::string & name);
cTopoPoint(const std::string & name, const cPt3dr &aInitCoord, bool aIsFree, const cPt3dr &aSigmas);
cTopoPoint();

void findUK(const std::vector<cBA_GCP *> &vGCP, cPhotogrammetricProject *aPhProj, const cPt3dr &aCoordIfPureTopo); //< all params can be null
void findUK(const std::vector<cBA_GCP *> &vGCP, cPhotogrammetricProject *aPhProj); //< all params can be null
cPt3dr* getPt() const;
cObjWithUnkowns<tREAL8>* getUK() const;
bool isReady() const { return mUK!=nullptr; } //< ready after findOrMakeUK. Can't use in equations if not ready
Expand Down

0 comments on commit 475b0ea

Please sign in to comment.