Commit a81f320c authored by Jeannie Backer's avatar Jeannie Backer Committed by Makayla Shepherd
Browse files

Update from upstream.

parent c47aca72
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -233,7 +233,12 @@ namespace Isis {
        pvlPoint += PvlKeyword("PointType", "Free");
      }

      if ( !controlPoint->GetId().isEmpty() ) {
      if ( controlPoint->GetId().isEmpty() ) {
        QString msg = "Unbable to write control net to PVL file. "
                      "Invalid control point has no point ID value.";
        throw IException(IException::Unknown, msg, _FILEINFO_);
      }
      else {
        pvlPoint += PvlKeyword("PointId", controlPoint->GetId());
      }
      if ( !controlPoint->GetChooserName().isEmpty() ) {
+10 −10
Original line number Diff line number Diff line
@@ -1476,16 +1476,6 @@ namespace Isis {
  }


  /**
   * Checks to see if the point has been rejected by jigsaw.
   *
   * @return bool true if the point is flagged as rejected by jigsaw
   */
  bool ControlPoint::IsJigsawRejected() const {
    return jigsawRejected;
  }


  SurfacePoint ControlPoint::GetAprioriSurfacePoint() const {
    return aprioriSurfacePoint;
  }
@@ -1497,6 +1487,16 @@ namespace Isis {
   }
 
 
   bool ControlPoint::HasAprioriCoordinates() {
     if (aprioriSurfacePoint.GetX().isValid() &&
         aprioriSurfacePoint.GetY().isValid() &&
         aprioriSurfacePoint.GetZ().isValid())
       return true;
 
     return false;
     // return aprioriSurfacePoint.Valid(); ???
   }


  bool ControlPoint::IsConstrained() {
    return constraintStatus.any();
+1 −0
Original line number Diff line number Diff line
@@ -503,6 +503,7 @@ namespace Isis {
      bool IsValid() const;
      bool IsInvalid() const;
      bool IsFixed() const;
      bool HasAprioriCoordinates();

      bool IsConstrained();
      bool IsLatitudeConstrained();
+0 −456
Original line number Diff line number Diff line
ControlPoint unitTest
Adding ControlMeasure with cube serial number [Test1]
Printing point:
Object = ControlNetwork
  NetworkId    = Identifier
  TargetName   = Null
  UserName     = Null
  Created      = Yesterday
  LastModified = Yesterday
  Description  = Null
  Version      = 5

  Object = ControlPoint
    PointType                = Fixed
    PointId                  = C151
    ChooserName              = cnetref
    DateTime                 = 2005-05-03T00:00:00
    EditLock                 = True
    Ignore                   = True
    AprioriXYZSource         = Basemap
    AprioriXYZSourceFile     = ./dummy.cub
    AprioriRadiusSource      = DEM
    AprioriRadiusSourceFile  = $base/dems/molaMarsPlanetaryRadius0003.cub

    # AprioriLatitude = 31.999999989922 <degrees>
    AprioriX                 = -424.024048 <meters>

    # AprioriLongitude = 119.99999999551 <degrees>
    AprioriY                 = 734.4311949 <meters>

    # AprioriRadius = 999.99999984142 <meters>
    AprioriZ                 = 529.919264 <meters>
    AprioriCovarianceMatrix  = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)
    LatitudeConstrained      = True
    LongitudeConstrained     = True
    RadiusConstrained        = True

    # AdjustedLatitude = 31.999999989922 <degrees>
    AdjustedX                = -424.024048 <meters>

    # AdjustedLongitude = 119.99999999551 <degrees>
    AdjustedY                = 734.4311949 <meters>

    # AdjustedRadius = 999.99999984142 <meters>
    AdjustedZ                = 529.919264 <meters>
    AdjustedCovarianceMatrix = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)

    Group = ControlMeasure
      SerialNumber   = Test1
      MeasureType    = Candidate
      ChooserName    = seedgrid
      DateTime       = 2005-05-03T00:00:00
      EditLock       = True
      Ignore         = True
      Sample         = 1.0
      Line           = 2.0
      Diameter       = 15.0
      AprioriSample  = 2.0
      AprioriLine    = 5.0
      SampleSigma    = 0.01 <pixels>
      LineSigma      = 0.21 <pixels>
      SampleResidual = -3.0 <pixels>
      LineResidual   = 4.0 <pixels>
      JigsawRejected = No
      Reference      = True
    End_Group
  End_Object
End_Object
End
Done printing point.

Adding ControlMeasure with cube serial number [Test2]
Testing Edit Locking... ok!

Printing point:
Object = ControlNetwork
  NetworkId    = Identifier
  TargetName   = Null
  UserName     = Null
  Created      = Yesterday
  LastModified = Yesterday
  Description  = Null
  Version      = 5

  Object = ControlPoint
    PointType                = Fixed
    PointId                  = C151
    ChooserName              = cnetref
    DateTime                 = 2005-05-03T00:00:00
    EditLock                 = True
    Ignore                   = True
    AprioriXYZSource         = Basemap
    AprioriXYZSourceFile     = ./dummy.cub
    AprioriRadiusSource      = DEM
    AprioriRadiusSourceFile  = $base/dems/molaMarsPlanetaryRadius0003.cub

    # AprioriLatitude = 31.999999989922 <degrees>
    AprioriX                 = -424.024048 <meters>

    # AprioriLongitude = 119.99999999551 <degrees>
    AprioriY                 = 734.4311949 <meters>

    # AprioriRadius = 999.99999984142 <meters>
    AprioriZ                 = 529.919264 <meters>
    AprioriCovarianceMatrix  = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)
    LatitudeConstrained      = True
    LongitudeConstrained     = True
    RadiusConstrained        = True

    # AdjustedLatitude = 31.999999989922 <degrees>
    AdjustedX                = -424.024048 <meters>

    # AdjustedLongitude = 119.99999999551 <degrees>
    AdjustedY                = 734.4311949 <meters>

    # AdjustedRadius = 999.99999984142 <meters>
    AdjustedZ                = 529.919264 <meters>
    AdjustedCovarianceMatrix = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)

    Group = ControlMeasure
      SerialNumber   = Test1
      MeasureType    = Candidate
      ChooserName    = seedgrid
      DateTime       = 2005-05-03T00:00:00
      Ignore         = True
      Sample         = 1.0
      Line           = 2.0
      Diameter       = 15.0
      AprioriSample  = 2.0
      AprioriLine    = 5.0
      SampleSigma    = 0.01 <pixels>
      LineSigma      = 0.21 <pixels>
      SampleResidual = -3.0 <pixels>
      LineResidual   = 4.0 <pixels>
      JigsawRejected = No
    End_Group

    Group = ControlMeasure
      SerialNumber   = Test2
      MeasureType    = Candidate
      ChooserName    = seedgrid
      DateTime       = 2005-05-03T00:00:00
      EditLock       = True
      Ignore         = True
      Sample         = 100.0
      Line           = 200.0
      Diameter       = 15.0
      AprioriSample  = 2.0
      AprioriLine    = 5.0
      SampleSigma    = 0.01 <pixels>
      LineSigma      = 0.21 <pixels>
      SampleResidual = -2.0 <pixels>
      LineResidual   = 2.0 <pixels>
      JigsawRejected = No
      Reference      = True
    End_Group
  End_Object
