mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Parse WGS coordinates
This commit is contained in:
committed by
Mat Sutcliffe
parent
7ea9e7c2b2
commit
f40dbb6c81
@@ -330,11 +330,21 @@ namespace BlackMisc
|
||||
this->setLatLong(latitude, this->longitude());
|
||||
}
|
||||
|
||||
void CCoordinateGeodetic::setLatitudeFromWgs84(const QString &wgs)
|
||||
{
|
||||
this->setLatitude(CLatitude::fromWgs84(wgs));
|
||||
}
|
||||
|
||||
void CCoordinateGeodetic::setLongitude(const CLongitude &longitude)
|
||||
{
|
||||
this->setLatLong(this->latitude(), longitude);
|
||||
}
|
||||
|
||||
void CCoordinateGeodetic::setLongitudeFromWgs84(const QString &wgs)
|
||||
{
|
||||
this->setLongitude(CLongitude::fromWgs84(wgs));
|
||||
}
|
||||
|
||||
void CCoordinateGeodetic::setLatLong(const CLatitude &latitude, const CLongitude &longitude)
|
||||
{
|
||||
m_x = latitude.cos() * longitude.cos();
|
||||
@@ -342,6 +352,12 @@ namespace BlackMisc
|
||||
m_z = latitude.sin();
|
||||
}
|
||||
|
||||
void CCoordinateGeodetic::setLatLongFromWgs84(const QString &latitude, const QString &longitude)
|
||||
{
|
||||
this->setLatitudeFromWgs84(latitude);
|
||||
this->setLongitudeFromWgs84(longitude);
|
||||
}
|
||||
|
||||
void CCoordinateGeodetic::setGeodeticHeightToNull()
|
||||
{
|
||||
this->setGeodeticHeight(CAltitude::null());
|
||||
|
||||
@@ -277,12 +277,21 @@ namespace BlackMisc
|
||||
//! Set latitude
|
||||
void setLatitude(const CLatitude &latitude);
|
||||
|
||||
//! Set latitude
|
||||
void setLatitudeFromWgs84(const QString &wgs);
|
||||
|
||||
//! Set longitude
|
||||
void setLongitude(const CLongitude &longitude);
|
||||
|
||||
//! Set longitude
|
||||
void setLongitudeFromWgs84(const QString &wgs);
|
||||
|
||||
//! Set latitude and longitude
|
||||
void setLatLong(const CLatitude &latitude, const CLongitude &longitude);
|
||||
|
||||
//! Set latitude and longitude
|
||||
void setLatLongFromWgs84(const QString &latitude, const QString &longitude);
|
||||
|
||||
//! Set height (ellipsoidal or geodetic height)
|
||||
void setGeodeticHeight(const Aviation::CAltitude &height) { m_geodeticHeight = height; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user