Skip to content

maxDeg in loadGravFromFile for GravityEffector #1256

@carlo98

Description

@carlo98

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

  1. 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)".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions