Skip to content

Commit

Permalink
Changed SRC camera and serial number to use start time instead of sta… (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
scsides authored May 13, 2022
1 parent 4c88fa7 commit bea365e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion isis/appdata/serialnumbers/MexSrcSerialNumber.trn
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ End_Group

Group = Keyword2
Auto
InputKey = SpacecraftClockStartCount
InputKey = StartTime
InputGroup = "IsisCube,Instrument"
InputPosition = (IsisCube, Instrument)
OutputName = Keyword2
Expand Down
2 changes: 1 addition & 1 deletion isis/src/mex/objs/MexHrscSrcCamera/Camera.plugin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Group = MarsExpress/Src
Version = 1
Version = 2
Library = MexHrscSrcCamera
Routine = MexHrscSrcCameraPlugin
EndGroup
Expand Down
10 changes: 5 additions & 5 deletions isis/src/mex/objs/MexHrscSrcCamera/MexHrscSrcCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -104,6 +103,7 @@ namespace Isis {
}
}


/**
* This is the function that is called in order to instantiate a MexHrscSrcCamera
* object.
Expand Down
12 changes: 6 additions & 6 deletions isis/src/mex/objs/MexHrscSrcCamera/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit bea365e

Please sign in to comment.