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

Nomenclature plot fixes #3342

Merged
merged 13 commits into from Aug 6, 2023
Merged

Nomenclature plot fixes #3342

merged 13 commits into from Aug 6, 2023

Conversation

gzotti
Copy link
Member

@gzotti gzotti commented Jul 25, 2023

Description

This introduces an option to encircle craters and satellite features (which are usually also craters) with ellipses.

I also just slightly simplified the code.

Fixes # (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 3070Ti
  • Qt 6.5.1

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 enhancement Improve existing functionality label Jul 25, 2023
@gzotti gzotti added this to the 23.3 milestone Jul 25, 2023
@gzotti gzotti self-assigned this Jul 25, 2023
@gzotti gzotti added this to Needs triage in Visualization via automation Jul 25, 2023
@github-actions github-actions bot requested review from 10110111 and alex-w July 25, 2023 14:46
@github-actions
Copy link

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.

@alex-w
Copy link
Member

alex-w commented Jul 25, 2023

Hmm... It's interesting feature, but IMHO ellipses have troubles for scale factor:
stellarium-004

@10110111
Copy link
Contributor

When I enable craters outline, I get the following repeated messages in the log:

Distance greater 1
Distance greater 1
/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

Distance greater 1
Distance greater 1
/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

Distance greater 1
Distance greater 1
/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

Distance greater 1
/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

Distance greater 1
Distance greater 1
Distance greater 1
/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

Distance greater 1
/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

Distance greater 1
Distance greater 1
Distance greater 1
Distance greater 1
/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

Distance greater 1
Distance greater 1
Distance greater 1
/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

/home/ruslan/src/stellarium/src/core/modules/AtmosphereShowMySky.cpp:789: OpenGL error: 1281 (GL_INVALID_VALUE)

@gzotti
Copy link
Member Author

gzotti commented Jul 25, 2023

Hmm... It's interesting feature, but IMHO ellipses have troubles for scale factor:...

Not sure, do you mean display scaling? Planet scale factor (like 4x for the moon) works for me.

@10110111
Copy link
Contributor

Not sure, do you mean display scaling?

I experience the same issue with HiDPI scaling of 150%. If I set 100%, the size problem disappears.

@gzotti
Copy link
Member Author

gzotti commented Jul 25, 2023

I also see this in master:

D:\StelDev\GIT\stellarium\src\core\StelApp.cpp:910: OpenGL error: 1281 (GL_INVALID_VALUE)

@10110111
Copy link
Contributor

I also see this in master

Constantly repeating?

@gzotti
Copy link
Member Author

gzotti commented Jul 25, 2023

Yes. I only have excluded a few plugins from building.

$ git log
commit a79ca04 (HEAD -> master, origin/master)

@alex-w
Copy link
Member

alex-w commented Jul 25, 2023

Hmm... It's interesting feature, but IMHO ellipses have troubles for scale factor:...

Not sure, do you mean display scaling? Planet scale factor (like 4x for the moon) works for me.

Please show screenshot with outlines, but without scaling the Moon

@gzotti
Copy link
Member Author

gzotti commented Jul 25, 2023

stellarium-093

@alex-w
Copy link
Member

alex-w commented Jul 25, 2023

stellarium-093

See screenshot from macOS (HiDPI monitor, device pixel ratio: 2):
stellarium-005

@alex-w
Copy link
Member

alex-w commented Jul 25, 2023

OK, I see pixel ratio correction is applied twice - one time in StelPainter::drawEllipse() method and one time in NomenclatureItem::draw() method (see obtaining screenRadius by the fact). Please see tentative fix.

Plus I see flashing outlines for craters near lunar limb :(

@10110111
Copy link
Contributor

Yes, with this fix it's now better.

The option to outline craters need to be disabled when nomenclature is off, for consistency with other options that get disabled.

@alex-w
Copy link
Member

alex-w commented Jul 25, 2023

If tentative fix is acceptable, then only flashes near limb need to be fixed

@gzotti
Copy link
Member Author

gzotti commented Jul 26, 2023

Thanks for the hints. The flashing is better, but it seems some flicker remains due to rounding effects.

@gzotti
Copy link
Member Author

gzotti commented Jul 26, 2023

I still have a problem to define the rotation angle in antiquity.

@gzotti
Copy link
Member Author

gzotti commented Jul 26, 2023

I now exclude all ellipses which would extend over the limb. I think it's the best possible solution with that approach. Mare Orientale and other possible "large tangent disks" will hopefully always be excluded with that.

@alex-w
Copy link
Member

alex-w commented Jul 26, 2023

Probably GUI option should be renamed now (Outline circles?) and tooltip with short description for this option really need.

Visualization automation moved this from Needs triage to In progress Jul 26, 2023
void NomenclatureMgr::setFlagOutlineCraters(bool b)
{
NomenclatureItem::flagOutlineCraters = b;
conf->setValue("astro/flag_planets_nomenclature_outline_craters", b);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This immediate saving is inconsistent with the rest of the options here (except the terminator ones, which are also inconsistent with the rest).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops... I agree

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know. I like the immediate storage of details much better than having to remember whether I have made any other detail changes before I save all options. Immediate here are color, terminator, solar altitudes, and now circles. The global (not-immediate) option is nomenclature or not. But indeed I would like to have many more immediate-store settings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This inconsistency is very confusing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Immediate storage of details is very bad for educational purposes (esp. for using Stellarium in classes) - it's good for personal uses only. Please move saving option into ConfigurationDialog class.

Or, at least, we should add support profiles - #439

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fully disagree. The proposed solution is consistent with storing the three details about terminator visibility. I would rather add immediate mode for "show special" and "hide local" for local consistency.
The global "store settings" is super old and frequently causes confusion. But probably we need yet another global program option for immediate vs. deferred storage.

@gzotti gzotti mentioned this pull request Aug 2, 2023
13 tasks
- Tried craters as circles, but need ellipse.
- When time is not running, it seems returning from moon to earth,
moon craters are distributed over the sky.
@gzotti gzotti merged commit d677f1e into master Aug 6, 2023
18 of 20 checks passed
Visualization automation moved this from In progress to Done Aug 6, 2023
@gzotti gzotti deleted the gz_NomenclaturePlotFixes branch August 6, 2023 11:41
@alex-w alex-w added the state: published The fix has been published for testing in weekly binary package label Sep 2, 2023
@github-actions
Copy link

github-actions bot commented Sep 2, 2023

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 Sep 26, 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
enhancement Improve existing functionality
Projects
Visualization
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants