generated from NASA-AMMOS/aerie-mission-model-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Linear resources #8
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
Open
bradNASA
wants to merge
25
commits into
main
Choose a base branch
from
linear-resources
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bleResource - Convert from 3 separate fields (discrete, linear, unstructured) to single DoubleResource - Maintain backward compatibility through updated getter methods - Clean up field declarations and initialization - All tests passing
- Remove IlluminationAnglesByBody_p, EarthRaDecByBody_p, EarthRaDeltaWithSCByBody_p - Remove BodySubSolarPoint_p, BodySubSCPoint_p, orbitInclinationByBody_p, orbitPeriodByBody_p - These fields were never populated with data and served no purpose - Keep only fields that are actually used (SpacecraftBodyRange_p, SpacecraftBodySpeed_p, SpacecraftAltitude_p) - Significantly cleaner code with no dead code - All tests passing
- Convert 8 fields to local variables (bodyPositionAndVelocityWRTSpacecraft_u/a, sunPositionAndVelocityWRTBody_u/a, bodyPositionAndVelocityWRTEarth_u/a, BODY_POS_ICRF_u/a, BODY_VEL_ICRF_u/a, SpacecraftBodyRange_p, SpacecraftBodySpeed_p, SpacecraftAltitude_p) - Remove 20+ unused getter methods (_u and _p variants) - Improve code quality: method references, better generics, Collections.addAll - Remove commented-out dead code - Maintain backward compatibility for all active functionality - Significantly cleaner architecture with better separation of concerns - All tests passing
- Convert SpacecraftBodyRange, SpacecraftBodySpeed, SpacecraftAltitude, BodyHalfAngleSize, and BetaAngleByBody to use DoubleResource - Implement proper linear resources using Unstructured.timeBased() + maybeApproximateAsLinear() pattern - Add time-based calculation methods to GenericGeometryCalculator - Create helper methods to eliminate code duplication - Organize related methods together in GenericGeometryCalculator - Update GenericGeometryCalculator to use .discrete() accessors - Fix test to use .discrete() accessor for DoubleResource
- Convert all remaining resources to use DoubleResource with proper linear resources - Add time-based computation methods to GenericGeometryCalculator for all resources - Implement Unstructured.timeBased() + maybeApproximateAsLinear() pattern for all resources - Refactor all discrete calculations to use time-based methods, eliminating code duplication - Update GenericGeometryCalculator to use .discrete() accessors consistently - Fix test to use .discrete() accessor for DoubleResource - All tests passing successfully
…ctivities package
- Convert BodySubSCPoint to use DoubleResource (Map<String, Map<String, DoubleResource>>) - Create SubSCPointData record to hold all subSC values in one place - Implement time-based helper functions in GenericGeometryCalculator - Eliminate redundant SPICE calls: single getSubPointInformation() per body instead of 5 - Complete linear resource pattern: discrete -> unstructured -> linear -> DoubleResource - Use register_p() for proper resource registration with appropriate units - Convert SubSCPointData to Java record for cleaner, more modern code - Maintain backward compatibility with existing API - 80% reduction in SPICE calls for subSC point calculations
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds linear resources and a config option to switch between linear vs discrete resources. It also allows for plans to start before spice data is available by returning a value at a valid time in the future by default. There are also some unrelated improvements to PointingActivity.
Linear resources are computed from approximations on Unstructured, time-based resources.
Linear resources are yet slow because they are not reusing past computations where they could. This is because approximations are on Double values and not Vector3D, which are often the preferred data structure for things like angle calculations. So, some refactoring is needed to speed this up.
Consider also adding sample-based approximations in addition to the existing secant/error-based approximations.