Commit 69998f6e authored by Adam Goins's avatar Adam Goins Committed by Makayla Shepherd
Browse files

Added HasAprioriCovar() and HasAdjustedCovar() accessors

parent 4e8ba8fa
Loading
Loading
Loading
Loading
+27 −3
Original line number Diff line number Diff line
@@ -2492,6 +2492,30 @@ namespace Isis {
    }
  }

  bool ControlPoint::HasAprioriCovar() const {
    SurfacePoint apriori = GetAprioriSurfacePoint();
    symmetric_matrix< double, upper > covar = apriori.GetRectangularMatrix();
    // If there are values in any of the covar matrices.
    if (covar(0, 0) != 0. || covar(0, 1) != 0. ||
        covar(0, 2) != 0. || covar(1, 1) != 0. ||
        covar(1, 2) != 0. || covar(2, 2) != 0.) {
        return true;
    }
    return false;
  }

  bool ControlPoint::HasAdjustedCovar() const {
    SurfacePoint adjusted = GetAdjustedSurfacePoint();
    symmetric_matrix< double, upper > covar = adjusted.GetRectangularMatrix();
    // If there are values in any of the covar matrices.
    if (covar(0, 0) != 0. || covar(0, 1) != 0. ||
        covar(0, 2) != 0. || covar(1, 1) != 0. ||
        covar(1, 2) != 0. || covar(2, 2) != 0.) {
        return true;
    }
    return false;
  }

  double ControlPoint::AdjustedCovar(int position) const {
    SurfacePoint adjusted = GetAdjustedSurfacePoint();
    symmetric_matrix< double, upper > covar = adjusted.GetRectangularMatrix();
+2 −0
Original line number Diff line number Diff line
@@ -514,6 +514,8 @@ namespace Isis {

      bool HasAprioriCoordinates();
      bool HasAdjustedCoordinates();
      bool HasAprioriCovar() const;
      bool HasAdjustedCovar() const;

      bool IsConstrained();
      bool IsLatitudeConstrained();