End_Object
End
Done printing point.

Testing copy constructor...
	 Also testing == operator
		 original == its self (yes)? 1
		 original == copy (no)? 0
Printing point:
Object = ControlNetwork
  NetworkId    = Identifier
  TargetName   = Null
  UserName     = Null
  Created      = Yesterday
  LastModified = Yesterday
  Description  = Null
  Version      = 5

  Object = ControlPoint
    PointType                = Fixed
    PointId                  = C151
    ChooserName              = cnetref
    DateTime                 = 2005-05-03T00:00:00
    EditLock                 = True
    Ignore                   = True
    AprioriXYZSource         = Basemap
    AprioriXYZSourceFile     = ./dummy.cub
    AprioriRadiusSource      = DEM
    AprioriRadiusSourceFile  = $base/dems/molaMarsPlanetaryRadius0003.cub

    # AprioriLatitude = 31.999999989922 <degrees>
    AprioriX                 = -424.024048 <meters>

    # AprioriLongitude = 119.99999999551 <degrees>
    AprioriY                 = 734.4311949 <meters>

    # AprioriRadius = 999.99999984142 <meters>
    AprioriZ                 = 529.919264 <meters>
    AprioriCovarianceMatrix  = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)
    LatitudeConstrained      = True
    LongitudeConstrained     = True
    RadiusConstrained        = True

    # AdjustedLatitude = 31.999999989922 <degrees>
    AdjustedX                = -424.024048 <meters>

    # AdjustedLongitude = 119.99999999551 <degrees>
    AdjustedY                = 734.4311949 <meters>

    # AdjustedRadius = 999.99999984142 <meters>
    AdjustedZ                = 529.919264 <meters>
    AdjustedCovarianceMatrix = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)

    Group = ControlMeasure
      SerialNumber   = Test1
      MeasureType    = Candidate
      ChooserName    = seedgrid
      DateTime       = 2005-05-03T00:00:00
      Ignore         = True
      Sample         = 1.0
      Line           = 2.0
      Diameter       = 15.0
      AprioriSample  = 2.0
      AprioriLine    = 5.0
      SampleSigma    = 0.01 <pixels>
      LineSigma      = 0.21 <pixels>
      SampleResidual = -3.0 <pixels>
      LineResidual   = 4.0 <pixels>
      JigsawRejected = No
    End_Group

    Group = ControlMeasure
      SerialNumber   = Test2
      MeasureType    = Candidate
      ChooserName    = seedgrid
      DateTime       = 2005-05-03T00:00:00
      EditLock       = True
      Ignore         = True
      Sample         = 100.0
      Line           = 200.0
      Diameter       = 15.0
      AprioriSample  = 2.0
      AprioriLine    = 5.0
      SampleSigma    = 0.01 <pixels>
      LineSigma      = 0.21 <pixels>
      SampleResidual = -2.0 <pixels>
      LineResidual   = 2.0 <pixels>
      JigsawRejected = No
      Reference      = True
    End_Group
  End_Object
