Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions | Public Attributes
mrpt::topography::TCoords Struct Reference

Detailed Description

A coordinate that is stored as a simple "decimal" angle in degrees, but can be retrieved/set in the form of DEGREES + arc-MINUTES + arc-SECONDS.

Definition at line 28 of file data_types.h.

#include <mrpt/topography/data_types.h>

Public Member Functions

 TCoords (const int _deg, const int _min, const double _sec)
 
 TCoords (const double dec)
 
 TCoords ()
 
 operator double (void) const
 Automatic conversion to a double value (read-only) More...
 
 operator double & (void)
 Automatic conversion to a double value (read-only) More...
 
void setFromDecimal (const double dec)
 Set from a decimal value (XX.YYYYY) in degrees. More...
 
double getDecimalValue () const
 Get the decimal value (XX.YYYYY), in degrees - you can also use the automatic conversion between TCoords and a double. More...
 
void getDegMinSec (int &degrees, int &minutes, double &seconds) const
 Return the Deg Min' Sec'' representation of this value. More...
 
void setDegMinSec (const int degrees, const int minutes, const double seconds)
 Set the coordinate from its Deg Min' Deg'' parts. More...
 
std::string getAsString () const
 Return a std::string in the format "DEGdeg MIN' SEC''". More...
 

Public Attributes

double decimal_value
 Also obtained directly through the double(void) operator using a TCoords anywhere were a double is expected. More...
 

Constructor & Destructor Documentation

◆ TCoords() [1/3]

mrpt::topography::TCoords::TCoords ( const int  _deg,
const int  _min,
const double  _sec 
)
inline

Definition at line 35 of file data_types.h.

References setDegMinSec().

Here is the call graph for this function:

◆ TCoords() [2/3]

mrpt::topography::TCoords::TCoords ( const double  dec)
inline

Definition at line 39 of file data_types.h.

References setFromDecimal().

Here is the call graph for this function:

◆ TCoords() [3/3]

mrpt::topography::TCoords::TCoords ( )
inline

Definition at line 40 of file data_types.h.

References setFromDecimal().

Here is the call graph for this function:

Member Function Documentation

◆ getAsString()

std::string mrpt::topography::TCoords::getAsString ( ) const
inline

Return a std::string in the format "DEGdeg MIN' SEC''".

Definition at line 69 of file data_types.h.

References mrpt::mrpt::format(), getDegMinSec(), and min.

Referenced by mrpt::topography::operator<<().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDecimalValue()

double mrpt::topography::TCoords::getDecimalValue ( ) const
inline

Get the decimal value (XX.YYYYY), in degrees - you can also use the automatic conversion between TCoords and a double.

Definition at line 49 of file data_types.h.

References decimal_value.

Referenced by mrpt::topography::TGeodeticCoords::isClear().

Here is the caller graph for this function:

◆ getDegMinSec()

void mrpt::topography::TCoords::getDegMinSec ( int &  degrees,
int &  minutes,
double &  seconds 
) const
inline

Return the Deg Min' Sec'' representation of this value.

Definition at line 51 of file data_types.h.

References decimal_value.

Referenced by getAsString().

Here is the caller graph for this function:

◆ operator double()

mrpt::topography::TCoords::operator double ( void  ) const
inline

Automatic conversion to a double value (read-only)

Definition at line 42 of file data_types.h.

References decimal_value.

◆ operator double &()

mrpt::topography::TCoords::operator double & ( void  )
inline

Automatic conversion to a double value (read-only)

Definition at line 44 of file data_types.h.

References decimal_value.

◆ setDegMinSec()

void mrpt::topography::TCoords::setDegMinSec ( const int  degrees,
const int  minutes,
const double  seconds 
)
inline

Set the coordinate from its Deg Min' Deg'' parts.

Definition at line 61 of file data_types.h.

References decimal_value.

Referenced by TCoords().

Here is the caller graph for this function:

◆ setFromDecimal()

void mrpt::topography::TCoords::setFromDecimal ( const double  dec)
inline

Set from a decimal value (XX.YYYYY) in degrees.

Definition at line 46 of file data_types.h.

References decimal_value.

Referenced by TCoords().

Here is the caller graph for this function:

Member Data Documentation

◆ decimal_value

double mrpt::topography::TCoords::decimal_value

Also obtained directly through the double(void) operator using a TCoords anywhere were a double is expected.

Definition at line 33 of file data_types.h.

Referenced by getDecimalValue(), getDegMinSec(), operator double(), operator double &(), mrpt::topography::operator==(), setDegMinSec(), setFromDecimal(), and mrpt::topography::UTMToGeodetic().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019