Commit 3714cb61 authored by jlaura's avatar jlaura Committed by Jesse Mapel
Browse files

Swaps from error to warning on out of bounds. (#114)

* Swaps from error to warning on out of bounds.

* Fixes the correct error/warning
parent 39a128bc
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -302,15 +302,14 @@ csm::ImageCoord UsgsAstroLsSensorModel::groundToImage(
   // Check that the pixel is actually in the image
   if ((calculatedPixel.samp < 0) ||
       (calculatedPixel.samp > _data.m_TotalSamples)) {
      throw csm::Error(
         csm::Error::ALGORITHM,
         "Ground point is not viewed by the image.",
      throw csm::Warning(
         csm::Warning::IMAGE_COORD_OUT_OF_BOUNDS,
         "The image coordinate is out of bounds of the image size.",
         "UsgsAstroLsSensorModel::groundToImage");
   }

   // If the final correction is greater than 10 meters,
   // the solution is not valid enough to report even with a warning
   printf("%f\n", len);
   if (len > 100.0) {
      throw csm::Error(
         csm::Error::ALGORITHM,