From a1f7270494e5d04a809b56fbec0775b27b396ce4 Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Sat, 26 Mar 2016 19:46:12 +0100 Subject: [PATCH] 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. --- src/blackmisc/geo/coordinategeodetic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blackmisc/geo/coordinategeodetic.h b/src/blackmisc/geo/coordinategeodetic.h index fa97ac4be..fec35f628 100644 --- a/src/blackmisc/geo/coordinategeodetic.h +++ b/src/blackmisc/geo/coordinategeodetic.h @@ -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()) {}