Is your feature request related to a problem? Please describe.
On a number of occasions there are magic numbers used for each of the KeplerSTM functions.
For example, if (counter == 1000) ...
In this case, what is 1000?
Or, return -2;. What is -2?
By replacing these with names, code readability will improve for future maintainers.
Describe the solution you'd like
Replace 1000 with a function argument named convergence_limit or convergence_bound.
Replace the magic number returns with an enumeration:
Is your feature request related to a problem? Please describe. On a number of occasions there are magic numbers used for each of the KeplerSTM functions. For example,
if (counter == 1000) ...
In this case, what is 1000? Or,return -2;
. What is -2? By replacing these with names, code readability will improve for future maintainers.Describe the solution you'd like
1000
with a function argument namedconvergence_limit
orconvergence_bound
.This also brings into question, do we actually care where it fails to converge, or is that for debugging purposes only?