From 781e00e7b8b303edc1e75d18db307e052b3e79eb Mon Sep 17 00:00:00 2001 From: Mark Stephenson Date: Thu, 14 Dec 2023 15:18:00 -0700 Subject: [PATCH] Issue #86: Update BSK gravFactory --- .../general_satellite_tasking/simulation/environment.py | 7 ++----- src/bsk_rl/envs/general_satellite_tasking/utils/orbital.py | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/bsk_rl/envs/general_satellite_tasking/simulation/environment.py b/src/bsk_rl/envs/general_satellite_tasking/simulation/environment.py index 3c661b53..1b83a495 100644 --- a/src/bsk_rl/envs/general_satellite_tasking/simulation/environment.py +++ b/src/bsk_rl/envs/general_satellite_tasking/simulation/environment.py @@ -121,11 +121,8 @@ def _set_gravity_bodies( self.planet.isCentralBody = ( True # ensure this is the central gravitational body ) - self.planet.useSphericalHarmParams = True - simIncludeGravBody.loadGravFromFile( - bsk_path + "/supportData/LocalGravData/GGM03S.txt", - self.planet.spherHarm, - 10, + self.planet.useSphericalHarmonicsGravityModel( + bsk_path + "/supportData/LocalGravData/GGM03S.txt", 10 ) # setup Spice interface for some solar system bodies diff --git a/src/bsk_rl/envs/general_satellite_tasking/utils/orbital.py b/src/bsk_rl/envs/general_satellite_tasking/utils/orbital.py index 37236777..c048b0f9 100644 --- a/src/bsk_rl/envs/general_satellite_tasking/utils/orbital.py +++ b/src/bsk_rl/envs/general_satellite_tasking/utils/orbital.py @@ -178,9 +178,8 @@ def init_simulator(self) -> None: planet = self.gravFactory.createEarth() self.gravFactory.createSun() planet.isCentralBody = True - planet.useSphericalHarmParams = True - simIncludeGravBody.loadGravFromFile( - bskPath + "/supportData/LocalGravData/GGM03S.txt", planet.spherHarm, 10 + planet.useSphericalHarmonicsGravityModel( + bskPath + "/supportData/LocalGravData/GGM03S.txt", 10 ) UTCInit = self.utc_init self.gravFactory.createSpiceInterface(