Skip to content

[Sat2OrbitMap] Add auto-mode for step detecting#13

Merged
yunanhou2023 merged 5 commits intoSpaceNetLab:release/v2.0from
root-hbx:step-detect
Sep 27, 2025
Merged

[Sat2OrbitMap] Add auto-mode for step detecting#13
yunanhou2023 merged 5 commits intoSpaceNetLab:release/v2.0from
root-hbx:step-detect

Conversation

@root-hbx
Copy link
Copy Markdown
Member

Resolves #6 and #12

After several attempts in prev discussions, this PR finally delivers a "best effort" support for step number detecting based on ruptures.

We have implemented a new feature for the automatic detection of step counts, which can be enabled using the auto_gen tag. Concurrently, we have preserved the existing functionality for users to manually input this data based on their own observations.

if not auto_gen:
    # Manual Mode: visualize RAAN distribution and manually input orbit number
    plt.plot(raans)
    plt.ylabel("RAANS")
    plt.show()
    orbits_number = int(
        input(
            "\t\t\tPlease enter the number of orbits (integer) based on the raan distribution result of the line chart: "
        )
    )
else:
    # Automatic Mode: automatically detect orbit number
    orbits_number = detect_orbit_number(raans)
    print(f"\t\t\tAutomatically detected number of orbits: {orbits_number}")

Performance Evaluation

(1) Runtime Consuming

# StarPerf.py
# test the core module functionality of various TLE constellations
import samples.TLE_constellation.TLE_constellation_test_cases
samples.TLE_constellation.TLE_constellation_test_cases.TLE_constellation_test_cases()

We take a comparison of both manual mode and auto mode:

manual (autogen=False) auto (autogen=True)
More than 1h40min 2651.2098858356476s, namely 44min

(2) Precision

The test case is derived this discussion. I choose the last 5 cases for demo.

aka. [21, 72, 28, 24, 72]

image image

All tests are provided here:

Official:

image

With auto_gen Mode:

image

TL; DR

This PR implements a SOTA scatter measurement, significantly improves the module's runtime performance and enhances the user experience, albeit at the cost of a minor and acceptable precision loss.

Additionally, backward compatibility has been maintained to ensure that users can seamlessly transition between both modes.

@root-hbx
Copy link
Copy Markdown
Member Author

BTW, .gitignore are also updated, since pycache files bring toooooooo much redundancy.

@yunanhou2023 yunanhou2023 merged commit 7f7c29d into SpaceNetLab:release/v2.0 Sep 27, 2025
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.

Question

2 participants