Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grids: accurate ecliptic calendar marks #3057

Merged
merged 11 commits into from
Feb 14, 2023
Merged

Conversation

gzotti
Copy link
Member

@gzotti gzotti commented Feb 12, 2023

Description

This is an alternative to #2216 with accurate Solar positions labelled above the ecliptic.

Fixes #2175 (issue)

Screenshots (if appropriate):

Type of change

  • 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

How Has This Been Tested?

Test Configuration:

  • Operating system: Windows 11
  • Graphics Card: (Geforce)

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • 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

@gzotti gzotti added the feature Entirely new feature label Feb 12, 2023
@gzotti gzotti added this to the 23.1 milestone Feb 12, 2023
@gzotti gzotti self-assigned this Feb 12, 2023
@github-actions
Copy link

github-actions bot commented Feb 12, 2023

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.

@Atque
Copy link
Contributor

Atque commented Feb 12, 2023

I see the dates don't move when changing timezone or even location. Is that intended?

@gzotti
Copy link
Member Author

gzotti commented Feb 12, 2023

No, I am just adding such refinements. A problem is DST change. I had thought core->getUTCOffset(jd) would deliver that. No, it doesn't. But I will add signal connections to recreate partitions when timezone changes. Location does not change ticks.

@gzotti gzotti force-pushed the grids/ecliptic-calendar-marks branch from 346e74f to 005c78c Compare February 12, 2023 19:37
@alex-w
Copy link
Member

alex-w commented Feb 13, 2023

Maybe using roman numbers for months to avoid misunderstanding the dates (e.g. 20/II for February 20)?

@Atque
Copy link
Contributor

Atque commented Feb 13, 2023

Maybe using roman numbers for months to avoid misunderstanding the dates (e.g. 20/II for February 20)?

Or perhaps Jan, Feb, Mar etc, but only at the 1st each month?

- also tweak fov-dependent label density
@10110111
Copy link
Contributor

Why does it show dates in format that alternates between DD.MM. and DD.? This looks confusing, and the alignment between these alternations is broken. Also the trailing dots don't make sense to me.

stellarium-011

@gzotti
Copy link
Member Author

gzotti commented Feb 13, 2023

I see 1/10/20 as "main" labels (which indicate which month the whole area belongs to) and 5/15/25 as "intermediate" labels of lower importance, therefore they are placed lower and have no month attached (avoiding some clutter). I could possibly align them to be in-line with the main row.

The trailing dots may be a reason for Localisation of dates. In my part of the world it is common to write dots to indicate ordinals e.g. in dates. It's mostly a matter of taste. For me slashes would be uncommon, usually indicating alternatives.

@10110111
Copy link
Contributor

have no month attached (avoiding some clutter)

Since the user needs to understand the meaning of a figure from the context, it's not helpful to have half with the month, and another without. It's better to just reduce number of ticks when the clutter would be unavoidable.

The trailing dots may be a reason for Localisation of dates. In my part of the world it is common to write dots to indicate ordinals e.g. in dates.

Well, I have LC_NUMERIC=ru_RU.UTF-8 and LC_TIME=ru_RU.UTF-8. In ru locales it's not common (not even heard of unless one has studied German) to end the numbers with periods to indicate an ordinal. To me it just looks like a C++ way of spelling a double literal with integral value. To non-programmers in similar locales to me it would just look weird (especially after a Roman numeral).

@gzotti
Copy link
Member Author

gzotti commented Feb 13, 2023

OK. I did not want to go as far as localizing or even user-customizing those labels as this breaks some of the fov thinning logic. Shall I use Roman numerals for the first of each month, and "Arab" numerals for the other days? This will obviously make users unhappy when they zoom in to see just a couple of days which will then have lost their clear indication of "10.V." etc. There are always compromises to take.

@10110111
Copy link
Contributor

10110111 commented Feb 13, 2023

as far as localizing

Well, it would be best to localize, but OTOH, since we are abbreviating to fit into the space, each locale would require a special approach, so I don't think this PR is a good stage for this.

even user-customizing those labels

This is too much IMO.

Shall I use Roman numerals for the first of each month, and "Arab" numerals for the other days?

No, just make it consistent: a single format for each tick, and without the stray period. I might even agree to the period (though it would look weird to most users IMHO), but consistency is a must.
[0-31].[I-XII] seems to be quite unambiguous even for those who are used to mm.dd format for date. So just sticking to this Indo-Arabic + Roman mixture seems to be the best compromise that doesn't require localization or customization.


I have now used this line for some time, and it's incomprehensible at high zoom levels when it doesn't have any labels at all, except "Ecliptic of Date". Maybe some refinement could be made, e.g. adding time points in HH:MM format in such cases.

@gzotti
Copy link
Member Author

gzotti commented Feb 13, 2023

I have now used this line for some time, and it's incomprehensible at high zoom levels when it doesn't have any labels at all, except "Ecliptic of Date". Maybe some refinement could be made, e.g. adding time points in HH:MM format in such cases.

Adding intermediate values to the lines is another issue. (#1793)

@gzotti
Copy link
Member Author

gzotti commented Feb 13, 2023

While I somewhat disagree about showing the month on also the 5-ticks, I can live with them.

@gzotti gzotti merged commit dd0af1d into master Feb 14, 2023
@gzotti gzotti deleted the grids/ecliptic-calendar-marks branch February 14, 2023 18:25
@gzotti gzotti mentioned this pull request Feb 14, 2023
13 tasks
@github-actions
Copy link

Hello @gzotti!

The enhancement or feature has been merged into source code and you may test it via building Stellarium from source code or wait the weekly development snapshot...

@alex-w alex-w added state: published The fix has been published for testing in weekly binary package and removed state: implemented labels Mar 13, 2023
@github-actions
Copy link

Hello @gzotti!

Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

@alex-w alex-w removed the state: published The fix has been published for testing in weekly binary package label Mar 27, 2023
@github-actions
Copy link

Hello @gzotti!

Please check the latest stable version of Stellarium:
https://github.com/Stellarium/stellarium/releases/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Entirely new feature
Development

Successfully merging this pull request may close these issues.

Calendar on Ecliptic
4 participants