Commit 1341bdab authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Moved socet line scan ellipsoid values to after SENSOR_MODE. Added redmine ticket.

parent d2a983d9
Loading
Loading
Loading
Loading
+21 −22
Original line number Diff line number Diff line
@@ -694,6 +694,27 @@ void IsisMain() {
  toStrm << "SENSOR_TYPE USGSAstroLineScanner" << endl;
  toStrm << "SENSOR_MODE UNKNOWN" << endl;

  Distance targetRadii[3];
  if (cube.label()->hasGroup("Mapping")) {
    PvlGroup &mappingGroup = cube.label()->findGroup("Mapping");
    targetRadii[0].setMeters(toDouble(mappingGroup["EquatorialRadius"][0]));
    targetRadii[2].setMeters(toDouble(mappingGroup["PolarRadius"][0]));
  }
  else {
    try {
      cam->radii(targetRadii);
    }
    catch (IException &e) {
      QString msg = "Failed to get target body radii from cube.";
      throw IException(e, IException::Programmer, msg, _FILEINFO_);
    }
  }
  double eccentricity = 1.0 - (targetRadii[2].meters() * targetRadii[2].meters())
                            / (targetRadii[0].meters() * targetRadii[0].meters());
  eccentricity = sqrt(eccentricity);
  toStrm << "SEMI_MAJOR_AXIS  " << targetRadii[0].meters() <<"\n";
  toStrm << "ECCENTRICITY     " << eccentricity <<"\n";

  toStrm << "FOCAL " << focal << endl;

  toStrm << "ATMCO";
@@ -833,28 +854,6 @@ void IsisMain() {
  toStrm << "STARTING_EPHEMERIS_TIME " << setprecision(25) << etStart << endl;
  toStrm << "CENTER_EPHEMERIS_TIME " << etCenter << endl;

  // Add the target radii
  Distance targetRadii[3];
  if (cube.label()->hasGroup("Mapping")) {
    PvlGroup &mappingGroup = cube.label()->findGroup("Mapping");
    targetRadii[0].setMeters(toDouble(mappingGroup["EquatorialRadius"][0]));
    targetRadii[2].setMeters(toDouble(mappingGroup["PolarRadius"][0]));
  }
  else {
    try {
      cam->radii(targetRadii);
    }
    catch (IException &e) {
      QString msg = "Failed to get target body radii from cube.";
      throw IException(e, IException::Programmer, msg, _FILEINFO_);
    }
  }
  double eccentricity = 1.0 - (targetRadii[2].meters() * targetRadii[2].meters())
                            / (targetRadii[0].meters() * targetRadii[0].meters());
  eccentricity = sqrt(eccentricity);
  toStrm << "SEMI_MAJOR_AXIS  " << targetRadii[0].meters() <<"\n";
  toStrm << "ECCENTRICITY     " << eccentricity <<"\n";

} // end main

//TO DO: UNCOMMENT THESE LINES ONCE HRSC IS WORKING IN SS
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@
      velocity values instead of using SPICE velocity data blobs.  Fixes #1672.
    </change>
    <change name="Jesse Mapel" date="2018-03-23">
      Added SEMI_MAJOR_AXIS and ECCENTRICITY to the output.
      Added SEMI_MAJOR_AXIS and ECCENTRICITY to the output. Fixes #5362.
    </change>
  </history>