Unverified Commit bea365e4 authored by Stuart Sides's avatar Stuart Sides Committed by GitHub
Browse files

Changed SRC camera and serial number to use start time instead of sta… (#4910)

* Changed SRC camera and serial number to use start time instead of start clock count

* Change log entry

* Tick the camera version to 2

* Update unittest

* Update MexHrscSrcCamera.cpp

* Update CHANGELOG.md
parent 4c88fa71
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ release.
-->

## [Unreleased]
- Added check to determine if poles were a valid projection point in ImagePolygon when generating footprint for a map projected image. [#4390](https://github.com/USGS-Astrogeology/ISIS3/issues/4390)
- Updated the LRO photometry application Lronacpho, to use by default the current 2019 photometric model (LROC_Empirical). The model's coefficients are found in the PVL file that exists in the LRO data/mission/calibration directory. If the old parameter file is provided, the old algorithm(2014) will be used. This functionality is desired for calculation comparisons. Issue: [#4512](https://github.com/USGS-Astrogeology/ISIS3/issues/4512), PR: [#4519](https://github.com/USGS-Astrogeology/ISIS3/pull/4519)
- Added a new application, framestitch, for stitching even and odd push frame images back together prior to processing in other applications. [4924](https://github.com/USGS-Astrogeology/ISIS3/issues/4924)

@@ -47,6 +48,7 @@ release.

### Fixed
- Added check to determine if poles were a valid projection point in ImagePolygon when generating footprint for a map projected image. [#4390](https://github.com/USGS-Astrogeology/ISIS3/issues/4390)
- Fixed the Mars Express HRSC SRC camera and serial number to use the StartTime instead of the StartClockCount  [#4803](https://github.com/USGS-Astrogeology/ISIS3/issues/4803)


## [7.0.0] - 2022-02-11
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ End_Group

Group = Keyword2
  Auto
  InputKey       = SpacecraftClockStartCount
  InputKey       = StartTime
  InputGroup     = "IsisCube,Instrument"
  InputPosition  = (IsisCube, Instrument)
  OutputName     = Keyword2
+1 −1
Original line number Diff line number Diff line
Group = MarsExpress/Src
  Version = 1
  Version = 2
  Library = MexHrscSrcCamera
  Routine = MexHrscSrcCameraPlugin
EndGroup
+5 −5
Original line number Diff line number Diff line
@@ -75,18 +75,17 @@ namespace Isis {
    // The observation start time and clock count for SRC are based on the center of the exposure.
    Pvl &lab = *cube.label();
    PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse);
    QString clockCount = inst["SpacecraftClockStartCount"];
    double et = getClockTime(clockCount).Et();
    double exposureDuration = (double)inst["ExposureDuration"] / 1000.0;

    pair<iTime, iTime> startStop = ShutterOpenCloseTimes(et, exposureDuration);
    setTime(et);
    iTime startTime;
    startTime.setUtc((QString)inst["StartTime"]);   
    setTime(startTime);

    // Internalize all the NAIF SPICE information into memory.
    LoadCache();
    NaifStatus::CheckErrors();
  }


  /**
   * Returns the shutter open and close times.
   *
@@ -104,6 +103,7 @@ namespace Isis {
  }
}


/**
 * This is the function that is called in order to instantiate a MexHrscSrcCamera
 * object.
+6 −6
Original line number Diff line number Diff line
@@ -35,8 +35,8 @@ int main(void) {
    // These should be lat/lon at center of image. To obtain these numbers for a new cube/camera,
    // set both the known lat and known lon to zero and copy the unit test output "Latitude off by: "
    // and "Longitude off by: " values directly into these variables.
    double knownLat = -9.3335948038633116;
    double knownLon = 90.4734324741402531;
    double knownLat = -6.1835212703283418;
    double knownLon = 90.4775137054191845;

    Cube c("$ISISTESTDATA/isis/src/mex/unitTestData/H0010_0023_SR2.cub", "r");
    Camera *cam = CameraFactory::Create(c);
@@ -60,16 +60,16 @@ int main(void) {

    // Test all four corners to make sure the conversions are right
    cout << "For upper left corner ..." << endl;
    TestLineSamp(cam, 1.0, 1.0);
    TestLineSamp(cam, 10.0, 10.0);

    cout << "For upper right corner ..." << endl;
    TestLineSamp(cam, cam->Samples(), 1.0);
    TestLineSamp(cam, cam->Samples()-10.0, 10.0);

    cout << "For lower left corner ..." << endl;
    TestLineSamp(cam, 1.0, cam->Lines());
    TestLineSamp(cam, 10.0, cam->Lines()-10.0);

    cout << "For lower right corner ..." << endl;
    TestLineSamp(cam, cam->Samples(), cam->Lines());
    TestLineSamp(cam, cam->Samples()-10.0, cam->Lines()-10.0);

    double samp = cam->Samples() / 2.0;
    double line = cam->Lines() / 2.0;