Skip to content

Spherical offset positions#316

Open
attipaci wants to merge 2 commits intomainfrom
offset_by
Open

Spherical offset positions#316
attipaci wants to merge 2 commits intomainfrom
offset_by

Conversation

@attipaci
Copy link
Copy Markdown
Collaborator

@attipaci attipaci commented May 5, 2026

Added functions / methods to calculate offset spherical positions from the reference position along a great circle, which crosses the reference at a specified direction. It is based on the astropy offset_by() implementation. (thanks to @aleberti).

C99 API

Added

  • novas_offset_by() and novas_equ_offset_by() to calculate offset spherical / equatorial positions at some distance along a great circle that intersects the original position at the specified angle.

C++11 API

Added

  • Equatorial::offset(), Ecliptic::offset(), Galactic::offset(), and Horizontal::offset().

@attipaci attipaci added this to the 1.7.0 milestone May 5, 2026
@attipaci attipaci self-assigned this May 5, 2026
@attipaci attipaci added the enhancement New feature or request label May 5, 2026
@attipaci attipaci linked an issue May 5, 2026 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coveralls
Copy link
Copy Markdown

coveralls commented May 5, 2026

Coverage Report for CI Build 25454050092

Warning

No base build found for commit 9459ce8 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 99.119%

Details

  • Patch coverage: 81 of 81 lines across 5 files are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 9080
Covered Lines: 9000
Line Coverage: 99.12%
Coverage Strength: 41233.42 hits per line

💛 - Coveralls

@attipaci attipaci force-pushed the offset_by branch 3 times, most recently from cd87db0 to 3d0dcdd Compare May 5, 2026 19:21
@attipaci attipaci changed the title Add functions / methods for calculating spherical offset positions Spherical offset positions May 5, 2026
@attipaci attipaci force-pushed the offset_by branch 15 times, most recently from b40cf5d to f050c80 Compare May 5, 2026 20:25
@attipaci attipaci marked this pull request as ready for review May 6, 2026 18:45
@attipaci
Copy link
Copy Markdown
Collaborator Author

attipaci commented May 6, 2026

@aleberti,

I think this PR is ready. It passes all the sanity checks I came up with. Please take a look too, in case there is more to be done. Otherwise I plan to merge it in a couple of days...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: directional offsets

2 participants