Change values of default CCoordinateGeodetic constructor

Up to know, the default constructor initialized x=0, y=0 and z=0. This
caused problems with default initialized CCoordinateGeodetic objects
when using it in calculateGreatCircleDistance. The result was always 0.
Instead use Lat=0, Lon=0, height=0.
This commit is contained in:
Roland Winklmeier
2016-03-26 19:46:12 +01:00
parent 4e9d7d3efe
commit a1f7270494

View File

@@ -147,7 +147,8 @@ namespace BlackMisc
public:
//! Default constructor
CCoordinateGeodetic() = default;
CCoordinateGeodetic() :
CCoordinateGeodetic(0, 0, 0) {}
//! Constructor by normal vector
CCoordinateGeodetic(const QVector3D &normal) : m_x(normal.x()), m_y(normal.y()), m_z(normal.z()) {}