Commit 688d874b authored by Jeannie Backer's avatar Jeannie Backer
Browse files

Improved THEMIS VIS camera model, fixed bug in ingestion, other related changes. Fixes #1659

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5960 41f8697f-d340-4b68-9986-7bafba869bb8
parent 43efaf59
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -147,6 +147,9 @@
    <change name="Janet Barrett" date="2014-08-04">
      Modified so that the program can be run on a mosaic file. Fixes #2158.
    </change>
    <change name="Jeannie Backer" date="2014-08-22">
      Updated pushframe truth data due to modification of THEMIS VIS distortion model. References #1659.
    </change>
  </history>
  
  <groups>
+24 −10
Original line number Diff line number Diff line
@@ -136,15 +136,15 @@ namespace Isis {
    if (!noErrors) {
      for (int i = 0; i < gp->keywords(); i++) {
        QString name = (*gp)[i].name();
        // These three keywords have 3 values, so they must have 3 N/As
        // These three keywords have 3 values, so they must have 3 NULLs
        if (name == "BodyFixedCoordinate" || name == "SpacecraftPosition" ||
            name == "SunPosition") {
          (*gp)[i].addValue("N/A");
          (*gp)[i].addValue("N/A");
          (*gp)[i].addValue("N/A");
          (*gp)[i].addValue("NULL");
          (*gp)[i].addValue("NULL");
          (*gp)[i].addValue("NULL");
        }
        else {
          (*gp)[i].setValue("N/A");
          (*gp)[i].setValue("NULL");
        }
      }
      // Set all keywords that still have valid information
@@ -240,7 +240,14 @@ namespace Isis {
        gp->findKeyword("SpacecraftPosition").addValue(toString(spB[2]), "km");
        gp->findKeyword("SpacecraftPosition").addComment("Spacecraft Information");

        gp->findKeyword("SpacecraftAzimuth").setValue(toString(camera()->SpacecraftAzimuth()));
        // if IsValid
        if (Isis::IsValidPixel(camera()->SpacecraftAzimuth())) {
          double spacecraftAzi = camera()->SpacecraftAzimuth();
          gp->findKeyword("SpacecraftAzimuth").setValue(toString(spacecraftAzi));
        }
        else {
          gp->findKeyword("SpacecraftAzimuth").setValue("NULL");
        }
        gp->findKeyword("SlantDistance").setValue(toString(camera()->SlantDistance()), "km");
        gp->findKeyword("TargetCenterDistance").setValue(toString(
                        camera()->targetCenterDistance()), "km");
@@ -250,8 +257,8 @@ namespace Isis {
        gp->findKeyword("SpacecraftAltitude").setValue(toString(
                        camera()->SpacecraftAltitude()), "km");
        gp->findKeyword("OffNadirAngle").setValue(toString(camera()->OffNadirAngle()));
        double subspcgrdaz;
        subspcgrdaz = camera()->GroundAzimuth(camera()->UniversalLatitude(), 

        double subspcgrdaz = camera()->GroundAzimuth(camera()->UniversalLatitude(), 
                                                     camera()->UniversalLongitude(), 
                                                     ssplat, ssplon);
        gp->findKeyword("SubSpacecraftGroundAzimuth").setValue(toString(subspcgrdaz));
@@ -262,7 +269,14 @@ namespace Isis {
        gp->findKeyword("SunPosition").addValue(toString(sB[2]), "km");
        gp->findKeyword("SunPosition").addComment("Sun Information");
        
        gp->findKeyword("SubSolarAzimuth").setValue(toString(camera()->SunAzimuth()));
        if (Isis::IsValidPixel(camera()->SunAzimuth())) {
          double sunAzi = camera()->SunAzimuth();
          gp->findKeyword("SubSolarAzimuth").setValue(toString(sunAzi));
        }
        else {
          gp->findKeyword("SubSolarAzimuth").setValue("NULL");
        }

        gp->findKeyword("SolarDistance").setValue(toString(camera()->SolarDistance()), "AU");
        camera()->subSolarPoint(sslat, sslon);
        gp->findKeyword("SubSolarLatitude").setValue(toString(sslat));
@@ -284,7 +298,7 @@ namespace Isis {
        gp->findKeyword("UTC").setValue(utc);
        gp->findKeyword("LocalSolarTime").setValue(toString(camera()->LocalSolarTime()), "hour");
        gp->findKeyword("SolarLongitude").setValue(toString(camera()->solarLongitude().degrees()));
        if(allowErrors) gp->findKeyword("Error").setValue("N/A");
        if (allowErrors) gp->findKeyword("Error").setValue("NULL");
      }
    }
    return gp;
+5 −1
Original line number Diff line number Diff line
@@ -77,7 +77,11 @@ namespace Isis {
   *   @history 2013-03-27 Jeannie Backer - Added comment in code.
   *                           References #1248.
   *   @history 2012-12-20 Debbie A. Cook - Changed to use TProjection.  References #775.
   *   @history 2013-04-08 Debbie A. Cook - Extended CameraPointInfo to CameraRingsPointInfo.  References #775
   *   @history 2013-04-08 Debbie A. Cook - Extended CameraPointInfo to CameraRingsPointInfo.
   *                           References #775
   *   @history 2014-04-17 Jeannie Backer - Added check for valid azimuth values.  If
   *                           not, print "NULL" to be consistent with caminfo's
   *                           CamTools.cpp. References #1659
   */
  class CameraRingsPointInfo : public CameraPointInfo {

+3 −0
Original line number Diff line number Diff line
@@ -101,6 +101,9 @@ End_Group
      Added appTests.  Test coverage 79% scope, 91% line, 100% function covers all but 
      CameraRingsPointInfo::GetPointInfo() with allowErrors=true.
    </change>
    <change name="Jeannie Backer" date="2014-08-22">
      Updated truth data. References #1659.
    </change>
  </history>

  <groups>
+2 −1
Original line number Diff line number Diff line
@@ -108,7 +108,8 @@ namespace Isis {
   * @returns True if we have a legitimate angle value, false if not initialized
   */
  bool Angle::isValid() const {
    return m_radians != Null;
    return m_radians != Isis::Null; // returns false if the value is Null or any other special value
//    return IsValidPixel(m_radians); // returns false if the value is Null or any other special value
  }


Loading