mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Ref T111, lat/lng/angle changes
* get struct CAngle::DegMinSecFractionalSec to obtain parts * round to epsilon utility functions and fix (qint64)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
77546a46b1
commit
e55480737e
@@ -212,6 +212,13 @@ namespace BlackMisc
|
||||
CCoordinateGeodetic::CCoordinateGeodetic(double latitudeDegrees, double longitudeDegrees, double heightFeet) :
|
||||
CCoordinateGeodetic( { latitudeDegrees, BlackMisc::PhysicalQuantities::CAngleUnit::deg() }, { longitudeDegrees, BlackMisc::PhysicalQuantities::CAngleUnit::deg() }, { heightFeet, BlackMisc::PhysicalQuantities::CLengthUnit::ft() }) {}
|
||||
|
||||
CCoordinateGeodetic::CCoordinateGeodetic(const ICoordinateGeodetic &coordinate) :
|
||||
m_x(coordinate.normalVectorDouble()[0]),
|
||||
m_y(coordinate.normalVectorDouble()[1]),
|
||||
m_z(coordinate.normalVectorDouble()[2]),
|
||||
m_geodeticHeight(coordinate.geodeticHeight())
|
||||
{ }
|
||||
|
||||
CLatitude CCoordinateGeodetic::latitude() const
|
||||
{
|
||||
return { std::atan2(m_z, std::hypot(m_x, m_y)), PhysicalQuantities::CAngleUnit::rad() };
|
||||
|
||||
Reference in New Issue
Block a user