From cba2952594aaa0e76b278b341cfe1c67f8914820 Mon Sep 17 00:00:00 2001 From: Juan Garcia Bonilla Date: Thu, 7 Sep 2023 20:56:14 -0700 Subject: [PATCH] [squash] update tests --- examples/scenarioLagrangePointOrbit.py | 1 - .../FuelTank/_UnitTest/test_mass_depletion.py | 2 -- .../test_hingedRigidBodyStateEffector.py | 1 - .../_UnitTest/test_linearSpringMassDamper.py | 1 - .../test_nHingedRigidBodyStateEffector.py | 1 - .../_UnitTest/test_thruster_integrated_sim.py | 1 - .../test_VSCMGStateEffector_integrated.py | 1 - .../_GeneralModuleFiles/gravityEffector.rst | 1 - .../test_dualhingedRigidBodyStateEffector.py | 1 - .../test_extForceTorqueIntegrated.py | 2 -- .../_UnitTest/test_gravityDynEffector.py | 6 +---- .../_UnitTest/test_gravitySpacecraft.py | 7 ++---- .../gravityEffector/gravityEffector.i | 22 +++++++++++++++++++ .../test_PrescribedMotionStateEffector.py | 2 -- ...t_reactionWheelStateEffector_integrated.py | 1 - .../spacecraft/_UnitTest/test_spacecraft.py | 2 -- .../_UnitTest/test_multiSpacecraft.py | 2 -- .../test_spinningBodyOneDOFStateEffector.py | 1 - .../test_spinningBodyTwoDOFStateEffector.py | 1 - .../_UnitTests/test_scenarioBasicOrbitMC.py | 4 +--- 20 files changed, 26 insertions(+), 34 deletions(-) diff --git a/examples/scenarioLagrangePointOrbit.py b/examples/scenarioLagrangePointOrbit.py index 4a898e3bba..76efa17c67 100644 --- a/examples/scenarioLagrangePointOrbit.py +++ b/examples/scenarioLagrangePointOrbit.py @@ -184,7 +184,6 @@ def run(lagrangePoint, nOrbits, timestep, showPlots=True): gravFactory = simIncludeGravBody.gravBodyFactory() gravBodies = gravFactory.createBodies(['moon', 'earth']) gravBodies['earth'].isCentralBody = True - # Necessary to specify useSphericalHarmParams for Earth or Moon, and then load parameters from file? # Add gravity bodies to the spacecraft dynamics scObject.gravField.gravBodies = spacecraft.GravBodyVector(list(gravFactory.gravBodies.values())) diff --git a/src/simulation/dynamics/FuelTank/_UnitTest/test_mass_depletion.py b/src/simulation/dynamics/FuelTank/_UnitTest/test_mass_depletion.py index e19a1fb82e..d9dfa11c6c 100644 --- a/src/simulation/dynamics/FuelTank/_UnitTest/test_mass_depletion.py +++ b/src/simulation/dynamics/FuelTank/_UnitTest/test_mass_depletion.py @@ -119,7 +119,6 @@ def massDepletionTest(show_plots, thrusterType): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) @@ -292,7 +291,6 @@ def axisChangeHelper(r_BcB_B): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) diff --git a/src/simulation/dynamics/HingedRigidBodies/_UnitTest/test_hingedRigidBodyStateEffector.py b/src/simulation/dynamics/HingedRigidBodies/_UnitTest/test_hingedRigidBodyStateEffector.py index c1eb686272..336835e5a0 100644 --- a/src/simulation/dynamics/HingedRigidBodies/_UnitTest/test_hingedRigidBodyStateEffector.py +++ b/src/simulation/dynamics/HingedRigidBodies/_UnitTest/test_hingedRigidBodyStateEffector.py @@ -135,7 +135,6 @@ def hingedRigidBodyGravity(show_plots): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.primaryCentralSpacecraft.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) # Log the spacecraft state message diff --git a/src/simulation/dynamics/LinearSpringMassDamper/_UnitTest/test_linearSpringMassDamper.py b/src/simulation/dynamics/LinearSpringMassDamper/_UnitTest/test_linearSpringMassDamper.py index 8a62d29f46..880f83c7b6 100644 --- a/src/simulation/dynamics/LinearSpringMassDamper/_UnitTest/test_linearSpringMassDamper.py +++ b/src/simulation/dynamics/LinearSpringMassDamper/_UnitTest/test_linearSpringMassDamper.py @@ -178,7 +178,6 @@ def fuelSloshTest(show_plots,useFlag,testCase): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) scObject.hub.r_CN_NInit = [[-4020338.690396649], [7490566.741852513], [5248299.211589362]] scObject.hub.v_CN_NInit = [[-5199.77710904224], [-3436.681645356935], [1041.576797498721]] diff --git a/src/simulation/dynamics/NHingedRigidBodies/_UnitTest/test_nHingedRigidBodyStateEffector.py b/src/simulation/dynamics/NHingedRigidBodies/_UnitTest/test_nHingedRigidBodyStateEffector.py index 06d75ab3e9..ebdf835efe 100644 --- a/src/simulation/dynamics/NHingedRigidBodies/_UnitTest/test_nHingedRigidBodyStateEffector.py +++ b/src/simulation/dynamics/NHingedRigidBodies/_UnitTest/test_nHingedRigidBodyStateEffector.py @@ -162,7 +162,6 @@ def nHingedRigidBody(show_plots, testCase): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) scObject.hub.r_CN_NInit = [[-4020338.690396649], [7490566.741852513], [5248299.211589362]] scObject.hub.v_CN_NInit = [[-5199.77710904224], [-3436.681645356935], [1041.576797498721]] diff --git a/src/simulation/dynamics/Thrusters/thrusterDynamicEffector/_UnitTest/test_thruster_integrated_sim.py b/src/simulation/dynamics/Thrusters/thrusterDynamicEffector/_UnitTest/test_thruster_integrated_sim.py index 7830b3d99a..37674f48f4 100644 --- a/src/simulation/dynamics/Thrusters/thrusterDynamicEffector/_UnitTest/test_thruster_integrated_sim.py +++ b/src/simulation/dynamics/Thrusters/thrusterDynamicEffector/_UnitTest/test_thruster_integrated_sim.py @@ -99,7 +99,6 @@ def thrusterIntegratedTest(show_plots): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) diff --git a/src/simulation/dynamics/VSCMGs/_UnitTest/test_VSCMGStateEffector_integrated.py b/src/simulation/dynamics/VSCMGs/_UnitTest/test_VSCMGStateEffector_integrated.py index 6fdcb635b3..2bf4b9cad6 100644 --- a/src/simulation/dynamics/VSCMGs/_UnitTest/test_VSCMGStateEffector_integrated.py +++ b/src/simulation/dynamics/VSCMGs/_UnitTest/test_VSCMGStateEffector_integrated.py @@ -221,7 +221,6 @@ def VSCMGIntegratedTest(show_plots,useFlag,testCase): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) diff --git a/src/simulation/dynamics/_GeneralModuleFiles/gravityEffector.rst b/src/simulation/dynamics/_GeneralModuleFiles/gravityEffector.rst index 71f50372be..1c549126e5 100644 --- a/src/simulation/dynamics/_GeneralModuleFiles/gravityEffector.rst +++ b/src/simulation/dynamics/_GeneralModuleFiles/gravityEffector.rst @@ -61,7 +61,6 @@ Each gravity body data object can be created using:: earth.mu = 0.3986004415E+15 # meters^3/s^2 earth.radEquator = 6378136.6 # meters earth.isCentralBody = False - earth.useSphericalHarmParams = False Note that the ``simIncludeGradBody.py`` helper file contains a gravity body factor class to facilitate setting up gravity bodies. diff --git a/src/simulation/dynamics/dualHingedRigidBodies/_UnitTest/test_dualhingedRigidBodyStateEffector.py b/src/simulation/dynamics/dualHingedRigidBodies/_UnitTest/test_dualhingedRigidBodyStateEffector.py index 749c38d1e2..9f89ece3f4 100644 --- a/src/simulation/dynamics/dualHingedRigidBodies/_UnitTest/test_dualhingedRigidBodyStateEffector.py +++ b/src/simulation/dynamics/dualHingedRigidBodies/_UnitTest/test_dualhingedRigidBodyStateEffector.py @@ -140,7 +140,6 @@ def dualHingedRigidBodyTest(show_plots, useFlag, testCase): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) scObject.hub.r_CN_NInit = [[-4020338.690396649], [7490566.741852513], [5248299.211589362]] scObject.hub.v_CN_NInit = [[-5199.77710904224], [-3436.681645356935], [1041.576797498721]] diff --git a/src/simulation/dynamics/extForceTorque/_UnitTest/test_extForceTorqueIntegrated.py b/src/simulation/dynamics/extForceTorque/_UnitTest/test_extForceTorqueIntegrated.py index 92ec28d8ce..2743af20f6 100644 --- a/src/simulation/dynamics/extForceTorque/_UnitTest/test_extForceTorqueIntegrated.py +++ b/src/simulation/dynamics/extForceTorque/_UnitTest/test_extForceTorqueIntegrated.py @@ -71,7 +71,6 @@ def extForceBodyAndTorque(): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) @@ -165,7 +164,6 @@ def extForceInertialAndTorque(): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) diff --git a/src/simulation/dynamics/gravityEffector/_UnitTest/test_gravityDynEffector.py b/src/simulation/dynamics/gravityEffector/_UnitTest/test_gravityDynEffector.py index 4ec01e46ed..fd469185e5 100644 --- a/src/simulation/dynamics/gravityEffector/_UnitTest/test_gravityDynEffector.py +++ b/src/simulation/dynamics/gravityEffector/_UnitTest/test_gravityDynEffector.py @@ -317,8 +317,7 @@ def singleGravityBody(show_plots): gravBody1 = gravityEffector.GravBodyData() gravBody1.planetName = "earth_planet_data" gravBody1.isCentralBody = False - gravBody1.useSphericalHarmParams = True - gravityEffector.loadGravFromFile(path + '/GGM03S.txt', gravBody1.spherHarm, 60) + gravBody1.useSphericalHarmonicsGravityModel(path + '/GGM03S.txt', 60) gravBody1.planetBodyInMsg.subscribeTo(SpiceObject.planetStateOutMsgs[0]) # Use the python spice utility to load in spacecraft SPICE ephemeris data @@ -481,7 +480,6 @@ def multiBodyGravity(show_plots): gravBody1.mu = 1000000. gravBody1.radEquator = 6500. gravBody1.isCentralBody = False - gravBody1.useSphericalHarmParams = False gravBody1.localPlanet = localPlanetEditor #This is the gravityEffector which will actually compute the gravitational acceleration @@ -505,7 +503,6 @@ def multiBodyGravity(show_plots): gravBody2.mu = gravBody1.mu/2. gravBody2.radEquator = 6500. gravBody2.isCentralBody = False - gravBody2.useSphericalHarmParams = False gravBody2.localPlanet = localPlanetEditor #This is the gravityEffector which will actually compute the gravitational acceleration @@ -525,7 +522,6 @@ def multiBodyGravity(show_plots): gravBody3.mu = gravBody2.mu gravBody3.radEquator = 6500. gravBody3.isCentralBody = False - gravBody3.useSphericalHarmParams = False gravBody3.localPlanet = localPlanetEditor #This is the gravityEffector which will actually compute the gravitational acceleration diff --git a/src/simulation/dynamics/gravityEffector/_UnitTest/test_gravitySpacecraft.py b/src/simulation/dynamics/gravityEffector/_UnitTest/test_gravitySpacecraft.py index 799497c978..6c3b508559 100644 --- a/src/simulation/dynamics/gravityEffector/_UnitTest/test_gravitySpacecraft.py +++ b/src/simulation/dynamics/gravityEffector/_UnitTest/test_gravitySpacecraft.py @@ -83,9 +83,7 @@ def singleGravityBody(show_plots): gravFactory = simIncludeGravBody.gravBodyFactory() gravBodies = gravFactory.createBodies(['earth', 'sun', 'moon', 'jupiter barycenter']) gravBodies['earth'].isCentralBody = True - gravBodies['earth'].useSphericalHarmParams = True - simIncludeGravBody.loadGravFromFile(path + '/../_UnitTest/GGM03S.txt' - , gravBodies['earth'].spherHarm + gravBodies['earth'].useSphericalHarmonicsGravityModel(path + '/../_UnitTest/GGM03S.txt' , 40 ) stringCurrent = "2016 MAY 1 00:32:30.0" @@ -369,8 +367,7 @@ def polyGravityBody(show_plots): gravFactory = simIncludeGravBody.gravBodyFactory() polyBody = gravFactory.createCustomGravObject('eros', mu=mu) polyBody.isCentralBody = True - polyBody.usePolyhedral = True - simIncludeGravBody.loadPolyFromFile(path + '/../_UnitTest/EROS856Vert1708Fac.txt', polyBody.poly) + polyBody.usePolyhedralGravityModel(path + '/../_UnitTest/EROS856Vert1708Fac.txt') polyBody.planetBodyInMsg.subscribeTo(polyBodyEphem.planetOutMsgs[0]) # create an ephemeris converter diff --git a/src/simulation/dynamics/gravityEffector/gravityEffector.i b/src/simulation/dynamics/gravityEffector/gravityEffector.i index 2d5d56e724..35e0a1a6bc 100644 --- a/src/simulation/dynamics/gravityEffector/gravityEffector.i +++ b/src/simulation/dynamics/gravityEffector/gravityEffector.i @@ -29,6 +29,8 @@ from Basilisk.simulation.pointMassGravityModel import PointMassGravityModel from Basilisk.simulation.polyhedralGravityModel import PolyhedralGravityModel from Basilisk.simulation.sphericalHarmonicsGravityModel import SphericalHarmonicsGravityModel +from Basilisk.utilities import deprecated + Polyhedral = PolyhedralGravityModel SphericalHarmonics = SphericalHarmonicsGravityModel @@ -101,6 +103,16 @@ struct SpicePlanetStateMsg_C; @useSphericalHarmParams.setter def useSphericalHarmParams(self, value: bool): + deprecated.deprecationWarn( + GravBodyData.useSphericalHarmParams.__qualname__, + "2024/09/07", + "Using 'useSphericalHarmParams = True/False' to turn on/off the spherical harmonics" + " is deprecated. Prefer the following syntax:\n" + "\tplanet.useSphericalHarmonicsGravityModel('GGM2BData.txt', 100)\n" + "Over:\n" + "\tplanet.useSphericalHarmParams = True\n" + "\tsimIncludeGravBody.loadGravFromFile('GGM2BData.txt', planet.spherHarm, 100)" + ) if self.useSphericalHarmParams and not value: self.gravityModel = PointMassGravityModel() elif not self.useSphericalHarmParams and value: @@ -112,6 +124,16 @@ struct SpicePlanetStateMsg_C; @usePolyhedral.setter def usePolyhedral(self, value: bool): + deprecated.deprecationWarn( + GravBodyData.usePolyhedral.__qualname__, + "2024/09/07", + "Using 'usePolyhedral = True/False' to turn on/off the polyhedral model" + " is deprecated. Prefer the following syntax:\n" + "\tplanet.usePolyhedralGravityModel('eros.txt')\n" + "Over:\n" + "\tplanet.usePolyhedral = True\n" + "\tsimIncludeGravBody.loadPolyFromFile('eros.txt', planet.poly)" + ) if self.usePolyhedral and not value: self.gravityModel = PointMassGravityModel() elif not self.usePolyhedral and value: diff --git a/src/simulation/dynamics/prescribedMotion/_UnitTest/test_PrescribedMotionStateEffector.py b/src/simulation/dynamics/prescribedMotion/_UnitTest/test_PrescribedMotionStateEffector.py index 8fc80d9a6a..057c57157a 100644 --- a/src/simulation/dynamics/prescribedMotion/_UnitTest/test_PrescribedMotionStateEffector.py +++ b/src/simulation/dynamics/prescribedMotion/_UnitTest/test_PrescribedMotionStateEffector.py @@ -204,7 +204,6 @@ def PrescribedMotionTestFunction(show_plots, rotTest, thetaInit, theta_Ref, posI earthGravBody.planetName = "earth_planet_data" earthGravBody.mu = 0.3986004415E+15 earthGravBody.isCentralBody = True - earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([earthGravBody]) # Add energy and momentum variables to log @@ -442,7 +441,6 @@ def PrescribedMotionTestFunction(show_plots, rotTest, thetaInit, theta_Ref, posI earthGravBody.planetName = "earth_planet_data" earthGravBody.mu = 0.3986004415E+15 earthGravBody.isCentralBody = True - earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([earthGravBody]) # Add energy and momentum variables to log diff --git a/src/simulation/dynamics/reactionWheels/_UnitTest/test_reactionWheelStateEffector_integrated.py b/src/simulation/dynamics/reactionWheels/_UnitTest/test_reactionWheelStateEffector_integrated.py index ea8b810b6c..b732d71d18 100644 --- a/src/simulation/dynamics/reactionWheels/_UnitTest/test_reactionWheelStateEffector_integrated.py +++ b/src/simulation/dynamics/reactionWheels/_UnitTest/test_reactionWheelStateEffector_integrated.py @@ -191,7 +191,6 @@ def reactionWheelIntegratedTest(show_plots,useFlag,testCase): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) diff --git a/src/simulation/dynamics/spacecraft/_UnitTest/test_spacecraft.py b/src/simulation/dynamics/spacecraft/_UnitTest/test_spacecraft.py index c7d21220dc..205225b878 100644 --- a/src/simulation/dynamics/spacecraft/_UnitTest/test_spacecraft.py +++ b/src/simulation/dynamics/spacecraft/_UnitTest/test_spacecraft.py @@ -97,7 +97,6 @@ def SCTranslation(show_plots): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) @@ -230,7 +229,6 @@ def SCTransAndRotation(show_plots): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([unitTestSim.earthGravBody]) diff --git a/src/simulation/dynamics/spacecraftSystem/_UnitTest/test_multiSpacecraft.py b/src/simulation/dynamics/spacecraftSystem/_UnitTest/test_multiSpacecraft.py index 2053224f74..0fc90cb2b4 100644 --- a/src/simulation/dynamics/spacecraftSystem/_UnitTest/test_multiSpacecraft.py +++ b/src/simulation/dynamics/spacecraftSystem/_UnitTest/test_multiSpacecraft.py @@ -115,7 +115,6 @@ def SCConnected(show_plots): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scSystem.primaryCentralSpacecraft.gravField.gravBodies = spacecraftSystem.GravBodyVector([unitTestSim.earthGravBody]) @@ -389,7 +388,6 @@ def SCConnectedAndUnconnected(show_plots): unitTestSim.earthGravBody.planetName = "earth_planet_data" unitTestSim.earthGravBody.mu = 0.3986004415E+15 # meters! unitTestSim.earthGravBody.isCentralBody = True - unitTestSim.earthGravBody.useSphericalHarmParams = False scSystem.primaryCentralSpacecraft.gravField.gravBodies = spacecraftSystem.GravBodyVector([unitTestSim.earthGravBody]) diff --git a/src/simulation/dynamics/spinningBodies/spinningBodiesOneDOF/_UnitTest/test_spinningBodyOneDOFStateEffector.py b/src/simulation/dynamics/spinningBodies/spinningBodiesOneDOF/_UnitTest/test_spinningBodyOneDOFStateEffector.py index 71bf18cba8..362311e035 100644 --- a/src/simulation/dynamics/spinningBodies/spinningBodiesOneDOF/_UnitTest/test_spinningBodyOneDOFStateEffector.py +++ b/src/simulation/dynamics/spinningBodies/spinningBodiesOneDOF/_UnitTest/test_spinningBodyOneDOFStateEffector.py @@ -146,7 +146,6 @@ def spinningBody(show_plots, cmdTorque, lock): earthGravBody.planetName = "earth_planet_data" earthGravBody.mu = 0.3986004415E+15 # meters! earthGravBody.isCentralBody = True - earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([earthGravBody]) # Log the spacecraft state message diff --git a/src/simulation/dynamics/spinningBodies/spinningBodiesTwoDOF/_UnitTest/test_spinningBodyTwoDOFStateEffector.py b/src/simulation/dynamics/spinningBodies/spinningBodiesTwoDOF/_UnitTest/test_spinningBodyTwoDOFStateEffector.py index d880ba0f24..b6829f94a6 100644 --- a/src/simulation/dynamics/spinningBodies/spinningBodiesTwoDOF/_UnitTest/test_spinningBodyTwoDOFStateEffector.py +++ b/src/simulation/dynamics/spinningBodies/spinningBodiesTwoDOF/_UnitTest/test_spinningBodyTwoDOFStateEffector.py @@ -165,7 +165,6 @@ def spinningBody(show_plots, cmdTorque1, lock1, cmdTorque2, lock2): earthGravBody.planetName = "earth_planet_data" earthGravBody.mu = 0.3986004415E+15 # meters! earthGravBody.isCentralBody = True - earthGravBody.useSphericalHarmParams = False scObject.gravField.gravBodies = spacecraft.GravBodyVector([earthGravBody]) # Log the spacecraft state message diff --git a/src/utilities/MonteCarlo/_UnitTests/test_scenarioBasicOrbitMC.py b/src/utilities/MonteCarlo/_UnitTests/test_scenarioBasicOrbitMC.py index adba3eaf49..db56f87432 100644 --- a/src/utilities/MonteCarlo/_UnitTests/test_scenarioBasicOrbitMC.py +++ b/src/utilities/MonteCarlo/_UnitTests/test_scenarioBasicOrbitMC.py @@ -78,9 +78,7 @@ def myCreationFunction(): gravFactory = simIncludeGravBody.gravBodyFactory() planet = gravFactory.createEarth() planet.isCentralBody = True - planet.useSphericalHarmParams = True - simIncludeGravBody.loadGravFromFile(bskPath + '/supportData/LocalGravData/GGM03S-J2-only.txt' - , planet.spherHarm + planet.useSphericalHarmonicsGravityModel(bskPath + '/supportData/LocalGravData/GGM03S-J2-only.txt' , 2 ) scObject.gravField.gravBodies = spacecraft.GravBodyVector([planet])