From 715562c6af88abcfd42ce9989c741e419f27374e Mon Sep 17 00:00:00 2001
From: kledmundson <6842706+kledmundson@users.noreply.github.com>
Date: Tue, 30 Apr 2019 12:03:39 -0700
Subject: [PATCH] Lro lidar infrastructure (#3253)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Updated the cmake version to 3.10

* Adding configurations for gtest

* Tweaking things for gtest

* Got gtest working and made a small example test

* Updated the cmake version to be 3.10 or greater

* Added test file discovery support and seperated the main into another file

* Added more tests for FileName

* Updated with the new testing guidelines and added new tests.

* Added gmock

* PixelTest (#536)

* initial Pixel test

* Add more test cases for Pixel

* testing parameterization in Pixel test

* testing function parameterization

* parameterize static vs object methods

* basic PixelTests implementation

* clean up and more static tests

* update PixelTests with float/dbl expects

* Refactored stats to a functions

* Modified to have cubeit remove mosaic pixel tracking info from labels. Fixes #5533

* Update cubeit.xml

Fixed a typo

* Fixes conda channels in Jenkinsfile & adds a MacOS node (#633)

* Merged dev and cleaned up header conflicts

* Update for #619.

* Fix libtiff dependency (#636) (#644)

* Upgrade libtiff to 4.0.10 (#636)

* Switch libtiff to 4.0.9 or higher to remove geotiff conflict

* Moved ISIS3 conda-build recipe from ISIS3_deps repository (#650)

* Fixed warning in Pixel unit tests

* Removing build numbers from external libraries (#660)

* Moved ISIS3 conda-build recipe from ISIS3_deps repository

* Un-pinned non-astro build numbers

* Removing build numbers from external libraries in the environment and meta.yeml files

* Final merging

* Added pixel type attribute to the output image of program shadow. Fixes #5187 (#659)

* Removed bolding of some text to decrease distraction.

* Fixed some typos.

* Reworded documentation.

* Added section for Environment and PreferemcesSetup in the Getting Started Section. (#663)

* Updated .gitmodules to use https rather than ssh (#673)

* Added build type release to conda recipe (#676)

* Updates README with Discourse (#690)

* Updates README with Discourse

* Update README.md

* Update README.md

* Added fix to Spice Server to accept clients with version nums >=3.5.*.* (#780)

* Fixed error when trying to export a compressed image using pds2hideal. Fixes #5525. (#2059)

* Added capability to export a compressed image with tables missing RECORD_BYTES keyword. Added test for compressed image.

* Changed names of test output cubes.

* Adding explanatory comments to the meta.yaml file (#2358)

* Adding explanatory comments to the recipes/meta.yaml

* Replacing accidentally erased line

* Multisegment DSK support for Bullet engine (#2791)

* Merged multisegment DSKs for Bullet

* basic tests

* removed original tests

* Minor updates to download sizes and some text. (#2790)

* Phocube will export RA and declination planes even if the point is not on the planet. Fixes #4446 (#657)

* Made it so that RA and Dec are added last.

* Updated code to be up to standards.

* Added RA and dec test.

* Updated history comment.

* Renamed test.

* Fixed typo in documentation

* Refactored code so that RA and dec are placed in the correct bands instead of moving them to the last two bands.

* Updated documentation, test now checks cube label.

* Fixed SummingMode keyword being set in tgocassis2isis  (#2847)

* Adding Expanded keyword to cassis label and modifying SummingMode keyword

* Updating the window count value

* Adding capacity to handle imports without Expanded tag

* Setting tgocassismos to have tracking turned-on (#2856)

* Adding parameter "tracking=true" to tgocassismos call to automos

* Adding documentation

* Fixing indentation in documentation

* Updates to tgocassisrdrgen and ProcessExportPds4 to add content to exported CaSSIS Label. (#2858)

* Add 32-bit ISIS Special Pixel Constants to ProcessExportPds4

* Add ability to set title and version id in exported PDS4 produce in tgocassisrdrgen and ProcessExportPds4 API

* Fix bug that occurs when exporting mosaics with Archive groups and fixed min/max lat/lon to east/west bounding box positive east flip bug

* Added docs.

* Update schema to most recent versions and comment-out schema that isn't used (temporarily) in tgocassisrdrgen.

* Adds Issue Templates to Issues (#664)

* Adds issue templates

* Verbage update

* Updates issue template for questions (#3131)

Removed a newline in the header that I believe was causing the automatic template detection to fail.

* Added gtest for ID and split TestUtilities into a cpp and h file to fix duplicate symbol error when building. (#2824)

Code reviewed and tested

* tgocassisrdrgen exported label re-order.  (#3135)

* Add 32-bit ISIS Special Pixel Constants to ProcessExportPds4

* Add ability to set title and version id in exported PDS4 produce in tgocassisrdrgen and ProcessExportPds4 API

* Fix bug that occurs when exporting mosaics with Archive groups and fixed min/max lat/lon to east/west bounding box positive east flip bug

* Added docs.

* Update schema to most recent versions and comment-out schema that isn't used (temporarily) in tgocassisrdrgen.

* Added reorder function to ProcessExportPds4 to reorder xml files generated in the wrong order for PDS4 and added cassis-specific schema

* Update label generated by tgocassisrdrgen from additional feedback (#3137)

* Add 32-bit ISIS Special Pixel Constants to ProcessExportPds4

* Add ability to set title and version id in exported PDS4 produce in tgocassisrdrgen and ProcessExportPds4 API

* Fix bug that occurs when exporting mosaics with Archive groups and fixed min/max lat/lon to east/west bounding box positive east flip bug

* Added docs.

* Update schema to most recent versions and comment-out schema that isn't used (temporarily) in tgocassisrdrgen.

* Added reorder function to ProcessExportPds4 to reorder xml files generated in the wrong order for PDS4 and added cassis-specific schema

* Add StopTime to tgocassismos's Mosaic PVL group, as it is required for PDS4 export. Also, fix time formatting and east_azimuth units

* Remove comment

* Updated truthdata for ProcessExportPds4 class to match updates made for CaSSIS sprint (#3146)

* Fix time-formatting in reingested CaSSIS images. (#3149)

* Updated truthdata for ProcessExportPds4 class to match updates made for CaSSIS sprint

* Fix trailing Z time-format in tgocassis2isis when reingesting images exported from ISIS3

* Added LineEqationTests.cpp (#3152)

* History entry added to cube after running sumspice. Fixes #4972. (#658)

* Added WriteHistory() method to SumFinder.

* Renamed method.

* Refactored writeHistory to be up to isis standards.

* Added history entries and updated code to be up to isis standards.

* Updated history entry.

* adding dedicated BundleLidarPointVector class

* adding dedicated BundleLidarPointVector class

* adding dedicated BundleLidarPointVector class

* Various minor mods to the readme (#3165)

* Added FileList test (#3168)

* Added LineEqationTests.cpp

* Added FileListTests.cpp
Implemented an istream constructor in FileList.cpp to help with testing.

* added FileList tests. implemented istream constructor for FileList.cpp to help with testing.

* fixed whitespace issues in FileListTests.cpp

* Update FileListTests.cpp

* Cleaned up data area wording in install guide (#3170)

* temp commits for testing bundle with lidar

* temp commits to bundle lidar

* Add ISIS3 update instructions to README (#3175)

* Merged multisegment DSKs for Bullet

* updated with update instructions

* isis->isis3

* added header

* Updating Contributing.md (#3179)

* Merged multisegment DSKs for Bullet

* updated with update instructions

* isis->isis3

* added header

* updated contributing guidelines

* removed mentions of TC

* Added LatitudeTest using Gtest (#3160)

* Added gtest for ID and split TestUtilities into a cpp and h file to fix duplicate symbol error when building.

* Created LatitudeTests.

* Added C-Shell variable setup (#3173)

* Added C-Shell variable setup

* Fixed history

* Made a bit more pythonic

* Updates BulletDSKShape's methods for multisegment DSKs (#3181)

* fixed DSK segment methods

* fixed some errors

* added contraints

* fixed bug where an extra segment was added

* Fixed memory leak in Bullet shape model (#3180)

* Added AffineTests (#3166)

* Add Longitude gtest (rebase of #601) (#3182)

* Created gtest for Longitude class

* Remove old Longitude test

* Fix syntax for Longitude Tests

* Remove comment

* Revert "Remove old Longitude test"

This reverts commit 608d3fd5c32d7e4a1de7fec407697a0147fbfae0.

* Cleaned file, organzied test cases

* Fixed failing copy constructor test

* Fixed bug where findrx was not adding a history blob to the input cube (#3186)

* Added writeHistory to findrx.

* Rearranged includes in findrx.

* Removed extra exceptions writing controlnets (#3185)

* Fixed bug where focal plane measured x,y coordinates were not set if the cam->SetImage call failed, References #2591). (#3193)

* updates to ControlPoint::ComputeApriori

* Fixed bug where focal plane measured x,y coordinates were not set if the cam->SetImage call failed (References #2591). Added check to IsConstrained() method to see if point type is Free, in which case we ignore stored a priori sigmas on the coordinates.

* added isis error when GenericTransform::calculateInverse gets empty matrix (#3195)

* Writing 0 Value Residuals to PVL (#3194)

* Allowed writting of residuals when value is zero to controlnet pvl

* Updated ControlNetVersioner unit test

* Fixing errors introduced with the changes to ProcessExportPds4.cpp for the tgo sprint. (#3202)

* Github/Discuss Documentation Update (#3203)

* Updated website documentation to point to github and discuss where appropriate

* Updated last install link

* Added BasisFunctionTests.cpp. Removed BasisFunction unit test and tru… (#3200)

* Added BasisFunctionTests.cpp. Removed BasisFunction unit test and truthfile.

* changed expectedOutput values for some of the tests

* Update README.md (#3204)

Updated to include instructions for release candidate builds on anaconda

* Added gtests for Displacement.cpp, removed Displacement unitTest and truthfile. (#3209)

* Added BasisFunctionTests.cpp. Removed BasisFunction unit test and truthfile.

* changed expectedOutput values for some of the tests

* Made tests for Displacement.cpp using gtest. removed Displacement unitTest and truthfile.

* Updated README data area instructions (#3214)

* Fixed data area instructions in README and some links

* Fixed bold in block quote

* Fixed legacy install guide link

* extra l

* Testing indentation list

* Testing indentation list again

* Testing indentation list code snippet

* Minor wording clean up

* Removed extra number

* Removed duplicate Mars Odyssey entry

* Updates to the build recipe for ISIS releases for the 3.7.0 release candidate. (#3205)

* Minor modifications for RC build

* Small modification to version in the recipe/meta.yaml

* Updating release stage in isis/version

* Added Area3DTests.cpp (#3216)

* Added BasisFunctionTests.cpp. Removed BasisFunction unit test and truthfile.

* changed expectedOutput values for some of the tests

* Made tests for Displacement.cpp using gtest. removed Displacement unitTest and truthfile.

* Added Area3DTests.cpp, removed Area3D truthfile and unit test.

* included TestUtilities.h for use with exception testing, added a test for teh Area3D '=' operator

* changed formatting to adhere to USGS coding standards

* re-addedd the unit test and truth file

* gllssi2isis Original Label Fix (#3226)

* Allowed writting of residuals when value is zero to controlnet pvl

* Updated ControlNetVersioner unit test

* Fixed pvl labels original pvl labels not being written to the resulting cube.

* Updated docstrings and history for updated methods

* Removed the need to set the output cube pixel type

* Reverted proceeimport changes

* Set the dimensions in the process before processing

* Added missing 1 in a history record

* Reverted and applied a more appropriate fix

* Used outfile obtained at the beginning of the program

* Added history comment to app xml

* Removed accidental comma (#3230)

* Update README.md (#3232)

Update readability

* Modifying files for conda build for ISIS3.7.0_RC2 (#3229)

* Modifying files for conda build for ISIS3.7.0_RC_2

* Changes to modifications until issue #3231 can be completed

* Small typo

* One final added comment for clarification

* Adding tab completion for tcsh on conda activation (#3244)

* updates for bundle lidar

* updates for bundle lidar

* added history comment noting that piecewise polynomial functionality has been disabled to get the lidar stuff working

* updates for bundle with lidar

* removed commented code
---
 .../objs/ControlPoint/ControlPoint.cpp        | 150 ------------------
 1 file changed, 150 deletions(-)

diff --git a/isis/src/control/objs/ControlPoint/ControlPoint.cpp b/isis/src/control/objs/ControlPoint/ControlPoint.cpp
index babafbe4e2..8a7df0f444 100644
--- a/isis/src/control/objs/ControlPoint/ControlPoint.cpp
+++ b/isis/src/control/objs/ControlPoint/ControlPoint.cpp
@@ -989,156 +989,6 @@ namespace Isis {
   }
 
 
-  /**
-   * This method computes the apriori lat/lon for a point.  It computes this
-   * by determining the average lat/lon of all the measures.  Note that this
-   * does not change ignored, or fixed points.  Also, it does not
-   * use unmeasured or ignored measures when computing the lat/lon.
-   * @internal
-   *   @history 2008-06-18  Tracie Sucharski/Jeannie Walldren,
-   *                               Changed error messages for
-   *                               Held/Ground points.
-   *   @history 2009-10-13 Jeannie Walldren - Added detail to
-   *                               error message.
-   *   @history 2010-11-29 Tracie Sucharski - Remove call to ControlMeasure::
-   *                               SetMeasuredEphemerisTime, the values were
-   *                               never used. so these methods were removed
-   *                               from ControlMeasure and the call was removed
-   *                               here.
-   *   @history 2010-12-02 Debbie A. Cook - Added units to SetRectangular
-   *                               calls since default is meters and units
-   *                               are km.
-   *   @history 2011-03-17 Debbie A. Cook - Added initialization of
-   *                               adjustedSurfacePoint to aprioriSurfacePoint
-   *                               and set test for empty covariance matrix
-   *                               to use 0. instead of nulls.
-   *   @history 2011-03-24 Debbie A. Cook - Removed IsMeasured check since it
-   *                               was really checking for Candidate measures.
-   *   @history 2011-07-12 Debbie A. Cook - Removed editLock test.  Users agreed
-   *                               editLock was only for fixed and constrained
-   *                               points, which are already left unchanged by
-   *                               ComputeApriori. If a free point is editLocked
-   *                               the editLock will be ignored by this method.
-   *  @history 2017-04-25 Debbie A. Cook - change constraint status calls
-   *                               to use generic coordinate names (Coord1, Coord2,
-   *                               and Coord3).
-   *
-   * @return Status Success or PointLocked
-   */
-/*
-  ControlPoint::Status ControlPoint::ComputeApriori() {
-    PointModified();
-    // Don't goof with fixed points.  The lat/lon is what it is ... if
-    // it exists!
-    // 2013-11-12 KLE I think this check should include points with any
-    // number of constrained coordinates???  I agree DAC.  *** TODO ***
-    if (GetType() == Fixed) {
-      if (!aprioriSurfacePoint.Valid()) {
-        QString msg = "ControlPoint [" + GetId() + "] is a fixed point ";
-        msg += "and requires an apriori x/y/z";
-        throw IException(IException::User, msg, _FILEINFO_);
-      }
-      // Don't return until after the FocalPlaneMeasures have been set
-      //      return;
-    }
-    double xB = 0.0;
-    double yB = 0.0;
-    double zB = 0.0;
-    double r2B = 0.0;
-    int goodMeasures = 0;
-    // Loop for each measure and compute the sum of the lat/lon/radii
-    for (int j = 0; j < cubeSerials->size(); j++) {
-      ControlMeasure *m = GetMeasure(j);
-      // The comment code was really checking for candidate measures
-      // Commented out 2011-03-24 by DAC
-//       if (!m->IsMeasured()) {
-//         // TODO: How do we deal with unmeasured measures
-//       }
-//       else if (m->IsIgnored()) {
-      if (m->IsIgnored()) {
-        // TODO: How do we deal with ignored measures
-      }
-      else {
-        Camera *cam = m->Camera();
-        if (cam == NULL) {
-          QString msg = "The Camera must be set prior to calculating apriori";
-          throw IException(IException::Programmer, msg, _FILEINFO_);
-        }
-        if (cam->SetImage(m->GetSample(), m->GetLine())) {
-          goodMeasures++;
-          double pB[3];
-          cam->Coordinate(pB);
-          xB += pB[0];
-          yB += pB[1];
-          zB += pB[2];
-          r2B += pB[0]*pB[0] + pB[1]*pB[1] + pB[2]*pB[2];
-          double x = cam->DistortionMap()->UndistortedFocalPlaneX();
-          double y = cam->DistortionMap()->UndistortedFocalPlaneY();
-          m->SetFocalPlaneMeasured(x, y);
-        }
-        else {
-          // JAA: Don't stop if we know the lat/lon.  The SetImage may fail
-          // but the FocalPlane measures have been set
-          if (GetType() == Fixed) {
-            continue;
-          }
-          // TODO: What do we do
-//          QString msg = "Cannot compute lat/lon/radius (x/y/z) for "
-//              "ControlPoint [" + GetId() + "], measure [" +
-//              m->GetCubeSerialNumber() + "]";
-//          throw IException(IException::User, msg, _FILEINFO_);
-          // m->SetFocalPlaneMeasured(?,?);
-        }
-      }
-    }
-    // Don't update the apriori x/y/z for fixed points  TODO This needs a closer look
-    if (GetType() == Free && !id.contains("Lidar")) {  // TODO: temporary kluge for lidar points
-      // point can be tagged as "Free" but still have constrained coordinates
-      // if tagged "Free" we want to compute approximate a priori coordinates
-    }
-    // if point is "Fixed" or otherwise constrained in one, two, or all three
-    // coordinates, then we use the a priori surface point coordinates that
-    // have been given via other means (e.g. through qnet or cneteditor)
-    // 2013-11-12 KLE Is the next check better as "if Fixed or if # of
-    // constrained coordinates > 1" ???
-    else if (GetType() == Fixed
-        || NumberOfConstrainedCoordinates() == 3
-        || IsCoord1Constrained()
-        || IsCoord2Constrained()
-        || IsCoord3Constrained()
-        || id.contains("Lidar")) { // TODO: temporary kluge for lidar points
-      // Initialize the adjusted x/y/z to the a priori coordinates
-      adjustedSurfacePoint = aprioriSurfacePoint;
-      return Success;
-    }
-    // Beyond this point, we assume the point is free ***TODO*** confirm this
-    // Did we have any measures?
-    if (goodMeasures == 0) {
-      QString msg = "ControlPoint [" + GetId() + "] has no measures which "
-          "project to lat/lon/radius (x/y/z)";
-      throw IException(IException::User, msg, _FILEINFO_);
-    }
-    // Compute the averages if all coordinates are free
-    //if (NumberOfConstrainedCoordinates() == 0) {
-    if (GetType() == Free || NumberOfConstrainedCoordinates() == 0) {
-      double avgX = xB / goodMeasures;
-      double avgY = yB / goodMeasures;
-      double avgZ = zB / goodMeasures;
-      double avgR2 = r2B / goodMeasures;
-      double scale = sqrt(avgR2/(avgX*avgX+avgY*avgY+avgZ*avgZ));
-      aprioriSurfacePoint.SetRectangular(
-        Displacement((avgX*scale), Displacement::Kilometers),
-        Displacement((avgY*scale), Displacement::Kilometers),
-        Displacement((avgZ*scale), Displacement::Kilometers));
-    }
-    adjustedSurfacePoint = aprioriSurfacePoint;
-    SetAprioriSurfacePointSource(SurfacePointSource::AverageOfMeasures);
-    SetAprioriRadiusSource(RadiusSource::AverageOfMeasures);
-    return Success;    
-  }
-*/
-
-
   /**
    * This method computes the BundleAdjust residuals for a point.
    *     *** Warning:  Only BundleAdjust and its applications should be
-- 
GitLab