Unverified Commit d7a2024c authored by Kaitlyn Lee's avatar Kaitlyn Lee Committed by GitHub
Browse files

Added time bias to et (#4380)

parent 74dfafaa
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -48,6 +48,7 @@ release.
- Fixed issue where serial numbers for Kaguya TC and MI image could not be generated. [4235](https://github.com/USGS-Astrogeology/ISIS3/issues/4235)
- Fixed issue where serial numbers for Kaguya TC and MI image could not be generated. [4235](https://github.com/USGS-Astrogeology/ISIS3/issues/4235)
- Fixed hardcoded file naming in the hijitter app dealing with output from pipeline. [#4372](https://github.com/USGS-Astrogeology/ISIS3/pull/4372)
- Fixed hardcoded file naming in the hijitter app dealing with output from pipeline. [#4372](https://github.com/USGS-Astrogeology/ISIS3/pull/4372)
- Fixed "About Qview" to point to website documentation. [4333](https://github.com/USGS-Astrogeology/ISIS3/issues/4333)
- Fixed "About Qview" to point to website documentation. [4333](https://github.com/USGS-Astrogeology/ISIS3/issues/4333)
- Fixed bug where the time bias was not being added to the ephemeris times in ckwriter. [4129](https://github.com/USGS-Astrogeology/ISIS3/issues/4129)


### Changed
### Changed


+3 −3
Original line number Original line Diff line number Diff line
@@ -216,7 +216,7 @@ void CkSpiceSegment::import(Cube &cube, const QString &tblname) {


    _quats = getQuaternions(spice);
    _quats = getQuaternions(spice);
    _avvs = getAngularVelocities(spice);
    _avvs = getAngularVelocities(spice);
    _times = getTimes(spice);
    _times = getTimes(spice, camera->instrumentRotation()->TimeBias());


    _startTime = _times[0];
    _startTime = _times[0];
    _endTime = _times[size(_times)-1];
    _endTime = _times[size(_times)-1];
@@ -303,13 +303,13 @@ CkSpiceSegment::SMatrix CkSpiceSegment::getAngularVelocities(const SMatrix &spic
}
}




CkSpiceSegment::SVector CkSpiceSegment::getTimes(const SMatrix &spice) const {
CkSpiceSegment::SVector CkSpiceSegment::getTimes(const SMatrix &spice, const double timeBias) const {
  int nrecs = size(spice);
  int nrecs = size(spice);
  SVector etdp(nrecs);
  SVector etdp(nrecs);
  int tcol = spice.dim2() - 1;
  int tcol = spice.dim2() - 1;


  for ( int i = 0 ; i < nrecs ; i++ ) {
  for ( int i = 0 ; i < nrecs ; i++ ) {
    etdp[i] = spice[i][tcol];
    etdp[i] = spice[i][tcol] + timeBias;
  }
  }
  return (etdp);
  return (etdp);
}
}
+3 −1
Original line number Original line Diff line number Diff line
@@ -86,6 +86,8 @@ class PvlObject;
 *
 *
 * @history 2019-12-05 Adam Paquette - Changed how kernels are loaded so CkSpiceSegment
 * @history 2019-12-05 Adam Paquette - Changed how kernels are loaded so CkSpiceSegment
 *                          no longer needs to use the Spice class.
 *                          no longer needs to use the Spice class.
 *                          
 * @history 2021-03-23 Kaitlyn Lee - Added time bias to ET times in getTimes(). Fixes #4129
 */
 */
class CkSpiceSegment {
class CkSpiceSegment {
  public:
  public:
@@ -172,7 +174,7 @@ class CkSpiceSegment {
    SMatrix load(Table &cache);
    SMatrix load(Table &cache);
    SMatrix getQuaternions(const SMatrix &spice) const;
    SMatrix getQuaternions(const SMatrix &spice) const;
    SMatrix getAngularVelocities(const SMatrix &spice) const;
    SMatrix getAngularVelocities(const SMatrix &spice) const;
    SVector getTimes(const SMatrix &spice) const;
    SVector getTimes(const SMatrix &spice, const double timeBias) const;


    bool getTimeDependentFrameIds(Table &table, int &toId, int &fromId) const;
    bool getTimeDependentFrameIds(Table &table, int &toId, int &fromId) const;
    bool getFrameChains(Table &table, const int &leftBase,
    bool getFrameChains(Table &table, const int &leftBase,
+9 −0
Original line number Original line Diff line number Diff line
@@ -307,6 +307,15 @@ namespace Isis {
    return p_et;
    return p_et;
  }
  }


  /**
   * Accessor method to get current time bias.
   *
   * @return @b double The current time bias.
   */
  double SpiceRotation::TimeBias() const {
    return p_timeBias;
  }



  /**
  /**
   * Checks if the cache is empty.
   * Checks if the cache is empty.
+2 −0
Original line number Original line Diff line number Diff line
@@ -200,6 +200,7 @@ namespace Isis {
   *                           The current example is the comet 67P/CHURYUMOV-GERASIMENKO
   *                           The current example is the comet 67P/CHURYUMOV-GERASIMENKO
   *                           imaged by Rosetta. Some future comet/astroid missions are expected
   *                           imaged by Rosetta. Some future comet/astroid missions are expected
   *                           to use a CK defined body fixed reference frame. Fixes #5408.
   *                           to use a CK defined body fixed reference frame. Fixes #5408.
   * @history 2021-03-23 Kaitlyn Lee - Added getter function for time bias. Fixes #4129.
   *
   *
   *  @todo Downsize using Hermite cubic spline and allow Nadir tables to be downsized again.
   *  @todo Downsize using Hermite cubic spline and allow Nadir tables to be downsized again.
   *  @todo Consider making this a base class with child classes based on frame type or
   *  @todo Consider making this a base class with child classes based on frame type or
@@ -223,6 +224,7 @@ namespace Isis {
      int Frame();
      int Frame();


      void SetTimeBias(double timeBias);
      void SetTimeBias(double timeBias);
      double TimeBias() const;


      /**
      /**
       * The rotation can come from one of 3 places for an Isis cube.  The class
       * The rotation can come from one of 3 places for an Isis cube.  The class