Loading isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp +28 −15 Original line number Diff line number Diff line Loading @@ -242,12 +242,18 @@ namespace Isis { else { pvlPoint += PvlKeyword("PointId", controlPoint->GetId()); } if ( !controlPoint->GetChooserName().isEmpty() ) { if ( controlPoint->HasChooserName() ) { pvlPoint += PvlKeyword("ChooserName", controlPoint->GetChooserName()); } if ( !controlPoint->GetDateTime().isEmpty() ) { else { pvlPoint += PvlKeyword("ChooserName", ""); } if ( controlPoint->HasDateTime() ) { pvlPoint += PvlKeyword("DateTime", controlPoint->GetDateTime()); } else { pvlPoint += PvlKeyword("DateTime", ""); } if ( controlPoint->IsEditLocked() ) { pvlPoint += PvlKeyword("EditLock", "True"); } Loading Loading @@ -329,7 +335,11 @@ namespace Isis { // FIXME: None of Covariance matrix information is available directly from ControlPoint in the API symmetric_matrix<double, upper> aprioriCovarianceMatrix = aprioriSurfacePoint.GetRectangularMatrix(); if ( aprioriCovarianceMatrix.size1() > 0 ) { if ( aprioriCovarianceMatrix.size1() > 0 && aprioriSurfacePoint.GetLatSigmaDistance().meters() != Isis::Null && aprioriSurfacePoint.GetLonSigmaDistance().meters() != Isis::Null && aprioriSurfacePoint.GetLocalRadiusSigma().meters() != Isis::Null) { PvlKeyword matrix("AprioriCovarianceMatrix"); matrix += toString(aprioriCovarianceMatrix(0, 0)); matrix += toString(aprioriCovarianceMatrix(0, 1)); Loading Loading @@ -440,14 +450,12 @@ namespace Isis { break; } if ( !controlMeasure.GetChooserName().isEmpty() ) { if ( controlMeasure.HasChooserName() ) { pvlMeasure += PvlKeyword("ChooserName", controlMeasure.GetChooserName()); } if ( !controlMeasure.GetDateTime().isEmpty() ) { if ( controlMeasure.HasDateTime() ) { pvlMeasure += PvlKeyword("DateTime", controlMeasure.GetDateTime()); } if ( controlMeasure.IsEditLocked() ) { pvlMeasure += PvlKeyword("EditLock", "True"); } Loading Loading @@ -562,6 +570,8 @@ namespace Isis { if ( controlNetwork.hasKeyword("Version") ) { version = toInt(controlNetwork["Version"][0]); } std::cout << "Pvl Version: " << version << std::endl; switch ( version ) { case 1: readPvlV0001(controlNetwork); Loading Loading @@ -914,7 +924,7 @@ namespace Isis { } catch (IException &e) { QString msg = "Failed to convert version 1 protobuf control point at index [" + toString(i) + "] into a ControlPoint."; + toString(i) + "] to a ControlPoint."; throw IException(e, IException::User, msg, _FILEINFO_); } } Loading Loading @@ -1134,7 +1144,7 @@ namespace Isis { } catch (IException &e) { QString msg = "Failed to convert protobuf version 2 control point at index [" + toString(pointIndex) + "] into a ControlPoint."; + toString(pointIndex) + "] in a ControlPoint."; throw IException(e, IException::Io, msg, _FILEINFO_); } } Loading Loading @@ -1649,10 +1659,10 @@ namespace Isis { protoPoint.set_id(controlPoint->GetId().toLatin1().data()); } if ( !controlPoint->GetChooserName().isEmpty() ) { if ( controlPoint->HasChooserName() ) { protoPoint.set_choosername(controlPoint->GetChooserName().toLatin1().data()); } if ( !controlPoint->GetDateTime().isEmpty() ) { if ( controlPoint->HasDateTime() ) { protoPoint.set_datetime(controlPoint->GetDateTime().toLatin1().data()); } if ( controlPoint->IsEditLocked() ) { Loading Loading @@ -1761,7 +1771,11 @@ namespace Isis { protoPoint.set_aprioriz(aprioriSurfacePoint.GetZ().meters()); symmetric_matrix<double, upper> aprioriCovarianceMatrix = aprioriSurfacePoint.GetRectangularMatrix(); if ( aprioriCovarianceMatrix.size1() > 0 ) { if ( aprioriCovarianceMatrix.size1() > 0 && aprioriSurfacePoint.GetLatSigmaDistance().meters() != Isis::Null && aprioriSurfacePoint.GetLonSigmaDistance().meters() != Isis::Null && aprioriSurfacePoint.GetLocalRadiusSigma().meters() != Isis::Null) { protoPoint.add_aprioricovar(aprioriCovarianceMatrix(0, 0)); protoPoint.add_aprioricovar(aprioriCovarianceMatrix(0, 1)); protoPoint.add_aprioricovar(aprioriCovarianceMatrix(0, 2)); Loading @@ -1770,7 +1784,6 @@ namespace Isis { protoPoint.add_aprioricovar(aprioriCovarianceMatrix(2, 2)); } } // this might be redundant... determined by covariance matrix??? if ( controlPoint->IsLatitudeConstrained() ) { protoPoint.set_latitudeconstrained(controlPoint->IsLatitudeConstrained()); Loading Loading @@ -1832,11 +1845,11 @@ namespace Isis { break; } if ( !controlMeasure.GetChooserName().isEmpty() ) { if ( controlMeasure.HasChooserName() ) { protoMeasure.set_choosername(controlMeasure.GetChooserName().toLatin1().data()); } if ( !controlMeasure.GetDateTime().isEmpty() ) { if ( controlMeasure.HasDateTime() ) { protoMeasure.set_datetime(controlMeasure.GetDateTime().toLatin1().data()); } Loading Loading
isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp +28 −15 Original line number Diff line number Diff line Loading @@ -242,12 +242,18 @@ namespace Isis { else { pvlPoint += PvlKeyword("PointId", controlPoint->GetId()); } if ( !controlPoint->GetChooserName().isEmpty() ) { if ( controlPoint->HasChooserName() ) { pvlPoint += PvlKeyword("ChooserName", controlPoint->GetChooserName()); } if ( !controlPoint->GetDateTime().isEmpty() ) { else { pvlPoint += PvlKeyword("ChooserName", ""); } if ( controlPoint->HasDateTime() ) { pvlPoint += PvlKeyword("DateTime", controlPoint->GetDateTime()); } else { pvlPoint += PvlKeyword("DateTime", ""); } if ( controlPoint->IsEditLocked() ) { pvlPoint += PvlKeyword("EditLock", "True"); } Loading Loading @@ -329,7 +335,11 @@ namespace Isis { // FIXME: None of Covariance matrix information is available directly from ControlPoint in the API symmetric_matrix<double, upper> aprioriCovarianceMatrix = aprioriSurfacePoint.GetRectangularMatrix(); if ( aprioriCovarianceMatrix.size1() > 0 ) { if ( aprioriCovarianceMatrix.size1() > 0 && aprioriSurfacePoint.GetLatSigmaDistance().meters() != Isis::Null && aprioriSurfacePoint.GetLonSigmaDistance().meters() != Isis::Null && aprioriSurfacePoint.GetLocalRadiusSigma().meters() != Isis::Null) { PvlKeyword matrix("AprioriCovarianceMatrix"); matrix += toString(aprioriCovarianceMatrix(0, 0)); matrix += toString(aprioriCovarianceMatrix(0, 1)); Loading Loading @@ -440,14 +450,12 @@ namespace Isis { break; } if ( !controlMeasure.GetChooserName().isEmpty() ) { if ( controlMeasure.HasChooserName() ) { pvlMeasure += PvlKeyword("ChooserName", controlMeasure.GetChooserName()); } if ( !controlMeasure.GetDateTime().isEmpty() ) { if ( controlMeasure.HasDateTime() ) { pvlMeasure += PvlKeyword("DateTime", controlMeasure.GetDateTime()); } if ( controlMeasure.IsEditLocked() ) { pvlMeasure += PvlKeyword("EditLock", "True"); } Loading Loading @@ -562,6 +570,8 @@ namespace Isis { if ( controlNetwork.hasKeyword("Version") ) { version = toInt(controlNetwork["Version"][0]); } std::cout << "Pvl Version: " << version << std::endl; switch ( version ) { case 1: readPvlV0001(controlNetwork); Loading Loading @@ -914,7 +924,7 @@ namespace Isis { } catch (IException &e) { QString msg = "Failed to convert version 1 protobuf control point at index [" + toString(i) + "] into a ControlPoint."; + toString(i) + "] to a ControlPoint."; throw IException(e, IException::User, msg, _FILEINFO_); } } Loading Loading @@ -1134,7 +1144,7 @@ namespace Isis { } catch (IException &e) { QString msg = "Failed to convert protobuf version 2 control point at index [" + toString(pointIndex) + "] into a ControlPoint."; + toString(pointIndex) + "] in a ControlPoint."; throw IException(e, IException::Io, msg, _FILEINFO_); } } Loading Loading @@ -1649,10 +1659,10 @@ namespace Isis { protoPoint.set_id(controlPoint->GetId().toLatin1().data()); } if ( !controlPoint->GetChooserName().isEmpty() ) { if ( controlPoint->HasChooserName() ) { protoPoint.set_choosername(controlPoint->GetChooserName().toLatin1().data()); } if ( !controlPoint->GetDateTime().isEmpty() ) { if ( controlPoint->HasDateTime() ) { protoPoint.set_datetime(controlPoint->GetDateTime().toLatin1().data()); } if ( controlPoint->IsEditLocked() ) { Loading Loading @@ -1761,7 +1771,11 @@ namespace Isis { protoPoint.set_aprioriz(aprioriSurfacePoint.GetZ().meters()); symmetric_matrix<double, upper> aprioriCovarianceMatrix = aprioriSurfacePoint.GetRectangularMatrix(); if ( aprioriCovarianceMatrix.size1() > 0 ) { if ( aprioriCovarianceMatrix.size1() > 0 && aprioriSurfacePoint.GetLatSigmaDistance().meters() != Isis::Null && aprioriSurfacePoint.GetLonSigmaDistance().meters() != Isis::Null && aprioriSurfacePoint.GetLocalRadiusSigma().meters() != Isis::Null) { protoPoint.add_aprioricovar(aprioriCovarianceMatrix(0, 0)); protoPoint.add_aprioricovar(aprioriCovarianceMatrix(0, 1)); protoPoint.add_aprioricovar(aprioriCovarianceMatrix(0, 2)); Loading @@ -1770,7 +1784,6 @@ namespace Isis { protoPoint.add_aprioricovar(aprioriCovarianceMatrix(2, 2)); } } // this might be redundant... determined by covariance matrix??? if ( controlPoint->IsLatitudeConstrained() ) { protoPoint.set_latitudeconstrained(controlPoint->IsLatitudeConstrained()); Loading Loading @@ -1832,11 +1845,11 @@ namespace Isis { break; } if ( !controlMeasure.GetChooserName().isEmpty() ) { if ( controlMeasure.HasChooserName() ) { protoMeasure.set_choosername(controlMeasure.GetChooserName().toLatin1().data()); } if ( !controlMeasure.GetDateTime().isEmpty() ) { if ( controlMeasure.HasDateTime() ) { protoMeasure.set_datetime(controlMeasure.GetDateTime().toLatin1().data()); } Loading