FIX: fix in position contuctor

This commit is contained in:
hwinkel
2023-08-04 12:58:02 +02:00
parent 6c5b17c90c
commit 5e8b1b84e8

View File

@@ -26,8 +26,11 @@ namespace SimCore {
Position::Position(const Position& other){ Position::Position(const Position& other){
std::lock_guard<std::mutex> lock(other.mx); std::lock_guard<std::mutex> lock(other.mx);
valid_ = false; valid_ = false;
earth_ = std::make_unique<GeographicLib::Geocentric>(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f());
geod_ = std::make_unique<GeographicLib::Geodesic>(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f());
wgs84_ = std::make_unique<GeographicLib::Ellipsoid>(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f());
if (other.valid_ == true) if (other.valid_ == true)
{ {
this->setGeocentricPos(other.GeocentricPos_[X],other.GeocentricPos_[Y],other.GeocentricPos_[Z]); this->setGeocentricPos(other.GeocentricPos_[X],other.GeocentricPos_[Y],other.GeocentricPos_[Z]);
@@ -35,9 +38,6 @@ namespace SimCore {
// GeocentricPos_ = other.GeocentricPos_; // GeocentricPos_ = other.GeocentricPos_;
// GeodesicPos_ = other.GeodesicPos_; // GeodesicPos_ = other.GeodesicPos_;
earth_ = std::make_unique<GeographicLib::Geocentric>(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f());
geod_ = std::make_unique<GeographicLib::Geodesic>(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f());
wgs84_ = std::make_unique<GeographicLib::Ellipsoid>(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f());
} }
Eigen::Vector3d Position::getGeocentricPos() Eigen::Vector3d Position::getGeocentricPos()