Commit f5fcf309 authored by Tyler Wilson's avatar Tyler Wilson
Browse files

Added support for changes made to the CameraPointInfo and Camera classes which...

Added support for changes made to the CameraPointInfo and Camera classes which incorporate new estimates for Pixel/Line/Sample/Detector resolutions, and now allow a developer to control the order in which fields are output in both PVL and CSV format.  References #476

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7070 41f8697f-d340-4b68-9986-7bafba869bb8
parent f61e7d14
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -7,10 +7,14 @@
#include "Camera.h"
#include "CameraPointInfo.h"
#include "CSVReader.h"
#include "Distance.h"
#include "IException.h"
#include "iTime.h"
#include "Longitude.h"
#include "Progress.h"
#include "PvlGroup.h"
#include "SpecialPixel.h"
#include "TProjection.h"

using namespace std;
using namespace Isis;
@@ -21,17 +25,28 @@ QList<PvlGroup *> getCameraPointInfo(const UserInterface &ui,
                                    CameraPointInfo &campt);
void writePoints(const UserInterface &ui, QList<PvlGroup*> camPoints);




void IsisMain() {
  UserInterface &ui = Application::GetUserInterface();
  
  // Setup our input cube
  CameraPointInfo campt;

  QString fileFormat = ui.GetString("FORMAT");
  if(fileFormat=="PVL")
      campt.SetCSVOutput(false);
  else
      campt.SetCSVOutput(true);

  campt.SetCube(ui.GetFileName("FROM") + "+" + ui.GetInputAttribute("FROM").toString());

  // Grab the provided points (coordinates)
  QList< QPair<double, double> > points = getPoints(ui, ui.WasEntered("COORDLIST"));
  
  // Get the camera point info for coordiante

  QList<PvlGroup*> camPoints = getCameraPointInfo(ui, points, campt);
  
  writePoints(ui, camPoints);
@@ -209,6 +224,8 @@ void writePoints(const UserInterface &ui, QList<PvlGroup*> camPoints) {
          os << endl;
        }
        


        for (int i = 0; i < (*point).keywords(); i++) {
          if ((*point)[i].size() == 3) {
            os << (QString)(*point)[i][0] << ","
+43 −46
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>

<application name="campt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://isis.astrogeology.usgs.gov/Schemas/Application/application.xsd">
<application name="campt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://isis.astrogeology.usgs.gov/Schemas/Application/application.xsd">
  <brief>
    Computes geometric and photometric information at a given pixel location
  </brief>
@@ -35,8 +37,8 @@
    <p> 
    The following is a partial list of coordinates computed in the <i>campt</i> application:<br />
    <br />
    <b>Geometric Information</b>: <def>Latitude</def>, <def>Longitude</def>, <def 
    link="Line Resolution">Resolution</def> <br />
    <b>Geometric Information</b>: <def>Latitude</def>, <def>Longitude</def>, <def>Oblique Detector Resolution</def>, 
       <def>Line Resolution</def>, <def>Oblique Line Resolution</def> <br />
    <br />
    <b>Photometric Information</b>: <def link="Phase Angle">Phase</def>, 
    <def link="Emission Angle">Emission</def>, and <def link="Incidence 
@@ -66,56 +68,51 @@ Group = GroundPoint
  <def>Sample</def>                     = 1.0
  <def>Line</def>                       = 1.0
  <def link="Digital Number">PixelValue</def>                 = 0.0607816
  <def link="Right Ascension">RightAscension</def>             = 65.749350916052 &lt;DEGREE&gt;
  <def>Declination</def>                = -18.390093214966 &lt;DEGREE&gt;
  <def link="Planetocentric Latitude">PlanetocentricLatitude</def>     = 34.444196777763 &lt;DEGREE&gt;
  <def link="Planetographic Latitude">PlanetographicLatitude</def>     = 34.760399604837 &lt;DEGREE&gt;
  <def link="Positive East Longitude">PositiveEastLongitude</def>      = 223.84999971299 &lt;DEGREE&gt;
  <def link="Positive West Longitude">PositiveWestLongitude</def>      = 136.15000028701 &lt;DEGREE&gt;
  <def link="Body Fixed Coordinate">BodyFixedCoordinate</def>        = (-2015.9595225544, -1936.6155808127, 1917.2574858384) &lt;KM&gt;
  <def link="Local Radius">LocalRadius</def>                = 3389756.4767145 &lt;M&gt;
  <def link="Sample Resolution">SampleResolution</def>           = 536.05556350077 &lt;M&gt;
  <def link="Line Resolution">LineResolution</def>             = 536.05556350077 &lt;M&gt;

  <def link="Right Ascension">RightAscension</def>             = 65.749350916052
  <def>Declination</def>                = -18.390093214966
  <def link="Planetocentric Latitude">PlanetocentricLatitude</def>     = 34.444196777763
  <def link="Planetographic Latitude">PlanetographicLatitude</def>     = 34.760399604837
  <def link="Positive East Longitude">PositiveEastLongitude</def>      = 223.84999971299
  <def link="Positive West Longitude">PositiveWestLongitude</def>      = 136.15000028701
  <def link="Body Fixed Coordinate">BodyFixedCoordinate</def>        = (-2015.9595225544, -1936.6155808127, 1917.2574858384) &lt;km&gt;
  <def link="Local Radius">LocalRadius</def>                = 3389756.4767145 &lt;m&gt;
  <def link="Sample Resolution">SampleResolution</def>           = 536.05556350077 &lt;m/pixel&gt;
  <def link="Line Resolution">LineResolution</def>             = 536.05556350077 &lt;m/pixel&gt;
  <def link="Oblique Detector Resolution">ObliqueDetectorResolution</def>  = 151.26661909292 &lt;m/pixel&gt;
  <def link="Oblique Pixel Resolution">ObliquePixelResolution</def>     = 605.06647637166 &lt;m/pixel&gt;
  <def link="Oblique Line Resolution">ObliqueLineResolution</def>      = 605.06647637166 &lt;m/pixel&gt;
  <def link="Oblique Sample Resolution">ObliqueSampleResolution</def>    = 605.06647637166 &lt;m/pixel&gt;
  # Spacecraft Information
  SpacecraftPosition         = (-2025.6211429076, -2130.1417975758, 2009.318879871) &lt;KM&gt;
  <def link="Spacecraft Azimuth">SpacecraftAzimuth</def>          = 0.006855593033889 &lt;DEGREE&gt;
  <def link="Slant Distance">SlantDistance</def>              = 214.52515878961 &lt;KM&gt;
  <def link="Target Center Distance">TargetCenterDistance</def>       = 3560.6189705415 &lt;KM&gt;
  <def link="SubSpacecraft Latitude">SubSpacecraftLatitude</def>      = 34.354896748841 &lt;DEGREE&gt;
  <def link="SubSpacecraft Longitude">SubSpacecraftLongitude</def>     = 226.44072947174 &lt;DEGREE&gt;
  SpacecraftAltitude         = 170.83335389965 &lt;KM&gt;
  <def link="Off Nadir Angle">OffNadirAngle</def>              = 36.149255932304 &lt;DEGREE&gt;
  <def link="SubSpacecraft Ground Azimuth">SubSpacecraftGroundAzimuth</def> = 91.64525294858 &lt;DEGREE&gt;
  SpacecraftPosition         = (-2025.6211429076, -2130.1417975758, 2009.318879871) &lt;km&gt;
  <def link="Spacecraft Azimuth">SpacecraftAzimuth</def>          = 0.006855593033889
  <def link="Slant Distance">SlantDistance</def>              = 214.52515878961 &lt;km&gt;
  <def link="Target Center Distance">TargetCenterDistance</def>       = 3560.6189705415 &lt;km&gt;
  <def link="SubSpacecraft Latitude">SubSpacecraftLatitude</def>      = 34.354896748841
  <def link="SubSpacecraft Longitude">SubSpacecraftLongitude</def>     = 226.44072947174
  SpacecraftAltitude         = 170.83335389965 &lt;km&gt;
  <def link="Off Nadir Angle">OffNadirAngle</def>              = 36.149255932304
  <def link="SubSpacecraft Ground Azimuth">SubSpacecraftGroundAzimuth</def> = 91.64525294858

  # Sun Information
  SunPosition                = (-177337948.13839, 112957442.69098, -33704752.205292) &lt;KM&gt;
  <def link="Sun Azimuth">SubSolarAzimuth</def>            = 172.30460990873 &lt;DEGREE&gt;
  SunPosition                = (-177337948.13839, 112957442.69098, -33704752.205292) &lt;km&gt;
  <def link="Sun Azimuth">SubSolarAzimuth</def>            = 172.30460990873
  SolarDistance             = 1.4234246174889 &lt;AU&gt;
  <def link="SubSolar Latitude">SubSolarLatitude</def>           = -9.1071705738361 &lt;DEGREE&gt;
  <def link="SubSolar Longitude">SubSolarLongitude</def>          = 147.50443340123 &lt;DEGREE&gt;
  <def link="Subsolar Ground Azimuth">SubSolarGroundAzimuth</def>      = 254.69139701227 &lt;DEGREE&gt;
  <def link="SubSolar Latitude">SubSolarLatitude</def>           = -9.1071705738361
  <def link="SubSolar Longitude">SubSolarLongitude</def>          = 147.50443340123
  <def link="Subsolar Ground Azimuth">SubSolarGroundAzimuth</def>      = 254.69139701227

  # Illumination and Other
  <def link="Phase Angle">Phase</def>                      = 120.59515694473 &lt;DEGREE&gt;
  <def link="Incidence Angle">Incidence</def>                  = 84.106289446623 &lt;DEGREE&gt;
  <def link="Emission Angle">Emission</def>                   = 38.288719431206 &lt;DEGREE&gt;
  <def link="North Azimuth">NorthAzimuth</def>               = 261.46910874636 &lt;DEGREE&gt;
  <def link="Phase Angle">Phase</def>                      = 120.59515694473
  <def link="Incidence Angle">Incidence</def>                  = 84.106289446623
  <def link="Emission Angle">Emission</def>                   = 38.288719431206
  <def link="North Azimuth">NorthAzimuth</def>               = 261.46910874636

  # Time
  <def link="Ephemeris Time">EphemerisTime</def>              = -69382819.160519 &lt;seconds&gt;
  <def>UTC</def>                        = 1997-10-20T10:58:37.6570806
  LocalSolarTime             = 17.089704420784 &lt;hour&gt;
  <def link="Solar Longitude">SolarLongitude</def>             = 201.83159041209 &lt;DEGREE&gt;
  <def link="Solar Longitude">SolarLongitude</def>             = 201.83159041209
  Error                      = NULL
  
  # Look Direction Unit Vectors in Body Fixed, J2000, and Camera Coordinate Systems.
  LookDirectionBodyFixed     = (0.95457395414683, 0.074906840825054,
                                -0.28840515124058) &lt;DEGREE&gt;
  LookDirectionJ2000         = (0.5482662642052, -0.25280984110143,
                                -0.797177074292) &lt;DEGREE&gt;
  LookDirectionCamera        = (0.0040987946596217, -0.6021663586021,
                                0.79836011702128) &lt;DEGREE&gt;
End_Group
    </pre>
    
@@ -208,11 +205,11 @@ End_Group
    <change name="Ian Humphrey" date="2015-03-03">
      Updated documentation. References #1449.
    </change>
    <change name="Curtis Rose" date="2016-06-29">
      Added units to many of the outputs of the PVL. Fixes #3979.
    </change>
    <change name="Curtis Rose" date="2016-08-01">
      Added spacecraft look direction unit vectors in Body Fixed, J200, and Camera Coordinate Systems. Fixes #4180.
    <change name="Tyler Wilson" date="2016-08-17">      
      Checked in new test data, and added support for changes made to the CameraPointInfo
      and Camera classes that incorporate new estimates for Pixel/Line/Sample/Detetctor resolution
      and now allow a developer to control the order in which fields are output in both PVL and
      CSV format.  References #476, #4100.
    </change>
  </history>