Skip to content

Commit

Permalink
cSysCoRTL derives from cSysCoLGeo
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmuller committed May 15, 2024
1 parent c3ebe59 commit f1c36ad
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 67 deletions.
6 changes: 5 additions & 1 deletion MMVII/Doc/CommandReferences/SysCo.tex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ \section{SysCo introduction}
\begin{itemize}
\item \textbf{Local}: any euclidian frame, without any geolocalization or vertical knowledge.
\item \textbf{GeoC}: geocentric coordinates.
\item \textbf{RTL}: the local euclidian frame where origin is set, Z is ellipsoid normal at origin and X is East.
\item \textbf{LGeo}: a local euclidian frame with an affine transformation into geocentric coordinates.
\item \textbf{RTL}: a special case of LGeo where the local frame is defined by an origin point, where Z is ellipsoid normal at origin and X is East.
\item \textbf{Proj}: any georeferenced system handled by {\tt libproj} (including geographical coordinates).
\end{itemize}

Expand All @@ -40,6 +41,9 @@ \subsection{SysCo definition}
\item Any {\tt libproj} definition (such as {\tt IGNF:LAMB93} or {\tt EPSG:4326})
\item Any string starting with {\tt Local} for a local frame
\item Any string starting with {\tt GeoC} for geocentric
\item A string starting with {\tt LGeo} following the pattern:

{\tt LGeo*TX*TY*TZ*Omega*Phi*Kappa}, where the transformation is given in geocentric, the angles are in rad.
\item A string starting with {\tt RTL} following the pattern: {\tt RTL*X0*Y0*Z0*Def}

(such as {\tt RTL*0.67451979*45.18899334*0.00000000*EPSG:4326}),
Expand Down
7 changes: 4 additions & 3 deletions MMVII/include/MMVII_DeclareCste.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ extern const std::string MMVII_NONE; ///< For command, each time a "no value"
extern const std::string MMVII_StdDest; ///< For destination parameter (TieP ...) , def value
extern const std::string MMVII_PrefRefBench; ///< Prefix for file used as reference in bench

extern const std::string MMVII_SysCoLocal; ///< Prefix for SysCo type
extern const std::string MMVII_SysCoRTL; ///< Prefix for SysCo type
extern const std::string MMVII_SysCoGeoC; ///< Prefix for SysCo type
extern const std::string MMVII_SysCoLocal; ///< Prefix for SysCo type
extern const std::string MMVII_SysCoLGeo; ///< Prefix for SysCo type
extern const std::string MMVII_SysCoRTL; ///< Prefix for SysCo type
extern const std::string MMVII_SysCoGeoC; ///< Prefix for SysCo type
extern const std::string MMVII_SysCoDefLatLong; ///< Definition for latlong
extern const std::string MMVII_SysCoDefGeoC; ///< Definition for geocentric

Expand Down
10 changes: 8 additions & 2 deletions MMVII/include/MMVII_SysCo.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "MMVII_AllClassDeclare.h"

struct PJconsts;
typedef struct PJconsts PJ;
typedef struct PJconsts PJ; //< libproj conversion between 2 CRS

namespace MMVII
{
Expand All @@ -26,6 +26,12 @@ void AddData(const cAuxAr2007 & anAux, cSysCoData & aSysCoData);
/**
* @brief The cSysCo class records one coordinate system.
* Derived classes are used for different types of coordinates systems.
*
* Value() and Inverse() to convert to/from geocentric
*
* SysCo definitions are like this:
* "type*param1*param2*..."
* It is interpreted by the factory MakeSysCo() to create an object of the corresponding concrete class
*/
class cSysCo : public cDataInvertibleMapping<tREAL8,3>
{
Expand All @@ -40,7 +46,7 @@ public :
virtual tREAL8 getRadiusApprox(const tPt &in) const;
virtual tREAL8 getDistHzApprox(const tPt & aPtA, const tPt & aPtB) const;

static tPtrSysCo MakeSysCo(const std::string &aDef); //< factory
static tPtrSysCo MakeSysCo(const std::string &aDef); //< factory from a sysco definition
static tPtrSysCo makeRTL(const cPt3dr & anOrigin, const std::string & aSysCoNameIn);
static tPtrSysCo FromFile(const std::string &aNameFile);

Expand Down
1 change: 1 addition & 0 deletions MMVII/include/MMVII_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ enum class eProjPC
enum class eSysCo
{
eProj,
eLGeo,
eRTL,
eGeoC,
eLocalSys,
Expand Down
7 changes: 4 additions & 3 deletions MMVII/src/Appli/MMVII_Cste.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ const std::string MMVII_StdDest = "STD";
const std::string MMVII_PrefRefBench = "RefBench-";

// Prefix for SysCo names
const std::string MMVII_SysCoLocal = "Local";
const std::string MMVII_SysCoRTL = "RTL";
const std::string MMVII_SysCoGeoC = "GeoC";
const std::string MMVII_SysCoLocal = "Local";
const std::string MMVII_SysCoLGeo = "LGeo";
const std::string MMVII_SysCoRTL = "RTL";
const std::string MMVII_SysCoGeoC = "GeoC";
const std::string MMVII_SysCoDefLatLong = "+proj=latlong";
const std::string MMVII_SysCoDefGeoC = "+proj=geocent";

Expand Down
1 change: 1 addition & 0 deletions MMVII/src/Serial/ElemStrToVal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ template<> cE2Str<eProjPC>::tMapE2Str cE2Str<eProjPC>::mE2S
template<> cE2Str<eSysCo>::tMapE2Str cE2Str<eSysCo>::mE2S
{
{eSysCo::eProj,"Proj"},
{eSysCo::eLGeo,"LGeo"},
{eSysCo::eRTL,"RTL"},
{eSysCo::eGeoC,"GeoC"},
{eSysCo::eLocalSys,"Local"}
Expand Down
Loading

0 comments on commit f1c36ad

Please sign in to comment.