Skip to content

Commit 2555bb4

Browse files
committed
Clean up formatting
1 parent 5486ac0 commit 2555bb4

File tree

172 files changed

+749
-819
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+749
-819
lines changed

docs/source/Learn/bskPrinciples/bskPrinciples-10.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.. _bskPrinciples-10:
22

3-
.. warning::
3+
.. warning::
44

55
This section refers to a deprecated way of operating with C modules. Refer to previous documentation pages for the updated way.
66

77
Deprecated: Using old-style C modules
88
=====================================
99
In more recent Basilisk scripts, whether a module is implemented in C++ or C should not make
1010
any difference on how this module is used in Python scripts. However, this has not always been
11-
the case, and you might encounter some code that uses the older syntax. This documentation
11+
the case, and you might encounter some code that uses the older syntax. This documentation
1212
summarizes how to use this older syntax.
1313

1414
Previous documentation pages have taught us that C++ modules (and new-syntax C modules) are
@@ -27,13 +27,13 @@ In order to perform the same operations on an old-syntax C module, one would do:
2727
moduleWrap.modelTag = "someModuleName"
2828
scSim.AddModelToTask("taskName", moduleWrap, moduleConfig, priority)
2929

30-
Note that in this case, we created a "Config" object ``someModule.someModuleConfig``. Connecting
30+
Note that in this case, we created a "Config" object ``someModule.someModuleConfig``. Connecting
3131
messages and setting parameters of the module is done through this object. Then, the ``setModelDataWrap``
3232
method of the simulation object is called on the "Config" object, which generates the "Wrap" object.
3333
The unique name must be set on the "Wrap" object. Finally, the module is added to the simulation by
3434
using both the "Wrap" and "Config" objects in the ``scSim.AddModelToTask`` method.
3535

36-
The need for separate "Config" and "Wrap" objects arises from the lack of classes in the C programming language.
36+
The need for separate "Config" and "Wrap" objects arises from the lack of classes in the C programming language.
3737
The "Config" objects, as well as the relevant ``updateState``, ``Reset``, and ``SelfInit`` methods,
3838
are written in pure C for C modules. However, the simulation framework is written in C++ and it expects
3939
the modules to be C++ classes. The "Wrap" object is this C++ class, which holds references to

docs/source/Learn/bskPrinciples/bskPrinciples-11.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.. _bskPrinciples-11:
44

5-
.. warning::
5+
.. warning::
66

77
This section refers to a deprecated way of logging variables. Refer to previous documentation pages for the updated way.
88

docs/source/Learn/bskPrinciples/bskPrinciples-2a.rst

-2
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@ If you execute this python code you should see the following terminal output:
4444
0.0
4545
BSK_INFORMATION: C Module ID 1 ran Update at 0.000000s
4646
1.0
47-
48-

docs/source/Learn/bskPrinciples/bskPrinciples-8.rst

-2
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,3 @@ To disable a single task, this is done with the :ref:`SimulationBaseClass` metho
4545
BSK executed a single simulation step
4646
BSK_INFORMATION: C Module ID 1 ran Update at 4.000000s
4747
BSK executed a single simulation step
48-
49-

docs/source/Learn/bskPrinciples/bskPrinciples-9.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ at 1Hz as this method is called at the task update period.
3232
The integration type is determined by the integrator assigned to the primary ``DynamicObject`` to
3333
which the other ``DynamicObject`` integrations is synchronized. By default this is the ``RK4``
3434
integrator. It doesn't matter what integrator is assigned to the secondary ``DynamicObject`` instances,
35-
the integrator of the primary object is used.
35+
the integrator of the primary object is used.

docs/source/Learn/makingModules/advancedTopics/creatingDynObject.rst

