mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
Enabled coordinate classes for DBus, added generation method for lat/lng by WGS84 strings
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef BLACKMISC_GEOLATLONBASE_H
|
||||
#define BLACKMISC_GEOLATLONBASE_H
|
||||
#ifndef BLACKMISC_GEOEARTHANGLE_H
|
||||
#define BLACKMISC_GEOEARTHANGLE_H
|
||||
#include "blackmisc/pqangle.h"
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -62,6 +62,12 @@ protected:
|
||||
*/
|
||||
CEarthAngle(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit): CAngle(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param angle
|
||||
*/
|
||||
CEarthAngle(const BlackMisc::PhysicalQuantities::CAngle &angle): CAngle(angle) {}
|
||||
|
||||
/*!
|
||||
* \brief String for converter and streaming
|
||||
* \return
|
||||
@@ -212,14 +218,18 @@ public:
|
||||
return l;
|
||||
}
|
||||
|
||||
/*
|
||||
/*!
|
||||
* Register metadata
|
||||
*/
|
||||
static void registerMetadata()
|
||||
{
|
||||
qRegisterMetaType<LATorLON>(typeid(LATorLON).name());
|
||||
qDBusRegisterMetaType<LATorLON>();
|
||||
}
|
||||
static void registerMetadata();
|
||||
|
||||
/*!
|
||||
* \brief Latitude / Longitude from a WGS string such as
|
||||
* \param wgsCoordinate 50° 2′ 0″ N / 8° 34′ 14″ E
|
||||
* \return
|
||||
*/
|
||||
static LATorLON fromWgs84(const QString &wgsCoordinate);
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user