Skip to content

Add local time of ascending/descending node calculation#534

Merged
ChristopherRabotin merged 5 commits into
masterfrom
feat-move-ltan-ltdn-to-almanac
Oct 16, 2025
Merged

Add local time of ascending/descending node calculation#534
ChristopherRabotin merged 5 commits into
masterfrom
feat-move-ltan-ltdn-to-almanac

Conversation

@ChristopherRabotin

Copy link
Copy Markdown
Member

Summary

Add local time of ascending/descending node calculation

Architectural Changes

No change

New Features

  • Add local time of ascending/descending node calculation
  • Add both to the ScalarExpr as well

Improvements

No change

Bug Fixes

No change

Testing and validation

NONE!!

Documentation

This PR does not primarily deal with documentation changes.

google-labs-jules Bot and others added 3 commits October 8, 2025 19:28
This commit moves the `ltan_h` and `ltdn_h` functions from the `Orbit` struct to the `Almanac` struct, as requested by the user. This new location is more appropriate as the calculation is dependent on the `Almanac` for retrieving the Sun's position.

The functions now take an `Orbit` object as a parameter. The core logic remains the same, based on the formula from Wertz's astrodynamics book.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @ChristopherRabotin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the anise library by adding crucial orbital mechanics calculations: the Local Time of Ascending Node (LTAN) and Local Time of Descending Node (LTDN). These new capabilities are integrated into the Almanac system and made accessible through ScalarExpr for broader analytical use. Additionally, the PR updates the Python interoperability layer by transitioning from py.allow_threads to py.detach, which could signify an improvement in how Rust code interacts with Python's Global Interpreter Lock (GIL).

Highlights

  • New Orbital Calculations: Introduced functions to calculate the Local Time of Ascending Node (LTAN) and Local Time of Descending Node (LTDN) within the Almanac struct, crucial for orbital analysis.
  • Scalar Expression Integration: The newly added LTAN and LTDN calculations are now exposed as ScalarExpr variants, allowing them to be used in generic scalar analysis and computations.
  • Python Threading Model Update: Replaced py.allow_threads with py.detach across several Python integration points, potentially improving concurrency handling or resource management when interacting with the Python Global Interpreter Lock (GIL).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces calculations for the Local Time of Ascending/Descending Node (LTAN/LTDN) and integrates them into the ScalarExpr system. The changes are logical and the update from py.allow_threads to py.detach across several files is a good modernization step. My main feedback focuses on two areas: improving the conciseness of the new calculation logic and, more critically, adding dedicated unit tests for the new ltan and ltdn functions to ensure their correctness, as they are currently untested.

Comment thread anise/src/almanac/eclipse.rs Outdated
Comment thread anise/src/almanac/eclipse.rs Outdated
@ChristopherRabotin ChristopherRabotin merged commit 1004e2e into master Oct 16, 2025
18 checks passed
@ChristopherRabotin ChristopherRabotin deleted the feat-move-ltan-ltdn-to-almanac branch October 16, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant