1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-27 00:44:24 +02:00

Added correct handling of the DMS degree definition (9110)

This commit is contained in:
2018-01-22 00:28:58 +01:00
parent 652ed8e919
commit d6de3acbd2
2 changed files with 60 additions and 4 deletions

View File

@ -7,19 +7,20 @@
class AngularUnits
{
public:
AngularUnits() : _f(NAN) {}
AngularUnits() : _code(0), _f(NAN) {}
AngularUnits(int code);
bool isNull() const {return std::isnan(_f);}
bool isValid() const {return !std::isnan(_f);}
double toDegrees(double val) const {return val * _f;}
double fromDegrees(double val) const {return val / _f;}
double toDegrees(double val) const;
double fromDegrees(double val) const;
friend bool operator==(const AngularUnits &au1, const AngularUnits &au2);
friend QDebug operator<<(QDebug dbg, const AngularUnits &au);
private:
int _code;
double _f;
};