open-space-collective / open-space-toolkit-astrodynamics

Flight profile, orbit, attitude, access.
https://open-space-collective.github.io/open-space-toolkit-astrodynamics/
Apache License 2.0
56 stars 14 forks source link

fix: coordinate subset unsafe frame conversion #387

Closed apaletta3 closed 5 months ago

apaletta3 commented 5 months ago

Users can create a CoordinateSubset, giving it a specific name and number of coordinates in the subset. However, if they use the inFrame conversion method on the CoordinateSubset class itself, it doesn't actually do the conversion they want, it just returns the coordinates as they are.

This is fine for scalar subsets, but not fine for vector coordinate subsets because it is a hidden behavior the user may not be aware of. Therefore, if someone tries to do this, I will raise an error.

If the user wants to make their own non-scalar coordinate subset by inheriting from CoordinateSubset, then they can get around this error by acutally implementing the virtual inFrame method and overriding it in their child class.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.86%. Comparing base (fd49513) to head (886607d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #387 +/- ## ======================================= Coverage 89.86% 89.86% ======================================= Files 81 81 Lines 7836 7838 +2 ======================================= + Hits 7042 7044 +2 Misses 794 794 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.