Struct TCoords

Struct Documentation

struct TCoords

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.

Public Functions

inline TCoords(const int _deg, const int _min, const double _sec)
inline TCoords(const double dec)
inline TCoords()
inline operator double() const

Automatic conversion to a double value (read-only)

inline operator double&()

Automatic conversion to a double value (read-only)

inline void setFromDecimal(const double dec)

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

inline double getDecimalValue() const

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

inline void getDegMinSec(int &degrees, int &minutes, double &seconds) const

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

inline void setDegMinSec(const int degrees, const int minutes, const double seconds)

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

inline std::string getAsString() const

Return a std::string in the format “DEGdeg MIN’ SEC’’”

Public Members

double decimal_value = 0

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