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

Add padding to bounding cap to avoid clipping on small FOV #4231

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

henrysky
Copy link
Contributor

Add padding to bounding cap to avoid clipping on small FOV. The root cause is Saemundsson's inversion formula for atmospheric refraction is not exact as stated in

//Bennett's formula is not a strict inverse of Saemundsson's. There is a notable discrepancy (alt!=backward(forward(alt))) for

0.5 arcmin padding seems to work well except a few arcminute above the horizon (which is really close and I think this is good enough).

Fixes #365, #538

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
  • Housekeeping

How Has This Been Tested?

Test Configuration:

  • Operating system: MacOS 15
  • Graphics Card: Apple M3

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

…n formula is not exact to fix clipping issue at small FOV
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.

Copy link
Member

@gzotti gzotti left a comment

Choose a reason for hiding this comment

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

Ah, fresh eyes on an old problem! Looks like you had the right idea. Great, thanks!

@gzotti gzotti added this to the 25.1 milestone Mar 19, 2025
@gzotti gzotti added the importance: low Small problem, rarely visible, no crash label Mar 19, 2025
@gzotti gzotti merged commit 2920049 into Stellarium:master Mar 19, 2025
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
importance: low Small problem, rarely visible, no crash
Development

Successfully merging this pull request may close these issues.

Wrong clipping on small FOV
2 participants