Simplify gridline intersect callbacks
Description
Issue #3688 describes a tiny problem in the gridline manager's labeling of equatorial coordinates. I tried to fix and saw quite a bit of elaborate code was not even required. Or was it?
During development of this branch I will try to remove that possible bloat code also for the other grids.
Fixes #3688 (issue)
Screenshots (if appropriate):
see #3688
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] This change requires a documentation update
- [x] Housekeeping
How Has This Been Tested?
Test Configuration:
- Operating system: Win10, Win11
- Graphics Card: Geforce cards (irrelevant)
Checklist:
- [x] My code follows the code style of this project.
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation (header file)
- [ ] I have updated the respective chapter in the Stellarium User Guide
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Great PR! Please pay attention to the following items before merging:
Files matching src/**/*.cpp:
- [ ] Are possibly unused includes removed?
This is an automatically generated QA checklist based on modified files.
What is lon supposed to mean? The longitude of the observer on the planet? Why should it affect the label?
lon/lat (longitude/latitude) seem to be the interface points of screen intersection (?) in general spherical names. I have not gone further today, but at least in the equatorial grid they seem not to be required. Or I am missing something important.
OK, all tests from my side are passed
Brr, and I just discovered errors. Switch to decimal degrees! Not sure what's happening.
Brr, and I just discovered errors. Switch to decimal degrees! Not sure what's happening.
Oops... hour angle should be always in hours - this bug exists in the current release too
Not necessarily. It's really user's choice. See SHA for navigators.
Coordinates in infobox and in grids should be consistent
please test with all grids and settings (decimal numbers etc.)
Hour angles should be measured in hours by definition, not in degrees
P.S. Of course in the current master I see same problem and this is bug IMHO
Do you mean decimal hours? I am not aware of any use for that. Navigators and maybe others (surveyors?) may prefer decimal degrees for hour angles. This branch/fix should however only change the previous behaviour of a spurious 0 for 12h/180°. Given the simplifications, I hope I did not break other grids now. (I guess a lot of bloat was to mitigate the original problem)
Hello @gzotti!
Please check the fresh version (development snapshot) of Stellarium: https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot
Hello @gzotti!
Please check the latest stable version of Stellarium: https://github.com/Stellarium/stellarium/releases/latest