Commit 535eb783 authored by Jeannie Backer's avatar Jeannie Backer
Browse files

PROG: Fixed bug in AmicaCamera model. Use SCLK SpacecraftClockStartCount...

PROG: Fixed bug in AmicaCamera model. Use SCLK SpacecraftClockStartCount rather than UTC StartTime to determine image observation start time. References #2180

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6105 41f8697f-d340-4b68-9986-7bafba869bb8
parent 7c0820b3
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -56,13 +56,11 @@ namespace Isis {
    PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse);

    // set variables startTime and exposureDuration
    double time = iTime((QString)inst["StartTime"]).Et();
    QString stime = inst["SpacecraftClockStartCount"];
    iTime etStart = getClockTime(stime);

    // Exposure duration keyword is in seconds
    double exposureDuration = ((double) inst["ExposureDuration"]);
    pair<iTime, iTime> shuttertimes = ShutterOpenCloseTimes(time, exposureDuration);

    iTime centerTime = shuttertimes.first.Et() + exposureDuration / 2.0;
    iTime centerTime  = etStart + (exposureDuration / 2.0);

    // Setup focal plane map
    CameraFocalPlaneMap *focalMap = new CameraFocalPlaneMap(this, naifIkCode());
+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ namespace Isis {
   *   @history 2013-11-27 Kris Becker - Original version
   *   @history 2015-02-26 Kris Becker - Implement starting detector specs; add
   *                         summing and AlphaCube support.
   *   @history 2015-03-11 Kris Becker - Fixed timing error - was using the
   *                         UTC StartTime rather than the
   *                         SpacecraftClockStartCount. References #2180.
   */
  class AmicaCamera : public FramingCamera {
    public:
+2 −2
Original line number Diff line number Diff line
@@ -42,8 +42,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 = 7.1947879130674721;
    double knownLon = 38.6322075033570158;
    double knownLat = 7.1916683215196819;
    double knownLon = 38.6275886424948496;

    Cube c("$hayabusa/testData/st_2530292409_v.cub", "r");
    AmicaCamera *cam = (AmicaCamera *) CameraFactory::Create(c);