diff --git a/src/SimCore/Position.cpp b/src/SimCore/Position.cpp index 88fb54c..74cbb30 100644 --- a/src/SimCore/Position.cpp +++ b/src/SimCore/Position.cpp @@ -26,8 +26,11 @@ namespace SimCore { Position::Position(const Position& other){ std::lock_guard lock(other.mx); - valid_ = false; + + earth_ = std::make_unique(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f()); + geod_ = std::make_unique(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f()); + wgs84_ = std::make_unique(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f()); if (other.valid_ == true) { this->setGeocentricPos(other.GeocentricPos_[X],other.GeocentricPos_[Y],other.GeocentricPos_[Z]); @@ -35,9 +38,6 @@ namespace SimCore { // GeocentricPos_ = other.GeocentricPos_; // GeodesicPos_ = other.GeodesicPos_; - earth_ = std::make_unique(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f()); - geod_ = std::make_unique(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f()); - wgs84_ = std::make_unique(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f()); } Eigen::Vector3d Position::getGeocentricPos()