nyx-space / nyx

Nyx is a high fidelity, fast, reliable and validated astrodynamics toolkit library written in Rust and available in Python
https://nyxspace.com
GNU Affero General Public License v3.0
162 stars 19 forks source link

Finite burn targeting #81

Open ChristopherRabotin opened 1 year ago

ChristopherRabotin commented 1 year ago

Converted from https://gitlab.com/nyx-space/nyx/-/issues/128 by ChatGPT

High level description

The purpose of this new feature is to enable users of the astrodynamics toolkit to take a set of maneuvers generated from an instantaneous maneuver finder, such as the Lambert algorithm, and find the finite burn equivalent with a configured spacecraft.

Requirements

The purpose of this section is to fill out the Requirements of the QA process.

Requirements answer the question: what does the system need to do? It does not answer the question of how does the system do this?

Test plans

To test that this feature is working correctly, we can use the following test plans:

  1. Create a set of maneuvers using the Lambert algorithm and a known spacecraft configuration.
  2. Use the new to_finite_burn() method of the Maneuver structure to find the finite burn equivalent of the maneuvers.
  3. Compare the resulting finite burn maneuver with the expected result to ensure it is accurate.
  4. Test the feature with various spacecraft configurations and maneuver sets to ensure it works for different scenarios. This should include maneuvers that are purely in-plane, purely out-of-plane, and at least one that has both in-plane and out-of-plane changes in orbital elements.
  5. Test the feature with edge cases, such as maneuvers with a very small delta-V, to ensure it can handle these situations correctly.

Design

Algorithm demonstration

This should use the algorithm from AAS-12-236 by Jacob Williams et al. in the section "Impulsive to Finite Burn Conversion."

API definition

The new to_finite_burn() method will be added to the existing Maneuver structure. It will take the following argument:

+ `spacecraft`: A `Spacecraft` structure representing the configuration of the spacecraft for which the finite burn equivalent maneuver should be found.

High level architecture

The to_finite_burn() method will be implemented as part of the existing astrodynamics toolkit. It will use the Spacecraft structure and the Maneuver structure as inputs, and will return the finite burn equivalent of the maneuvers.

Detailed design

                                +---------------+
                                | Instantaneous |
                                |   Maneuver    |
                                |    Finder     |
                                +---------------+
                                        |
                                        v
                                +---------------+
                                |   Maneuver    |
                                |  Structure    |
                                +-------+-------+
                                        |
                                        | to_finite_burn() method
                                        |
                                        v
                                +---------------+
                                | Finite Burn   |
                                |   Maneuver    |
                                +---------------+
ChristopherRabotin commented 1 year ago

As of the writing of this issue, an advanced draft of the to_finite_burn() method is available on the 128-finite-burn-targeting branch. However, it has been observed that small variations in the input can cause the algorithm to fail. Additionally, the current implementation only supports thruster orientations that are either constant or linear, and does not optimize the duration of the burn. Therefore, further development and testing is needed to improve the reliability and functionality of this feature.

The test cases for this feature also need to be expanded upon to thoroughly evaluate its performance.