rhannequin / astronoby

Ruby library based on astronomy and astrometry books
https://dev.to/rhannequin/series/17782
MIT License
59 stars 2 forks source link

Fix `ObservationEvents` infinite loop #110

Closed rhannequin closed 1 week ago

rhannequin commented 1 week ago

In some cases new iterations of rise-transit-set calculations are not more precise than the previous ones. Quite the opposite, it is apparently possible to loop indefinitely over some values without ever crossing the targeted precision.

This introduces a limit of 5 iterations. Passed this limit, it is admitted that the program in its current form will not achieve a better precision.

Fixes #109