-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ scenarios as with the spacecraft example. See the discussion in :ref:`bskPrinci
3535
Basilisk modules that inherit from the ``DynamicObject`` class can be linked. If linked,
3636
then the associated module ordinate differential equations (ODEs) are integrated
3737
simultaneously.
38-

docs/source/Learn/makingModules/cModules/cModules-1.rst

-1
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,3 @@ For example, assume the module needs an array of input messages of type ``SomeMs
8383
The module needs to implement separate logic to determine how many messages have been set. For example, the reset function could loop over this array and up to what slot the associate message object has been linked.
8484

8585
As the C wrapped message object can act as either input or output messages, the above example can readily be converted to an outpout message example by renaming the array variable ``moreOutMsgs``.
86-

docs/source/Learn/makingModules/cModules/cModules-3.rst

-1
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,3 @@ Assume the module has an array called ``moreInMsgs`` which contain input message
101101
.. code:: cpp
102102
103103
inMsgBuffer = SomeMsg_C_read(&configData->moreInMsgs[3]);
104-

docs/source/Learn/makingModules/cppModules/cppModules-1.rst

-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,3 @@ To define a vector of output messages, we define a vector of message pointer usi
105105
106106
public:
107107
std::vector<Message<SomeMsgPayload>*> moreOutMsgs; //!< variable description
108-

docs/source/Learn/makingModules/cppModules/cppModules-3.rst

-1
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,3 @@ Note that with the ``new`` call above the memory associated with this output mes
110110
delete this->moreOutMsgs.at(c);
111111
}
112112
}
113-

docs/source/Learn/makingModules/pyModules.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Making Python Modules
99

1010
Python modules are a good alternative to C and C++ modules for quick prototyping.
1111
They are defined entirely in a Python script, which means that there is no need
12-
for a header (``.h``), definition (``.cpp``), or SWIG interface file (``.i``). However, they
12+
for a header (``.h``), definition (``.cpp``), or SWIG interface file (``.i``). However, they
1313
are much slower than C or C++ modules, which will significantly slow down your simulation.
1414

15-
Python modules are implemented by subclassing ``SysModel`` from ``Basilisk.architecture.sysModel``.
15+
Python modules are implemented by subclassing ``SysModel`` from ``Basilisk.architecture.sysModel``.
1616
Then, one can implement the ``__init__``,
1717
``Reset``, and ``updateState`` methods in the same way that one would
1818
implement these methods in C++. Remember to always call ``__init__`` of

docs/source/Support/bskReleaseNotes.rst

+14-14
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Version 2.3.0 (April 5, 2024)
4343
- Fixed a python version checking bug that prevented Basilisk from compiling on Windows
4444
- Created a new example scenario :ref:`scenarioHaloOrbit` demonstrating a near-Halo orbit simulation
4545
- Updated versioning to better follow the `semantic versioning <https://semver.org>`_ standard, in the format
46-
``MAJOR.MINOR.PATCH``. Releases will increment the minor version number, while pull requests into develop will
47-
automatically increment the patch number. This allows users to reference/require specific versions of Basilisk
46+
``MAJOR.MINOR.PATCH``. Releases will increment the minor version number, while pull requests into develop will
47+
automatically increment the patch number. This allows users to reference/require specific versions of Basilisk
4848
outside of the release cycle.
4949
Online documentation is only built for the ``MAJOR.MINOR.0`` releases
5050
- updated plotting of ``opNav`` example scenarios to work again with latest version of ``matplotlib``
@@ -164,7 +164,7 @@ Version 2.2.1 (Dec. 22, 2023)
164164
- Added a new method ``setDataBuffer()`` to :ref:`simpleStorageUnit` and :ref:`partitionedStorageUnit` to add or remove data from specified partitions.
165165
- Refactored ``simIncludeGravBody``. The most notable change for users is that the commonly used line
166166
``scObject.gravField.gravBodies = spacecraft.GravBodyVector(list(gravFactory.gravBodies.values()))``
167-
can be replaced by ``gravFactory.addBodiesTo(scObject)`` (where ``scObject`` is a ``spacecraft.Spacecraft``
167+
can be replaced by ``gravFactory.addBodiesTo(scObject)`` (where ``scObject`` is a ``spacecraft.Spacecraft``
168168
or ``spacecraftSystem.SpacecraftSystem``, and ``gravFactory`` is a ``simIncludeGravBody.gravBodyFactory``)
169169
- Added condition in :ref:`thrustCMEstimation` to avoid measurement updates when input ``attGuidInMsg`` has not been written.
170170
- Added :ref:`scenarioSepMomentumManagement` to show how to use a dual-gimbaled electric thruster to perform contunuous
@@ -218,7 +218,7 @@ Version 2.2.0 (June 28, 2023)
218218
- Refactored the :ref:`prescribedMotionStateEffector` dynamics module to vary the prescribed states across the dynamics
219219
integration time step.
220220
- The encryption build option for the project's conan zmq dependency is disabled because it is uneeded.
221-
- Added an optional ``controllerStatus`` variable and ``deviceStatusInMsg`` message to the :ref:`simpleInstrumentController` to
221+
- Added an optional ``controllerStatus`` variable and ``deviceStatusInMsg`` message to the :ref:`simpleInstrumentController` to
222222
match the functionality of the corresponding data and power modules
223223
- Corrected tasks priorities in several scenarios and added checks in two modules to ensure that C MSG read errors are not thrown
224224
- Reworked how integrators are implemented. New Runge-Kutta integrators may
@@ -376,7 +376,7 @@ Version 2.1.4 (Oct. 1, 2022)
376376
- added new attitude pointing scenario :ref:`scenarioAttitudeFeedback2T_stateEffTH` that uses
377377
the new :ref:`thrusterStateEffector`
378378
- added ability to simulate faults within :ref:`coarseSunSensor` module
379-
- created a 1-DoF rotating rigid body class ``SpinningBodyStateEffector``. It is built in a general way to simulate
379+
- created a 1-DoF rotating rigid body class ``SpinningBodyStateEffector``. It is built in a general way to simulate
380380
any effector with a single spinning axis.
381381

382382

@@ -456,7 +456,7 @@ Version 2.1.1 (Dec. 15, 2021)
456456

457457
Version 2.1.0 (Nov. 13, 2021)
458458
-----------------------------
459-
- added BSpline function to ``utilities`` and related UnitTest.
459+
- added BSpline function to ``utilities`` and related UnitTest.
460460
- added kinematic relations between angular accelerations and second derivative of MRP set to
461461
:ref:`rigidBodyKinematicsutilities` library
462462
- updated the installation script to function with the latest ``conan`` program and the recent
@@ -473,7 +473,7 @@ Version 2.1.0 (Nov. 13, 2021)
473473
- added new scenario :ref:`scenarioVariableTimeStepIntegrators`
474474
- updated :ref:`scenarioIntegrators` to include the ``rkf45`` and ``rkf78`` options
475475
- changed the way :ref:`spacecraftReconfig` gets the deputy's mass properties. It now receives that information
476-
through a message of the type ``VehicleConfigMsgPayload`` instead of an internal variable. Relevant example
476+
through a message of the type ``VehicleConfigMsgPayload`` instead of an internal variable. Relevant example
477477
scripts have been updated.
478478
- new tutorial example scenario script :ref:`scenarioTAMcomparison`
479479
- new mass sensor that converts a ``simulation`` mass properties message to a ``FSW`` vehicle configuration message :ref:`simpleMassProps`
@@ -518,13 +518,13 @@ Version 2.0.6
518518
using the above new MTB related modules to change the momentum, as well as drive the nominal momentum to
519519
a desired value using :ref:`rwNullSpace`.
520520
- created a new architecture based on ``BskSim`` called ``MultiSatBskSim``. It exploits the new messaging system to create a simulation
521-
with any number of spacecraft in a highly modular way. It allows for the addition of homogeneous or heterogeneous satellites without
521+
with any number of spacecraft in a highly modular way. It allows for the addition of homogeneous or heterogeneous satellites without
522522
having to hard code their properties into a single dynamics or FSW script. It will be a foundation to test the upcoming multithreading
523523
capabilities of Basilisk.
524-
- added three example scenarios that showcase this new architecture. See :ref:`scenario_BasicOrbitMultiSat`, :ref:`scenario_AttGuidMultiSat`
524+
- added three example scenarios that showcase this new architecture. See :ref:`scenario_BasicOrbitMultiSat`, :ref:`scenario_AttGuidMultiSat`
525525
and :ref:`scenario_StationKeepingMultiSat`.
526526
- added a new FSW module :ref:`formationBarycenter`. It computes the barycenter's position and velocity of a swarm of satellites. This barycenter
527-
can be either computed with cartesian coordinates (usual mass-weighted average), or using orbital elements weighted average. Will be useful
527+
can be either computed with cartesian coordinates (usual mass-weighted average), or using orbital elements weighted average. Will be useful
528528
for spacecraft formations defined around the barycenter of the swarm and not a chief spacecraft.
529529
- enhanced :ref:`locationPointing` to support the target input msg being either a location message or an
530530
ephemeris message
@@ -558,7 +558,7 @@ Version 2.0.5
558558
two modules are connected
559559
- updated :ref:`gravityEffector` documentation to properly pull in the RST documentation and link to the
560560
PDF describing the gravity models
561-
- updated ``setAllButCurrentEventActivity`` method in :ref:`SimulationBaseClass` to work with multiple satellites. We can now add an index at the
561+
- updated ``setAllButCurrentEventActivity`` method in :ref:`SimulationBaseClass` to work with multiple satellites. We can now add an index at the
562562
end of each event name that guarantees only events with the same index are affected. The ``useIndex`` flag must be set to ``True``.
563563
- added new magnetic torque bar effector in :ref:`MtbEffector`
564564
- added new FSW module to control the RW momentum using MTBs in :ref:`mtbMomentumManagement`
@@ -764,7 +764,7 @@ Version 2.0.0
764764
- updated ``spacecraftPlus`` to allow the attitude motion to be prescribed through
765765
an optional input message of type ``attRefMsg``.
766766
- fixed sign issue in :ref:`simpleSolarPanel`
767-
- support Vizard 1.6.0 scripting
767+
- support Vizard 1.6.0 scripting
768768

769769

770770

@@ -862,7 +862,7 @@ Version 2.0.0
862862
BSK messages. For example, this allows :ref:`vizInterface` store the simulation data into a Vizard compatible manner.
863863
- Updated :ref:`spiceInterface` to allow for optional overriding the IAU planet frame with custom values
864864
- Updated :ref:`vizInterface` to allow setting ``show24hrClock`` and ``showDataRateDisplay`` flags for Vizard files
865-
supported in Vizard v1.3.0
865+
supported in Vizard v1.3.0
866866

867867
Version 1.7.4
868868

@@ -1143,7 +1143,7 @@ simple and robust solution.
11431143

11441144
- added new tutorial on calling Python Spice functions within a Monte Carlo BSK simulation
11451145
- Added Keplerian Orbit utility class which is swig'd. This first implementation takes in elliptical orbit elements and can produce a range of related outputs like position, velocity, orbital period, etc. This makes it easier to create Keplerian orbits within python.
1146-
- Added a LimbFinding module for OpNav: limbFinding. This module performs a Canny transform to find the end of the planet and saves away the non-zero pixels for pose-estimation.
1146+
- Added a LimbFinding module for OpNav: limbFinding. This module performs a Canny transform to find the end of the planet and saves away the non-zero pixels for pose-estimation.
11471147
- made BSK compatible with both swig version 3 and 4
11481148

11491149
.. raw:: html

docs/source/Vizard/vizardAdvanced/vizardSettings.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ cones can be setup in Vizard, but can also be scripted from Basilisk
416416
using the helper function ``createConeInOut``:
417417

418418
.. code-block::
419-
419+
420420
viz = vizSupport.enableUnityVisualization(scSim, simTaskName, scObject, saveFile=fileName)
421421
vizSupport.createConeInOut(viz, toBodyName='earth', coneColor='teal',
422422
normalVector_B=[1, 0, 0], incidenceAngle=30\ macros.D2R, isKeepIn=True,
423423
coneHeight=5.0, coneName=‘sensorCone’)
424424
vizSupport.createConeInOut(viz,toBodyName='earth', coneColor='blue', normalVector_B=[0, 1, 0],
425425
incidenceAngle=30\ macros.D2R, isKeepIn=False, coneHeight=5.0, coneName=‘comCone’)]
426-
426+
427427
The following table illustrates the
428428
arguments for the ``createConeInOut`` method:
429429

