Skip to content

feat: Add spacecraft inspection viewing and glare constraints - #1578

Merged
schaubh merged 4 commits into
developfrom
feature/spacecraft-location-glare
Oct 2, 2026
Merged

schaubh merged 4 commits into
developfrom
feature/spacecraft-location-glare

Conversation

@dhutererprats

Copy link
Copy Markdown
Contributor

Description

Add an optional surface-normal-to-observer angle limit (theta_view) and geometric specular-glare detection to spacecraftLocation. The viewing angle is reported without a Sun input. With a Sun input, each tracked spacecraft gets a glare factor and flag; rejecting glared access is opt-in.

Sun and viewing directions now originate at the configured body-fixed inspection point. The existing Sun-incidence and optional eclipse checks remain in place. Glare indicates reflection geometry, not measured image saturation.

Verification

Clean Release build with strict warnings; 110 CTests and 7,520 Python tests passed (411 skipped). The 95 spacecraftLocation tests cover viewing-angle limits, illumination and eclipse, and glare geometry. Pre-commit checks passed.

Documentation

I rebuilt Basilisk on the updated develop branch and ran the full test suite. All enabled tests passed. The module tests also cover views with and without a Sun input, the angle limits, and exact, near-miss, and back-facing glare cases.

Pre-commit checks passed. The HTML documentation built successfully.

Future work

Consider calibrating limits for specific surfaces and cameras. Radiometric exposure and spacecraft self-shadowing are not modeled here.

@dhutererprats
dhutererprats requested a review from a team as a code owner September 24, 2026 17:43
@schaubh schaubh self-assigned this Sep 24, 2026
@schaubh schaubh added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 24, 2026
@schaubh schaubh added this to Basilisk Sep 24, 2026
@schaubh
schaubh self-requested a review September 24, 2026 20:13
@schaubh schaubh moved this to 👀 In review in Basilisk Sep 24, 2026
@schaubh schaubh linked an issue Sep 24, 2026 that may be closed by this pull request

@schaubh schaubh 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.

Critical review: two P2 findings below. The original 146 focused tests and standalone header compilation passed; supplemental diagnostic checks exposed these gaps. The first finding has now been fixed and validated locally (146 focused tests and pre-commit checks pass), but that fix has not been pushed. The second finding remains outstanding.

Comment thread src/architecture/msgPayloadDefC/AccessMsgPayload.h
Comment thread src/simulation/environment/spacecraftLocation/spacecraftLocation.cpp Outdated
@schaubh
schaubh force-pushed the feature/spacecraft-location-glare branch from e14e77c to e8713c1 Compare September 24, 2026 20:45
@schaubh schaubh changed the title [#864] Add spacecraft inspection viewing and glare constraints feat: Add spacecraft inspection viewing and glare constraints Sep 24, 2026
@dhutererprats
dhutererprats force-pushed the feature/spacecraft-location-glare branch from e8713c1 to e95b05f Compare September 29, 2026 20:07
dhutererprats and others added 3 commits October 2, 2026 09:57
Zero-initialize AccessMsgPayload in groundLocation and stripLocation
so unused illumination and glare outputs remain zero.

Extend range tests to verify these fields for multiple spacecraft
throughout the simulation.
Allow a small numerical tolerance in the glare comparison so exact
reflections are detected when glareThreshold is 1.

Add regression coverage for rotated spacecraft, threshold boundaries,
and nearby views outside the glare limit. Document the tolerance.

Validation: 242 focused tests and pre-commit checks passed.
@schaubh
schaubh force-pushed the feature/spacecraft-location-glare branch from e95b05f to 361ba70 Compare October 2, 2026 15:57
@schaubh
schaubh self-requested a review October 2, 2026 15:57
@dhutererprats

Copy link
Copy Markdown
Contributor Author

I checked your fixes and they look good.
I added one small commit on top of your rebase just to add a check for NaN glare thresholds and a test with two observers moving in and out of glare. The local build and tests pass, and the docs and release notes are updated.

@schaubh
schaubh merged commit c1bf0d7 into develop Oct 2, 2026
7 checks passed
@schaubh
schaubh deleted the feature/spacecraft-location-glare branch October 2, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

feat: Illumination angle requirement for SatelliteLocation

2 participants