Commit c94ea994 authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

Added Ra/Dec and Body Fixed Coordinates to phocube. References #2277

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6269 41f8697f-d340-4b68-9986-7bafba869bb8
parent 2bfb1eec
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
@@ -42,6 +42,11 @@ bool subSpacecraftGroundAzimuth;
bool subSolarGroundAzimuth;
bool morphology;
bool albedo;
bool ra;
bool declination;
bool bodyFixedX;
bool bodyFixedY;
bool bodyFixedZ;

void phocubeDN(Buffer &in, Buffer &out);
void phocube(Buffer &out);
@@ -122,6 +127,11 @@ void IsisMain() {
  morphology = false;
  albedo = false;
  northAzimuth = false;
  ra = false;
  declination = false;
  bodyFixedX = false;
  bodyFixedY = false;
  bodyFixedZ = false;
  if (!noCamera) {
    if ((phase = ui.GetBoolean("PHASE"))) nbands++;
    if ((emission = ui.GetBoolean("EMISSION"))) nbands++;
@@ -139,6 +149,11 @@ void IsisMain() {
    if ((morphology = ui.GetBoolean("MORPHOLOGY"))) nbands++; 
    if ((albedo = ui.GetBoolean("ALBEDO"))) nbands++; 
    if ((northAzimuth = ui.GetBoolean("NORTHAZIMUTH"))) nbands++; 
    if ((ra = ui.GetBoolean("RADEC"))) nbands++;
    if ((declination = ui.GetBoolean("RADEC"))) nbands++;
    if ((bodyFixedX = ui.GetBoolean("BODYFIXED"))) nbands++;
    if ((bodyFixedY = ui.GetBoolean("BODYFIXED"))) nbands++;
    if ((bodyFixedZ = ui.GetBoolean("BODYFIXED"))) nbands++;
  }
  if((dn = ui.GetBoolean("DN"))) nbands++;
  if((latitude = ui.GetBoolean("LATITUDE"))) nbands++;
@@ -186,6 +201,11 @@ void IsisMain() {
  if (subSolarGroundAzimuth) name += "Sub Solar Ground Azimuth";
  if (morphology) name += "Morphology";
  if (albedo) name += "Albedo";
  if (ra) name += "Right Ascension";
  if (declination) name += "Declination";
  if (bodyFixedX) name += "Body Fixed X";
  if (bodyFixedY) name += "Body Fixed Y";
  if (bodyFixedZ) name += "Body Fixed Z";


  // Create the output cube.  Note we add the input cube to expedite propagation
@@ -391,6 +411,35 @@ void phocube(Buffer &out) {
          index += 64 * 64;
        }
        
        if (ra) {
          out[index] = cam->RightAscension();
          index += 64 * 64;
        }
        
        if (declination) {
          out[index] = cam->Declination();
          index += 64 * 64;
        }
        
        
        if (!noCamera) {
          double pB[3];
          cam->Coordinate(pB);
          if (bodyFixedX) {
          out[index] = pB[0];
          index += 64 * 64;
          }
        
          if (bodyFixedY) {
            out[index] = pB[1];
            index += 64 * 64;
          }
          if (bodyFixedZ) {
            out[index] = pB[2];
            index += 64 * 64;
          }
        }
        
      }
      // Trim outerspace
      else {
+32 −0
Original line number Diff line number Diff line
@@ -100,6 +100,8 @@
     <li>SUBSOLARGROUNDAZIMUTH</li>
     <li>MORPHOLOGY</li>
     <li>ALBEDO</li>
     <li>RADEC</li>
     <li>BODYFIXED</li>
     </ul>
	The following options are available for Level2 images:
     <ul>
@@ -283,6 +285,10 @@
    <change name="Makayla Shepherd" date="2015-02-06">
      Updated documentation. Fixes #1001.
    </change>
    <change name="Makayla Shepherd" date="2015-07-02">
      Added Ra/Dec and Body Fixed Coordinates options to help create new camera models and help 
      with mission team operations. References #2277."
    </change>
  </history>

  <category>
@@ -371,6 +377,8 @@
              <item>MORPHOLOGY</item>
              <item>ALBEDO</item>
              <item>NORTHAZIMUTH</item>
              <item>RADEC</item>
              <item>BODYFIXED</item>
            </exclusions>
          </option>
        </list>
@@ -657,6 +665,30 @@
          </p>
        </description>
      </parameter>
      <parameter name="RADEC">
         <type>boolean</type>
         <default><item>FALSE</item></default>
         <brief>Create bands for Right Ascention and Declination</brief>
         <description>
	   If this parameter is true, the <def>Right Ascension</def>, and the 
	   <def>Declination</def> will be calculated for every pixel and each will be placed into
	   their respective bands in the output cube. The output cube labels will contain 
	   "Right Ascension" and "Declination" in the BandBin group, in the band sequence of the 
	   output file. Right Ascension and Declination are in degrees.
	 </description>
       </parameter>
      <parameter name="BODYFIXED">
         <type>boolean</type>
         <default><item>FALSE</item></default>
         <brief>Create bands for the X, Y, and Z Body Fixed Coordinates</brief>
         <description>
	   If this parameter is true, the <def>Body Fixed Coordinates</def> will be calculated for
	   every pixel and the values for X, Y, and Z will each be placed into their own bands in 
	   the output cube. The output cube labels will contain "Body Fixed X", "Body Fixed Y", 
	   and "Body Fixed Z" in the BandBin group, in the band sequence of the output file. 
	   Body Fixed Coordinates are in kilometers.
	 </description>
       </parameter>
    </group>
  </groups>
  
+3 −1
Original line number Diff line number Diff line
@@ -27,4 +27,6 @@ commands:
	  subspacecraftgroundazimuth=true \
	  subsolargroundazimuth=true \
	  morphology=true \
	  albedo=true > /dev/null;  
	  albedo=true \
	  radec=true \
	  bodyfixed=true> /dev/null;