Skip to content

Commit

Permalink
DemShape: Let tolerance bet 1/1000 pixel, as that is more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-alexandrov committed Apr 8, 2024
1 parent d5e1ffc commit 43ae136
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion isis/src/base/objs/DemShape/DemShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ namespace Isis {
// Secant method with at most 15 iterations. This method converges fast.
// If it does not converge in this many iterations, it never will.
bool converged = false;
double tol = resolution()/100; // 1/100 of a pixel
// Use 1/1000 of a pixel as tolerance. Otherwise the results may be not
// accurate enough for ground-level sensors with oblique views.
double tol = resolution()/1000;
for (int i = 1; i <= 15; i++) {

if (std::abs(f1) * 1000.0 < tol) {
Expand Down

0 comments on commit 43ae136

Please sign in to comment.