From 959d66a0729a8eb51eb1c1a2260fe1901643dd2f Mon Sep 17 00:00:00 2001 From: jmmuller Date: Wed, 19 Jun 2024 12:28:29 +0200 Subject: [PATCH] Topo: do not search for verical on stations without angles --- MMVII/Doc/CommandReferences/SysCo.tex | 6 +++--- MMVII/src/Topo/ctopoobsset.cpp | 12 ++++++++++-- MMVII/src/Topo/ctopoobsset.h | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/MMVII/Doc/CommandReferences/SysCo.tex b/MMVII/Doc/CommandReferences/SysCo.tex index b77d48c5e2..a3091fed08 100644 --- a/MMVII/Doc/CommandReferences/SysCo.tex +++ b/MMVII/Doc/CommandReferences/SysCo.tex @@ -194,10 +194,10 @@ \section{{\tt TopoAdj} command} The {\tt TopoAdj} command can perform an adjustment between survey and GCP constraints. It is used as a substitute to {\tt OriBundleAdj} when there are no cameras. -As for {\tt OriBundleAdj}, when using survey measurements, a RTL SysCo must be used. - The GCP folder must then have a RTL CurSysCo.xml file, and do not have to declare all the points -referred to by topo observations, but automatic points initialization is not completed. +referred to by topo observations, but automatic points initialization is not completed for now. + +The SysCo has to be of type RTL, except if there are only distances measurements. \begin{verbatim} For command : TopoAdj diff --git a/MMVII/src/Topo/ctopoobsset.cpp b/MMVII/src/Topo/ctopoobsset.cpp index 5d3275971a..8c7c847c9f 100644 --- a/MMVII/src/Topo/ctopoobsset.cpp +++ b/MMVII/src/Topo/ctopoobsset.cpp @@ -117,7 +117,7 @@ void cTopoObsSetStation::OnUpdate() mRotVert2Instr = mRotVert2Instr * cRotation3D::RotFromAxiator(mRotOmega.Pt()); // update mRotSysCo2Vert with new station position - mRotSysCo2Vert = mBA_Topo->getSysCo()->getVertical(*mPtOrigin->getPt()); + updateVertMat(); //StdOut() << " OnUpdate mRotOmega: "<getSysCo()->getType()!=eSysCo::eRTL)) + mRotSysCo2Vert = tRot::Identity(); // do not seach for vertical if all fixed, to work will all SysCo + else + mRotSysCo2Vert = mBA_Topo->getSysCo()->getVertical(*mPtOrigin->getPt()); +} + void cTopoObsSetStation::setOrigin(std::string _OriginName) { #ifdef VERBOSE_TOPO @@ -305,7 +313,7 @@ void cTopoObsSetStation::setOrigin(std::string _OriginName) mRotVert2Instr = tRot::Identity(); mRotOmega.Pt() = {0.,0.,0.}; - mRotSysCo2Vert = mBA_Topo->getSysCo()->getVertical(*mPtOrigin->getPt()); + updateVertMat(); } tREAL8 cTopoObsSetStation::getG0() const diff --git a/MMVII/src/Topo/ctopoobsset.h b/MMVII/src/Topo/ctopoobsset.h index a785688d5e..e7f006fd67 100644 --- a/MMVII/src/Topo/ctopoobsset.h +++ b/MMVII/src/Topo/ctopoobsset.h @@ -89,6 +89,7 @@ class cTopoObsSetStation : public cTopoObsSet //cTopoObsSetStation(cTopoObsSetStation const&) = delete; //cTopoObsSetStation& operator=(cTopoObsSetStation const&) = delete; void createAllowedObsTypes() override; + void updateVertMat(); eTopoStOriStat mOriStatus; //< is bubbled, fixed or 3d rot free tRot mRotSysCo2Vert; //< rotation between global SysCo and local vertical frame tRot mRotVert2Instr; //< the station orientation from local vertical frame