@@ -1829,5 +1829,3 @@ the MSM radii are stored in the list ``rListDebris``. The sample code is::
18291829
, saveFile=fileName
18301830
, msmInfoList=[msmInfoDebris]
18311831
)
1832-
1833-

examples/BskSim/models/BSK_FormationDynamics.py

-1
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,3 @@ def InitAllDynObjects(self):
140140
self.SetSimpleNavObject()
141141
self.SetReactionWheelDynEffector()
142142
self.SetExternalForceTorqueObject()
143-

examples/BskSim/models/BSK_SEPDynamics.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import numpy as np
2020
from Basilisk.utilities import (macros as mc, unitTestSupport as sp, RigidBodyKinematics as rbk, simIncludeRW)
2121
from Basilisk.simulation import (spacecraft, simpleNav, simpleMassProps, reactionWheelStateEffector,
22-
ReactionWheelPower, boreAngCalc, spinningBodyOneDOFStateEffector,
22+
ReactionWheelPower, boreAngCalc, spinningBodyOneDOFStateEffector,
2323
spinningBodyTwoDOFStateEffector, thrusterStateEffector, facetSRPDynamicEffector)
2424
from Basilisk.architecture import messaging
2525

@@ -168,8 +168,8 @@ def SetRotatingSolarArrays(self):
168168
self.RSAList[0].r_SB_B = [0.5 * 1.53, 0.0, 0.44]
169169
self.RSAList[0].r_ScS_S = [-0.036, 2.827, -0.469]
170170
self.RSAList[0].sHat_S = [0, 1, 0]
171-
self.RSAList[0].dcm_S0B = [[0, 0, -1],
172-
[1, 0, 0],
171+
self.RSAList[0].dcm_S0B = [[0, 0, -1],
172+
[1, 0, 0],
173173
[0, -1, 0]]
174174
self.RSAList[0].IPntSc_S = [[319.0, 0.0, 0.0],
175175
[0.0, 185.0, 0.0],
@@ -310,7 +310,7 @@ def SetSEPTrusterStateEffectors(self):
310310
self.SEPThruster1.kappaInit = messaging.DoubleVector([0.0])
311311
self.SEPThruster1.modelTag = "SEPThruster1"
312312
self.scObject.addStateEffector(self.SEPThruster1)
313-
313+
314314
self.SEPThruster2.addThruster(thruster, self.platform2.spinningBodyConfigLogOutMsgs[1])
315315
self.SEPThruster2.kappaInit = messaging.DoubleVector([0.0])
316316
self.SEPThruster2.modelTag = "SEPThruster2"
@@ -387,4 +387,3 @@ def InitAllDynObjects(self, SimBase):
387387
self.SetInertialBoresight2(SimBase)
388388
self.SetSEPTrusterStateEffectors()
389389
self.SetFacetSRPDynamicEffector(SimBase)
390-

examples/BskSim/scenarios/scenario_SEPPoint.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __init__(self, numberSpacecraft, prescribed):
102102
else:
103103
scBodyList.append([self.DynModels[i].platform1.modelTag, self.DynModels[i].platform1.spinningBodyConfigLogOutMsgs[1]])
104104
for j in range(self.DynModels[i].numRSA):
105-
scBodyList.append([self.DynModels[i].RSAList[j].modelTag, self.DynModels[i].RSAList[j].spinningBodyConfigLogOutMsg])
105+
scBodyList.append([self.DynModels[i].RSAList[j].modelTag, self.DynModels[i].RSAList[j].spinningBodyConfigLogOutMsg])
106106

107107
# Enable Vizard
108108
viz = vizSupport.enableUnityVisualization(self, self.DynModels[0].taskName, scBodyList, saveFile=__file__)
@@ -267,7 +267,7 @@ def log_outputs(self):
267267
self.AddModelToTask(DynModels[sc].taskName, self.platformRefAngleLogs[0])
268268
self.platformRefAngleLogs.append(FswModels[sc].platform2ReferenceData.hingedRigidBodyRef2OutMsg.recorder(self.samplingTime))
269269
self.AddModelToTask(DynModels[sc].taskName, self.platformRefAngleLogs[1])
270-
270+
271271
if thrusterFlag == 1:
272272
# log platform torques
273273
if not self.prescribed:
@@ -395,7 +395,7 @@ def pull_outputs(self, show_plots, spacecraftIndex):
395395
T_F = [0, 0, 0.1]
396396
for i in range(len(dataCMLocation)):
397397
r_CM_B = r_BM_B + dataCMLocation[i]
398-
398+
399399
if not self.prescribed:
400400
theta1 = dataPlatformAngle[0][i]
401401
theta2 = dataPlatformAngle[1][i]

examples/MultiSatBskSim/modelsMultiSat/BSK_MultiSatDynamics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def SetFuelTank(self):
183183
self.fuelTankStateEffector.r_TB_B = [[0.0], [0.0], [0.0]]
184184
self.tankModel.radiusTankInit = 1
185185
self.tankModel.lengthTank = 1
186-
186+
187187
# Add the tank and connect the thrusters
188188
self.scObject.addStateEffector(self.fuelTankStateEffector)
189189
self.fuelTankStateEffector.addThrusterSet(self.thrusterDynamicEffector)

examples/OpNavScenarios/modelsOpNav/BSK_OpNavDynamics.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def SetEphemConvert(self):
369369
def SetSimpleGrav(self):
370370
planet = self.gravFactory.createMarsBarycenter()
371371
planet.isCentralBody = True
372-
372+
373373
self.gravFactory.addBodiesTo(self.scObject)
374374

375375
# Global call to initialize every module
@@ -387,5 +387,3 @@ def InitAllDynObjects(self, SimBase):
387387
self.SetEphemConvert()
388388
self.SetCamera()
389389
self.SetCamera2()
390-
391-

0 commit comments

Comments
 (0)