End_Object
End
Done printing point.

Testing assignment operator...
Printing point:
Object = ControlNetwork
  NetworkId    = Identifier
  TargetName   = Null
  UserName     = Null
  Created      = Yesterday
  LastModified = Yesterday
  Description  = Null
  Version      = 5

  Object = ControlPoint
    PointType                = Fixed
    PointId                  = C151
    ChooserName              = cnetref
    DateTime                 = 2005-05-03T00:00:00
    Ignore                   = True
    AprioriXYZSource         = Basemap
    AprioriXYZSourceFile     = ./dummy.cub
    AprioriRadiusSource      = DEM
    AprioriRadiusSourceFile  = $base/dems/molaMarsPlanetaryRadius0003.cub

    # AprioriLatitude = 31.999999989922 <degrees>
    AprioriX                 = -424.024048 <meters>

    # AprioriLongitude = 119.99999999551 <degrees>
    AprioriY                 = 734.4311949 <meters>

    # AprioriRadius = 999.99999984142 <meters>
    AprioriZ                 = 529.919264 <meters>
    AprioriCovarianceMatrix  = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)
    LatitudeConstrained      = True
    LongitudeConstrained     = True
    RadiusConstrained        = True

    # AdjustedLatitude = 31.999999989922 <degrees>
    AdjustedX                = -424.024048 <meters>

    # AdjustedLongitude = 119.99999999551 <degrees>
    AdjustedY                = 734.4311949 <meters>

    # AdjustedRadius = 999.99999984142 <meters>
    AdjustedZ                = 529.919264 <meters>
    AdjustedCovarianceMatrix = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)

    Group = ControlMeasure
      SerialNumber   = Test1
      MeasureType    = Candidate
      ChooserName    = seedgrid
      DateTime       = 2005-05-03T00:00:00
      Ignore         = True
      Sample         = 1.0
      Line           = 2.0
      Diameter       = 15.0
      AprioriSample  = 2.0
      AprioriLine    = 5.0
      SampleSigma    = 0.01 <pixels>
      LineSigma      = 0.21 <pixels>
      SampleResidual = -3.0 <pixels>
      LineResidual   = 4.0 <pixels>
      JigsawRejected = No
      Reference      = True
    End_Group

    Group = ControlMeasure
      SerialNumber   = Test2
      MeasureType    = Candidate
      ChooserName    = seedgrid
      DateTime       = 2005-05-03T00:00:00
      Ignore         = True
      Sample         = 100.0
      Line           = 200.0
      Diameter       = 15.0
      AprioriSample  = 2.0
      AprioriLine    = 5.0
      SampleSigma    = 0.01 <pixels>
      LineSigma      = 0.21 <pixels>
      SampleResidual = -2.0 <pixels>
      LineResidual   = 2.0 <pixels>
      JigsawRejected = No
    End_Group
  End_Object
