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

Navstar Sun limb size and direction fix #2021

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

A-j-K
Copy link
Contributor

@A-j-K A-j-K commented Nov 9, 2021

Use actual radius as returned and not assumed diameter. Also a bool logic correction for +/- direction

Description

The value of Ho as displayed in the extrainfo panel was incorrect and failed to match other tools such as the Pointing Tool or AltAz grid.

Fixes reported issue #2019

As patch;
selectedObject->getAngularSize(core); returns radius not diameter
Logic on upperLimb was inverted.

n/a

None.

Fixes # (issue)
#2019

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?

Created new test scripts that setup Stellarium with place, date and time as reported in issue 2019.
Observed fault.
Fixed.
Run script again and observed correct.

Also created script for Northern hemisphere to double check the fix (the report was for a location in the Southern hemisphere but was broke in both).

n/a

n/a

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

@alex-w alex-w added this to To do in Navigation via automation Nov 9, 2021
@alex-w alex-w added this to the 0.21.3 milestone Nov 9, 2021
Copy link
Member

@alex-w alex-w left a comment

Choose a reason for hiding this comment

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

Thanks!

Navigation automation moved this from To do to In progress Nov 9, 2021
@alex-w alex-w linked an issue Nov 9, 2021 that may be closed by this pull request
double obj_radius_in_degrees = selectedObject->getAngularSize(core);
if (!upperLimb)
obj_radius_in_degrees *= -1;
calc.addAltAppRad((obj_radius_in_degrees * M_PI) / 180.);
Copy link
Contributor

Choose a reason for hiding this comment

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

@A-j-K congratulations for using expressive variable names! and I love your copious use of whitespace (see higher in the code).

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.

Seems OK for me.

@alex-w alex-w merged commit 7b5494d into Stellarium:master Nov 9, 2021
Navigation automation moved this from In progress to Done Nov 9, 2021
@A-j-K A-j-K deleted the fix-navstar-ho-issue-2019 branch November 10, 2021 08:00
@alex-w alex-w added the state: fixed The bug has been fixed label Nov 14, 2021
@github-actions
Copy link

Hello @A-j-K! 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: fixed The bug has been fixed label Dec 25, 2021
@github-actions
Copy link

Hello @A-j-K! 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
None yet
Projects
Navigation
  
Done
Development

Successfully merging this pull request may close these issues.

altitude of Sun's lower limb
4 participants