-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Describe the bug
Script gravityEffector.py loadGravFromFile doesn't use the maxDeg parameter when calling loadGravFromFileToList. The if condition "if maxDegreeFile < maxDeg or maxOrderFile < maxDeg:" in loadGravFromFileToList .
To reproduce
- Call "gravBodies['earth'].useSphericalHarmonicsGravityModel(bskPath + '/supportData/LocalGravData/GGM03S.txt', N)" with N > 179.
Expected behavior
When calling "gravBodies['earth'].useSphericalHarmonicsGravityModel()" the condition is not checked and the code may return a segmentation error because of this.
Screenshots
If applicable, add screenshots/plots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu
- Version 24.04
- Python version 3.12.3
Additional context
in the method loadGravFromFile the line "[clmList, slmList, mu, radEquator] = loadGravFromFileToList(fileName, maxDeg=2)" should be changed to "[clmList, slmList, mu, radEquator] = loadGravFromFileToList(fileName, maxDeg=maxDeg)".