Skip to content

Prevent overshooting cosine in CachingDms

Toni Schriber requested to merge escriban/kstars:haversine into master

Sometimes the target field of CCD-module was not update, because the distance to the nearest star was NAN. The reason was the possible, random overshooting of the cosine in the CachingDms-variables in SkyPoint::angularDistanceTo(), which leads to a faulty, negative haversine. A simple std::fmin() prevents any cosine larger than 1.

Merge request reports

Loading