Skip to content

Feature/two way range check#299

Merged
Mark2000 merged 2 commits intodevelopfrom
feature/two-way-range-check
Jul 24, 2025
Merged

Feature/two way range check#299
Mark2000 merged 2 commits intodevelopfrom
feature/two-way-range-check

Conversation

@Mark2000
Copy link
Copy Markdown
Contributor

@Mark2000 Mark2000 commented Jul 18, 2025

Description

Closes #298
Closes #300

Adds enforce_range_on_chief option to MaxRangeDynModel to cause the chief to also be terminated if the deputy dies.

Also fixes an issue exposed in tests where bad behavior would happen if a satellite died at t=0.

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?

Updated tests.

Future Work

None.

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

@Mark2000 Mark2000 force-pushed the feature/296-meta-agent branch from d88c656 to 4195ae0 Compare July 18, 2025 22:57
@Mark2000 Mark2000 force-pushed the feature/two-way-range-check branch from e4eca22 to 615779d Compare July 18, 2025 22:58
Base automatically changed from feature/296-meta-agent to develop July 23, 2025 23:04
@Mark2000 Mark2000 force-pushed the feature/two-way-range-check branch 2 times, most recently from 6f3e0ac to bd526f6 Compare July 23, 2025 23:41
@Mark2000 Mark2000 force-pushed the feature/two-way-range-check branch from bd526f6 to 229e226 Compare July 23, 2025 23:42
@Mark2000 Mark2000 marked this pull request as ready for review July 23, 2025 23:44
Copilot AI review requested due to automatic review settings July 23, 2025 23:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new enforce_range_on_chief option to the MaxRangeDynModel that causes the chief satellite to also be terminated if a deputy satellite violates the maximum range constraint. Additionally, it fixes a simulation initialization issue where bad behavior occurred when a satellite died at t=0.

  • Adds bidirectional range enforcement capability to MaxRangeDynModel
  • Fixes simulator initialization by replacing ConfigureStopTime and ExecuteSimulation with StepUntilStop
  • Updates tests to verify both chief and deputy termination behavior under range violations

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/bsk_rl/sim/dyn/relative_motion.py Adds enforce_range_on_chief parameter and implements dynamic method binding for chief termination
src/bsk_rl/sim/simulator.py Fixes initialization issue by changing simulation execution method
tests/integration/sim/test_int_dynamics.py Adds parametrized tests to verify chief termination behavior
docs/source/release_notes.rst Documents the new bidirectional range enforcement feature
Comments suppressed due to low confidence (1)

src/bsk_rl/sim/dyn/relative_motion.py:190

  • The parameter name 'self' is confusing as a default argument when 'self' is already the method's first parameter. Consider renaming to 'deputy_dynamics=self' or similar to clarify this refers to the deputy's dynamics object.
            def range_valid(self, deputy=self):

@Mark2000 Mark2000 merged commit c83fde9 into develop Jul 24, 2025
9 of 10 checks passed
@Mark2000 Mark2000 deleted the feature/two-way-range-check branch July 24, 2025 00:01
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.

Failures at t=0 are incorrectly logged Range checking only works in one direction

2 participants