You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
}while(Math.abs(δτi)>1e-12);// using IEEE 754 δτi -> 0 after 2-3 iterations
// note relatively large convergence test as δτi toggles on ±1.12e-16 for eg 31 N 400000 5000000
The reason I ask is that I converted the code (UTM <--> Lat/Lon) to embedded C, which works fine apart from this loop. If I take out the loop then I get the correct answer anyways, it appears as though my loop condition is incorrect, and I don't understand enough about what it is doing to change it, I wrote as:
} while(fabs(delTaui) > 1e-12); // using IEEE 754 δτi -> 0 after 2-3 iterations
Where "delTaui" is of type double.
Would it be possible to explain to me the need for this loop? I'm not very mathematically minded but I appreciate things are done for a reason and me just running the loop once and getting the correct answer doesn't mean I always will... I guess it depends on the location?
Many thanks,
Ant
The text was updated successfully, but these errors were encountered:
More of a query than an issue. Does the do...while loop here serve much purpose?
geodesy/utm.js
Lines 135 to 142 in 761587c
The reason I ask is that I converted the code (UTM <--> Lat/Lon) to embedded C, which works fine apart from this loop. If I take out the loop then I get the correct answer anyways, it appears as though my loop condition is incorrect, and I don't understand enough about what it is doing to change it, I wrote as:
} while(fabs(delTaui) > 1e-12); // using IEEE 754 δτi -> 0 after 2-3 iterations
Where "delTaui" is of type double.
Would it be possible to explain to me the need for this loop? I'm not very mathematically minded but I appreciate things are done for a reason and me just running the loop once and getting the correct answer doesn't mean I always will... I guess it depends on the location?
Many thanks,
Ant
The text was updated successfully, but these errors were encountered: