mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
Parse WGS coordinates
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user