End_Object
End
Done printing point.

Deleting ControlMeasure with cube serial number [Test1]
Measure type: Candidate
Printing point:
Object = ControlNetwork
  NetworkId    = Identifier
  TargetName   = Null
  UserName     = Null
  Created      = Yesterday
  LastModified = Yesterday
  Description  = Null
  Version      = 5

  Object = ControlPoint
    PointType                = Fixed
    PointId                  = C151
    ChooserName              = cnetref
    DateTime                 = 2005-05-03T00:00:00
    EditLock                 = True
    Ignore                   = True
    AprioriXYZSource         = Basemap
    AprioriXYZSourceFile     = ./dummy.cub
    AprioriRadiusSource      = DEM
    AprioriRadiusSourceFile  = $base/dems/molaMarsPlanetaryRadius0003.cub

    # AprioriLatitude = 31.999999989922 <degrees>
    AprioriX                 = -424.024048 <meters>

    # AprioriLongitude = 119.99999999551 <degrees>
    AprioriY                 = 734.4311949 <meters>

    # AprioriRadius = 999.99999984142 <meters>
    AprioriZ                 = 529.919264 <meters>
    AprioriCovarianceMatrix  = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)
    LatitudeConstrained      = True
    LongitudeConstrained     = True
    RadiusConstrained        = True

    # AdjustedLatitude = 31.999999989922 <degrees>
    AdjustedX                = -424.024048 <meters>

    # AdjustedLongitude = 119.99999999551 <degrees>
    AdjustedY                = 734.4311949 <meters>

    # AdjustedRadius = 999.99999984142 <meters>
    AdjustedZ                = 529.919264 <meters>
    AdjustedCovarianceMatrix = (100.0, 0.0, 0.0, 2500.0, 0.0, 400.0)

    Group = ControlMeasure
      SerialNumber   = Test2
      MeasureType    = Candidate
      ChooserName    = seedgrid
      DateTime       = 2005-05-03T00:00:00
      EditLock       = True
      Ignore         = True
      Sample         = 100.0
      Line           = 200.0
      Diameter       = 15.0
      AprioriSample  = 2.0
      AprioriLine    = 5.0
      SampleSigma    = 0.01 <pixels>
      LineSigma      = 0.21 <pixels>
      SampleResidual = -2.0 <pixels>
      LineResidual   = 2.0 <pixels>
      JigsawRejected = No
      Reference      = True
    End_Group
  End_Object
End_Object
End
Done printing point.


Test adding control measures with identical serial numbers ...
**PROGRAMMER ERROR** The SerialNumber is not unique. A measure with serial number [Test2] already exists for ControlPoint [C151].

Test SetAdjustedSurfacePoint ... 
X = -424.024
Y = 734.431
Z = 529.919
Latitude = 32
Longitude = 120
Radius = 1000
X = -424.024
Y = 734.431
Z = 529.919
Latitude = 32
Longitude = 120
Radius = 1000

Test conversions for apriori/adjusted covariance matrices ... 
Apriori Sigma X = 10
Apriori Sigma Y = 50
Apriori Sigma Z = 20
Adjusted Sigma X = 10
Adjusted Sigma Y = 50
Adjusted Sigma Z = 20

Testing IsReferenceExplicit...
cp:                    1
newCp:                 0
newCp with implicit:   0
newCp with explicit:   1
newCp reverted to implicit:   0

testing getMeasures method...
alpha
beta
alpha
Testing various accessor methods... 
AprioriSurfacePointSourceFile: ./dummy.cub
AprioriRadiusSourceFile: $base/dems/molaMarsPlanetaryRadius0003.cub
AprioriCoordinates: (-424.024, 734.431, 529.919)
AdjustedCoordinates: (-424.024, 734.431, 529.919)
ReferenceMeasure index: 0
Point was not rejected by jigsaw.

testing error handling for StringToPointType...
  **PROGRAMMER ERROR** There is no PointType that has a string representation of "aoeu".