diff --git a/docs/source/Support/bskKnownIssues.rst b/docs/source/Support/bskKnownIssues.rst index d9de4506f30..36e30d94543 100644 --- a/docs/source/Support/bskKnownIssues.rst +++ b/docs/source/Support/bskKnownIssues.rst @@ -24,6 +24,9 @@ Version |release| 3.7 upgrade. - Monte Carlo now applies nested dispersion paths and randomized ``RNGSeed`` modifications to the actual simulation objects. +- The :ref:`linearTranslationNDOFStateEffector` getter assertion no longer references the spinning-body-only + degree-of-freedom counter, fixing source builds where that assertion is compiled. The related + :ref:`spinningBodyNDOFStateEffector` getter assertion now rejects the first out-of-range index. - SWIG 4.4.0 caused Basilisk build failures in some Python 3.13+ source-build configurations. Basilisk now requires SWIG 4.4.1 or a newer supported 4.x release, which provides SWIG ABI 5 support for Basilisk and compatible plugins. If source builds fail with SWIG 4.4.0 or emit diff --git a/docs/source/Support/bskReleaseNotesSnippets/linear-translation-ndof-getter-build.rst b/docs/source/Support/bskReleaseNotesSnippets/linear-translation-ndof-getter-build.rst new file mode 100644 index 00000000000..13e81c6f5b7 --- /dev/null +++ b/docs/source/Support/bskReleaseNotesSnippets/linear-translation-ndof-getter-build.rst @@ -0,0 +1 @@ +- Fixed N-DoF getter assertions in :ref:`linearTranslationNDOFStateEffector` and :ref:`spinningBodyNDOFStateEffector`. diff --git a/src/simulation/dynamics/linearTranslationalBodies/linearTranslationBodiesNDOF/linearTranslationNDOFStateEffector.cpp b/src/simulation/dynamics/linearTranslationalBodies/linearTranslationBodiesNDOF/linearTranslationNDOFStateEffector.cpp index 06631b1221a..dd041982987 100644 --- a/src/simulation/dynamics/linearTranslationalBodies/linearTranslationBodiesNDOF/linearTranslationNDOFStateEffector.cpp +++ b/src/simulation/dynamics/linearTranslationalBodies/linearTranslationBodiesNDOF/linearTranslationNDOFStateEffector.cpp @@ -110,7 +110,7 @@ void LinearTranslationNDOFStateEffector::addTranslatingBody(const std::shared_pt /*! This method is used to get a translating body. */ std::shared_ptr LinearTranslationNDOFStateEffector::getTranslatingBody(uint64_t index) { - assert(("Index can't be greater than the number of degrees of freedom of the effector", index <= this->numberOfDegreesOfFreedom)); + assert(("Index must be less than the number of translating body axes", index < static_cast(this->N))); return this->translatingBodyVec.at(index); } diff --git a/src/simulation/dynamics/spinningBodies/spinningBodiesNDOF/spinningBodyNDOFStateEffector.cpp b/src/simulation/dynamics/spinningBodies/spinningBodiesNDOF/spinningBodyNDOFStateEffector.cpp index a187de8d894..fb69f9f17ff 100644 --- a/src/simulation/dynamics/spinningBodies/spinningBodiesNDOF/spinningBodyNDOFStateEffector.cpp +++ b/src/simulation/dynamics/spinningBodies/spinningBodiesNDOF/spinningBodyNDOFStateEffector.cpp @@ -113,7 +113,8 @@ void SpinningBodyNDOFStateEffector::addSpinningBody(const std::shared_ptr SpinningBodyNDOFStateEffector::getSpinningBody(uint64_t index) { - assert(("Index can't be greater than the number of degrees of freedom of the effector", index <= this->numberOfDegreesOfFreedom)); + assert(("Index must be less than the number of degrees of freedom of the effector", + index < static_cast(this->numberOfDegreesOfFreedom))); return this->spinningBodyVec.at(index); }