Commit ae9455b5 authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Added SEMI_MAJOR_AXIS and ECCENTRICITY to socetframesettings and socetlinescankeywords.

parent 9a854dbc
Loading
Loading
Loading
Loading
+39 −18
Original line number Diff line number Diff line
@@ -419,6 +419,28 @@ void IsisMain() {
    toStrm << "INS-" << ikCode << "_LT_SURFACE_CORRECT = '" << ltSurfaceCorrect <<"'\n";
  }

  // 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 IsisMain


@@ -596,4 +618,3 @@ void getCamPosOPK(Spice &spice, QString spacecraftName, double et, Camera *cam,

  return;
}
+10 −7
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@
      Added support for OSIRIS-REx instrument and updated documentation to reflect the
      changes. Fixes #3898.
    </change>
    <change name="Jesse Mapel" date="2018-03-23">
      Added SEMI_MAJOR_AXIS and ECCENTRICITY to the output.
    </change>

</history>

+37 −15
Original line number Diff line number Diff line
@@ -833,6 +833,28 @@ 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
+4 −1
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@
      the pixel-location of the input image's center ephemeris time, and (4) compute spacecraft
      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.
    </change>
  </history>

  <groups>