diff --git a/CHANGELOG.md b/CHANGELOG.md index ce6c03c170c06f740f3ef914b508dbfda2323e5a..b68300e218601eabd8b4aae9ae60f9fcece5f045 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ release. override the timestamp style naming convention of the output cube with their own name; if not specified retains existing behavior [#5125](https://github.com/USGS-Astrogeology/ISIS3/issues/5162) - Added new parameters ONERROR, ERRORLOG, and ERRORLIST to mosrange to provide better control over error behavior and provide diagnostics when problems are encountered processing the input file list.[#3606](https://github.com/DOI-USGS/ISIS3/issues/3606) +- Added ability to delegate calculation of nadir pointing to ALE [#5117](https://github.com/USGS-Astrogeology/ISIS3/issues/5117) ### Deprecated diff --git a/isis/src/base/apps/spiceinit/spiceinit.cpp b/isis/src/base/apps/spiceinit/spiceinit.cpp index 8c0e4dfac5a1daf03825e97661e47fe3624faced..8ff35b9b63048841c5a1f83a62eb4528dd357f3b 100644 --- a/isis/src/base/apps/spiceinit/spiceinit.cpp +++ b/isis/src/base/apps/spiceinit/spiceinit.cpp @@ -255,7 +255,6 @@ namespace Isis { kernelSuccess = tryKernels(icube, p, ui, log, lk, pck, targetSpk, realCkKernel, fk, ik, sclk, spk, iak, dem, exk); } - if (!kernelSuccess) { throw IException(IException::Unknown, "Unable to initialize camera model", diff --git a/isis/src/base/objs/Spice/Spice.cpp b/isis/src/base/objs/Spice/Spice.cpp index 678b19d49e73a85d018f07f90c30b7c754ec3c12..d8c01e43559bded403acd6d41893b628ac24e6f7 100644 --- a/isis/src/base/objs/Spice/Spice.cpp +++ b/isis/src/base/objs/Spice/Spice.cpp @@ -194,19 +194,16 @@ namespace Isis { // ephemerides. (2008-02-27 (KJB)) if (m_usingNaif) { try { - // At this time ALE does not compute pointing for the nadir option in spiceinit - // If NADIR is turned on fail here so ISIS can create nadir pointing - if (kernels["InstrumentPointing"][0].toUpper() == "NADIR") { - QString msg = "Falling back to ISIS generation of nadir pointing"; - throw IException(IException::Programmer, msg, _FILEINFO_); - } - if (isd == NULL){ // try using ALE std::ostringstream kernel_pvl; kernel_pvl << kernels; json props; + if (kernels["InstrumentPointing"][0].toUpper() == "NADIR") { + props["nadir"] = true; + } + props["kernels"] = kernel_pvl.str(); isd = ale::load(lab.fileName().toStdString(), props.dump(), "ale", false, false, true); @@ -440,7 +437,7 @@ namespace Isis { // 2009-03-18 Tracie Sucharski - Removed test for old keywords, any files // with the old keywords should be re-run through spiceinit. - if (kernels["InstrumentPointing"][0].toUpper() == "NADIR") { + if (kernels["InstrumentPointing"][0].toUpper() == "NADIR" && !isUsingAle()) { if (m_instrumentRotation) { delete m_instrumentRotation; m_instrumentRotation = NULL;