Bug fix for false meridian flip. This happens, since the calculation of the current HA has a weakness not ensuring that -12 < HA <= 12. For targets with small RA value like M31 a summer night with an LST of 19:00 leads to an uncorrected HA value of approx. 18:45 - which is equivalent to a corrected value of -5:15.
Details
Details
- Reviewers
TallFurryMan mutlaqja
Set the current time to an August night and slew to M31. Without this fix, the Mount tab shows "Meridian flip planned" preventing preview capturing in the Capture module.
Diff Detail
Diff Detail
- Repository
- R321 KStars
- Branch
- bug_HA_calculation
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 14779 Build 14797: arc lint + arc unit
Comment Actions
I prefer if we start using the functions in indicom.
rangeHA
range24
range360
rangeDec
They're very useful in KStars.
So just add #include <indicom.h>
and then
deltaHA = rangeHA(deltaHA);
Comment Actions
Jasem, many thanks for the corrections, I wasn't aware of rangeHA. A small hint: is there a reason why you left the old code commented out in the code instead of simply deleting it?