Skip to content

Commit de6a5dc

Browse files
committed
[#946] Fix calculation in spacecraftLocation
1 parent 97186c0 commit de6a5dc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/source/Support/bskReleaseNotes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Version |release|
3232
using only a header-defaulted destructor with ``= default;`` syntax.
3333
- Fixed issue where reaction wheels with unlimited torque (``useMaxTorque=False``) would end simulation prematurely
3434
- Added safety mechanism to limit excessive wheel acceleration and provide warning messages
35+
- Fix a bug in the :ref:`SpacecraftLocation` module.
3536

3637

3738
Version 2.6.0 (Feb. 21, 2025)

src/simulation/environment/spacecraftLocation/spacecraftLocation.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,13 @@ void SpacecraftLocation::computeAccess()
183183
// compute point of closest approach
184184
double param; // line scaling parameter
185185
param = - r_LP_P.dot(r_SL_P)/r_SL_P.dot(r_SL_P);
186-
Eigen::Vector3d rClose = r_LP_P + param * r_SL_P;
187186

188187
// check for out of bounds condition.
189188
param = std::min(param, 1.0); // If param > 1, the closest point on segment is the other satellite
190189
param = std::max(param, 0.0); // If param < 0, the closest point on segment is the primary satellite
191190

191+
Eigen::Vector3d rClose = r_LP_P + param * r_SL_P;
192+
192193
// determine access output message
193194
this->accessMsgBuffer.at(c) = this->accessOutMsgs.at(c)->zeroMsgPayload;
194195
if (rClose.norm() > this->rEquator) {

0 commit comments

Comments
 (0)