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

Relative Motion #214

Draft
wants to merge 22 commits into
base: develop
Choose a base branch
from
Draft

Relative Motion #214

wants to merge 22 commits into from

Conversation

Mark2000
Copy link
Contributor

@Mark2000 Mark2000 commented Nov 25, 2024

Description

Closes #144

Please include a summary, motivation, and context of the changes and the related issue.

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 not work as expected)

How should this pull request be reviewed?

  • By commit
  • All changes at once

How Has This Been Tested?

Please describe how tests have been updated to verify your changes.

Future Work

What future tasks are needed, if any?

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation and release notes
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • If I changed an example ipynb, I have locally rebuilt the documentation

@Mark2000 Mark2000 changed the title TEMP: Initial work Relative Motion Nov 25, 2024
@Mark2000 Mark2000 force-pushed the feature/144-relative-motion branch 2 times, most recently from 56221bc to 74cf1de Compare November 25, 2024 23:21
@Mark2000 Mark2000 force-pushed the feature/144-relative-motion branch from e9937e2 to 841d9fb Compare December 27, 2024 19:47
@Mark2000 Mark2000 force-pushed the feature/144-relative-motion branch from 841d9fb to f686acf Compare December 28, 2024 00:33
@Mark2000 Mark2000 force-pushed the feature/144-relative-motion branch 2 times, most recently from 31aecce to e1ca657 Compare February 4, 2025 22:45
@dhutererprats dhutererprats self-requested a review February 9, 2025 01:31
Copy link

@dhutererprats dhutererprats Feb 9, 2025

Choose a reason for hiding this comment

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

What is this random unit vector used for?

Choose a reason for hiding this comment

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

What does the hardcoded '5700.0' specify here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened a new issue to track this, since we use hardcoded 5700 as a normalization factor (approx. 1 orbit) in various places. #225

@@ -1008,15 +1032,17 @@ def action_magic_thrust(self, dv_N: np.ndarray) -> None:
Args:
dv_N: [m/s] Inertial Delta V.
"""
if np.linalg.norm(dv_N) > self.dv_available:
self.satellite.logger.warning(
f"Maneuver exceeds available Delta V ({np.linalg.norm(dv_N)}/{self.fuel_remaining} m/s)."

Choose a reason for hiding this comment

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

Doesn't this give you the percentage (above 100%) that the current requested dv maneuver exceeds the available amount by? This division shouldn't give m/s unless I am missing something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The print statement results in something like Maneuver exceeds available Delta V (3.5/1.2 m/s).

f"Maneuver exceeds available Delta V ({np.linalg.norm(dv_N)}/{self.fuel_remaining} m/s)."
)

self._dv_available -= np.linalg.norm(dv_N)

Choose a reason for hiding this comment

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

if np.linalg.norm(dv_N) > self.dv_available then it would not be subtracted from the _dv_available since it is not a valid/possible maneuver. I think if np.linalg.norm(dv_N) > self.dv_available then we need to pass and step out of the action_magic_thrust function right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, definitely should handle this more gracefully. Could just perform a dv_available sized thrust.

Copy link

@dhutererprats dhutererprats left a comment

Choose a reason for hiding this comment

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

I have left comments on some of the commits just to clarify... I don't thing they are necessarily things you need to change except in the location where it is checked if np.linalg.norm(dv_N) > self.dv_available and even if that is the case we reduce the amount of _dv_available. We should fire the maneuver if it exceeds are dv capability so we would not reduce future dv_availability.

Also I saw that the build gives some issues (like the python 3.11 or 3.10) but they dont seem to be relevant issues right.

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.

Inspection/Evasion tasks roadmap
2 participants