Skip to content

Deprecate SpacecraftSystem BSK module #1002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/Support/bskReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Version |release|
- Pinned python dependencies to avoid issues with new package versions.
- Added a new github workflow job ``canary`` to routinely check the compatibility of latest python dependencies with python 3.13 on the latest mac-os.
- Fixed a bug in :ref:`spiceInterface` where multiple instances of the module were not properly managing SPICE kernel references, leading to potential conflicts and data corruption.
- Deprecated :ref:`SpacecraftSystem`. It was never completed and we have other ways to connect spacecraft components


Version 2.7.0 (April 20, 2025)
------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from Basilisk.simulation import extForceTorque
from Basilisk.simulation import spacecraftSystem
from Basilisk.architecture import messaging
from Basilisk.utilities import deprecated

# uncomment this line is this test is to be skipped in the global unit test run, adjust message as needed
# @pytest.mark.skipif(conditionstring)
Expand Down Expand Up @@ -68,8 +69,10 @@ def test_hingedRigidBodyMotorTorque(show_plots, useScPlus):
[testResults, testMessage] = hingedRigidBodyMotorTorque(show_plots, useScPlus)
assert testResults < 1, testMessage


def hingedRigidBodyGravity(show_plots):
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down Expand Up @@ -300,6 +303,7 @@ def hingedRigidBodyNoGravity(show_plots):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down Expand Up @@ -531,6 +535,7 @@ def hingedRigidBodyNoGravityDamping(show_plots):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down Expand Up @@ -720,6 +725,7 @@ def hingedRigidBodyThetaSS(show_plots):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down Expand Up @@ -912,6 +918,7 @@ def hingedRigidBodyFrequencyAmp(show_plots):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down Expand Up @@ -1194,6 +1201,7 @@ def hingedRigidBodyMotorTorque(show_plots, useScPlus):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down Expand Up @@ -1434,6 +1442,7 @@ def hingedRigidBodyLagrangVsBasilisk(show_plots):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down Expand Up @@ -1877,10 +1886,10 @@ class boxAndWingParameters:
d = 0

if __name__ == "__main__":
# test_hingedRigidBodyGravity(True)
# test_hingedRigidBodyNoGravity(True)
# test_hingedRigidBodyNoGravityDamping(True)
# test_hingedRigidBodyThetaSS(True)
# test_hingedRigidBodyFrequencyAmp(True)
# test_hingedRigidBodyMotorTorque(True, True)
hingedRigidBodyLagrangVsBasilisk(True)
hingedRigidBodyGravity(False)
# hingedRigidBodyNoGravity(True)
# hingedRigidBodyNoGravityDamping(True)
# hingedRigidBodyThetaSS(True)
# hingedRigidBodyFrequencyAmp(True)
# hingedRigidBodyMotorTorque(True, True)
# hingedRigidBodyLagrangVsBasilisk(True)
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from Basilisk.utilities import pythonVariableLogger
from Basilisk.simulation import spacecraftSystem
from Basilisk.architecture import messaging
from Basilisk.utilities import deprecated

@pytest.mark.parametrize("useFlag, testCase", [
(False, 'NoGravity'),
Expand All @@ -60,16 +61,16 @@ def dualHingedRigidBodyTest(show_plots, useFlag, testCase):

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages

scObject = spacecraft.Spacecraft()
scObject.ModelTag = "spacecraftBody"

unitTaskName = "unitTask" # arbitrary name (don't change)
unitProcessName = "TestProcess" # arbitrary name (don't change)

# Create a sim module as an empty container
unitTestSim = SimulationBaseClass.SimBaseClass()

# Create test thread
testProcessRate = macros.sec2nano(0.0001) # update process rate update time
testProc = unitTestSim.CreateNewProcess(unitProcessName)
Expand Down Expand Up @@ -271,6 +272,7 @@ def dualHingedRigidBodyMotorTorque(show_plots, useScPlus):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from Basilisk.utilities import pythonVariableLogger
from Basilisk.simulation import gravityEffector
from Basilisk.simulation import hingedRigidBodyStateEffector
from Basilisk.utilities import deprecated


def addTimeColumn(time, data):
Expand Down Expand Up @@ -66,6 +67,7 @@ def SCConnected(show_plots):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down Expand Up @@ -343,6 +345,7 @@ def SCConnectedAndUnconnected(show_plots):
# the mrp_steering_tracking() function will not be shown unless the
# --fulltrace command line option is specified.
__tracebackhide__ = True
deprecated.filterwarnings("ignore", "SpacecraftSystem.SpacecraftSystem")

testFailCount = 0 # zero unit test result counter
testMessages = [] # create empty list to store test log messages
Expand Down
3 changes: 3 additions & 0 deletions src/simulation/dynamics/spacecraftSystem/spacecraftSystem.i
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ from Basilisk.simulation.gravityEffector import GravBodyVector
%include "swig_eigen.i"
%include "swig_conly_data.i"

%include "swig_deprecated.i"
%deprecated_function(SpacecraftSystem::SpacecraftSystem, "2026/05/25", "Move to regular spacecraft class and connect with constraintDynamicEffector.")

%include "sys_model.i"
%include "../_GeneralModuleFiles/dynParamManager.i"
%include "../_GeneralModuleFiles/dynamicObject.h"
Expand Down