Commit 936064ff authored by acpaquette's avatar acpaquette
Browse files

Removed functions handled by parent, and update photogrametry functions

parent f36801d0
Loading
Loading
Loading
Loading
+0 −61
Original line number Diff line number Diff line
@@ -290,41 +290,9 @@ class UsgsAstroProjectedLsSensorModel : public UsgsAstroLsSensorModel {
  //  will be returned.
  //<

  virtual csm::EcefVector getIlluminationDirection(
      const csm::EcefCoord& groundPt) const;
  //> This method returns a vector defining the direction of
  //  illumination at the given groundPt (x,y,z in ECEF meters).
  //  Note that there are two opposite directions possible.  Both are
  //  valid, so either can be returned; the calling application can convert
  //  to the other as necessary.
  //<

  //---
  // Time and Trajectory
  //---
  virtual double getImageTime(const csm::ImageCoord& imagePt) const;
  //> This method returns the time in seconds at which the pixel at the
  //  given imagePt (line, sample in full image space pixels) was captured
  //
  //  The time provided is relative to the reference date and time given
  //  by the Model::getReferenceDateAndTime method.
  //<

  virtual csm::EcefCoord getSensorPosition(
      const csm::ImageCoord& imagePt) const;
  //> This method returns the position of the physical sensor
  // (x,y,z in ECEF meters) when the pixel at the given imagePt
  // (line, sample in full image space pixels) was captured.
  //
  // A csm::Error will be thrown if the sensor position is not available.
  //<

  virtual csm::EcefVector getSensorVelocity(
      const csm::ImageCoord &imagePt) const;
  //> This method returns the velocity of the physical sensor
  // (x,y,z in ECEF meters per second) when the pixel at the given imagePt
  // (line, sample in full image space pixels) was captured.
  //<

  virtual const csm::CorrelationModel& getCorrelationModel() const;
  //> This method returns a reference to a CorrelationModel.
@@ -655,18 +623,6 @@ class UsgsAstroProjectedLsSensorModel : public UsgsAstroLsSensorModel {
  //  current state.
  //<

  virtual csm::Ellipsoid getEllipsoid() const;
  //> This method returns the planetary ellipsoid.
  //<

  virtual void setEllipsoid(const csm::Ellipsoid& ellipsoid);
  //> This method sets the planetary ellipsoid.
  //<

  void calculateAttitudeCorrection(const double& time,
                                   const std::vector<double>& adj,
                                   double attCorr[9]) const;

 private:

  // Some state data values not found in the support data require a
@@ -680,8 +636,6 @@ class UsgsAstroProjectedLsSensorModel : public UsgsAstroLsSensorModel {
  void reconstructSensorDistortion(double& focalX, double& focalY,
                                   const double& desiredPrecision) const;

  void getQuaternions(const double& time, double quaternion[4]) const;

  // Computes the LOS correction due to light aberration
  void lightAberrationCorr(const double& vx, const double& vy, const double& vz,
                           const double& xl, const double& yl, const double& zl,
@@ -704,21 +658,6 @@ class UsgsAstroProjectedLsSensorModel : public UsgsAstroLsSensorModel {
      const std::vector<double>& adj)      // Parameter Adjustments for partials
      const;

  // The projective approximation for the sensor model is used as the starting point
  // for iterative rigorous calculations.
  void computeProjectiveApproximation(const csm::EcefCoord& gp,
                                      csm::ImageCoord& ip) const;

  // Create the projective approximation to be used at each ground point
  void createProjectiveApproximation();

  // A function whose value will be 0 when the line a given ground
  // point projects into is found. The obtained line will be
  // approxPt.line + t.
  double calcDetectorLineErr(double t, csm::ImageCoord const& approxPt,
                             const csm::EcefCoord& groundPt,
                             const std::vector<double>& adj) const;

  csm::NoCorrelationModel _no_corr_model;  // A way to report no correlation
                                           // between images is supported
  std::vector<double> _no_adjustment;  // A vector of zeros indicating no internal adjustment
+12 −12
Original line number Diff line number Diff line
@@ -702,7 +702,7 @@ csm::ImageCoord UsgsAstroLsSensorModel::groundToImage(
      ground_pt.x, ground_pt.y, ground_pt.z, desired_precision);

  // The public interface invokes the private interface with no adjustments.
  csm::ImageCoord imagePt = groundToImage(
  csm::ImageCoord imagePt = UsgsAstroLsSensorModel::groundToImage(
      ground_pt, _no_adjustment, desired_precision, achieved_precision, warnings);
  MESSAGE_LOG(
      spdlog::level::info,
@@ -837,7 +837,7 @@ csm::ImageCoordCovar UsgsAstroLsSensorModel::groundToImage(
  gp.z = groundPt.z;

  csm::ImageCoord ip =
      groundToImage(gp, desired_precision, achieved_precision, warnings);
      UsgsAstroLsSensorModel::groundToImage(gp, desired_precision, achieved_precision, warnings);
  csm::ImageCoordCovar result(ip.line, ip.samp);

  // Compute partials ls wrt XYZ
@@ -968,20 +968,20 @@ csm::EcefCoordCovar UsgsAstroLsSensorModel::imageToGround(
  const double DELTA_GROUND = m_gsd;
  csm::ImageCoord ip(image_pt.line, image_pt.samp);

  csm::EcefCoord gp = imageToGround(ip, height, desired_precision,
  csm::EcefCoord gp = UsgsAstroLsSensorModel::imageToGround(ip, height, desired_precision,
                                                            achieved_precision, warnings);

  // Compute numerical partials xyz wrt to lsh
  ip.line = image_pt.line + DELTA_IMAGE;
  ip.samp = image_pt.samp;
  csm::EcefCoord gpl = imageToGround(ip, height, desired_precision);
  csm::EcefCoord gpl = UsgsAstroLsSensorModel::imageToGround(ip, height, desired_precision);
  double xpl = (gpl.x - gp.x) / DELTA_IMAGE;
  double ypl = (gpl.y - gp.y) / DELTA_IMAGE;
  double zpl = (gpl.z - gp.z) / DELTA_IMAGE;

  ip.line = image_pt.line;
  ip.samp = image_pt.samp + DELTA_IMAGE;
  csm::EcefCoord gps = imageToGround(ip, height, desired_precision);
  csm::EcefCoord gps = UsgsAstroLsSensorModel::imageToGround(ip, height, desired_precision);
  double xps = (gps.x - gp.x) / DELTA_IMAGE;
  double yps = (gps.y - gp.y) / DELTA_IMAGE;
  double zps = (gps.z - gp.z) / DELTA_IMAGE;
@@ -989,7 +989,7 @@ csm::EcefCoordCovar UsgsAstroLsSensorModel::imageToGround(
  ip.line = image_pt.line;
  ip.samp = image_pt.samp;
  csm::EcefCoord gph =
      imageToGround(ip, height + DELTA_GROUND, desired_precision);
      UsgsAstroLsSensorModel::imageToGround(ip, height + DELTA_GROUND, desired_precision);
  double xph = (gph.x - gp.x) / DELTA_GROUND;
  double yph = (gph.y - gp.y) / DELTA_GROUND;
  double zph = (gph.z - gp.z) / DELTA_GROUND;
@@ -1064,7 +1064,7 @@ csm::EcefLocus UsgsAstroLsSensorModel::imageToProximateImagingLocus(

  // Ground point on object ray with the same elevation
  csm::EcefCoord gp1 =
      imageToGround(image_pt, height, desired_precision, achieved_precision);
      UsgsAstroLsSensorModel::imageToGround(image_pt, height, desired_precision, achieved_precision);

  // Vector between 2 ground points above
  double dx1 = x - gp1.x;
@@ -1072,7 +1072,7 @@ csm::EcefLocus UsgsAstroLsSensorModel::imageToProximateImagingLocus(
  double dz1 = z - gp1.z;

  // Unit vector along object ray
  csm::EcefCoord gp2 = imageToGround(image_pt, height - DELTA_GROUND,
  csm::EcefCoord gp2 = UsgsAstroLsSensorModel::imageToGround(image_pt, height - DELTA_GROUND,
                                                             desired_precision, achieved_precision);
  double dx2 = gp2.x - gp1.x;
  double dy2 = gp2.y - gp1.y;
@@ -1093,7 +1093,7 @@ csm::EcefLocus UsgsAstroLsSensorModel::imageToProximateImagingLocus(

  double hLocus = computeEllipsoidElevation(gp2.x, gp2.y, gp2.z, m_majorAxis,
                                            m_minorAxis, desired_precision);
  locus.point = imageToGround(image_pt, hLocus, desired_precision,
  locus.point = UsgsAstroLsSensorModel::imageToGround(image_pt, hLocus, desired_precision,
                                                      achieved_precision, warnings);

  locus.direction.x = dx2;