Skip to content

Commit 3cdfedc

Browse files
authored
Merge pull request #977 from AVSLab/refactor/fix-dcm-name-in-prescribed-motion
Correct dcm_BF to dcm_BP in prescribedMotion
2 parents 2802535 + 639da1e commit 3cdfedc

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/simulation/dynamics/prescribedMotion/prescribedMotionStateEffector.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,16 @@ void PrescribedMotionStateEffector::updateEffectorMassProps(double integTime)
168168
// Compute dcm_PM
169169
this->dcm_PM = (this->sigma_PM.toRotationMatrix()).transpose();
170170

171-
// Compute dcm_BF
172-
this->dcm_BF = this->dcm_BM * this->dcm_PM.transpose();
171+
// Compute dcm_BP
172+
this->dcm_BP = this->dcm_BM * this->dcm_PM.transpose();
173173

174174
// Compute omega_PB_B given the user inputs omega_MB_M and omega_PM_P
175-
this->omega_PM_B = this->dcm_BF * this->omega_PM_P;
175+
this->omega_PM_B = this->dcm_BP * this->omega_PM_P;
176176
this->omega_PB_B = this->omega_PM_B + this->omega_MB_B;
177177

178178
// Compute omegaPrime_PB_B given the user inputs
179179
this->omegaTilde_PB_B = eigenTilde(this->omega_PB_B);
180-
this->omegaPrime_PM_B = this->dcm_BF * this->omegaPrime_PM_P;
180+
this->omegaPrime_PM_B = this->dcm_BP * this->omegaPrime_PM_P;
181181
this->omegaPrime_PB_B = this->omegaPrime_PM_B + this->omegaTilde_PB_B * this->omega_PM_B;
182182

183183
// Convert the prescribed variables to the B frame
@@ -187,13 +187,13 @@ void PrescribedMotionStateEffector::updateEffectorMassProps(double integTime)
187187

188188
// Compute the effector's CoM with respect to point B
189189
this->r_PB_B = this->r_PM_B + this->r_MB_B;
190-
this->r_PcP_B = this->dcm_BF * this->r_PcP_P;
190+
this->r_PcP_B = this->dcm_BP * this->r_PcP_P;
191191
this->r_PcB_B = this->r_PcP_B + this->r_PB_B;
192192
this->effProps.rEff_CB_B = this->r_PcB_B;
193193

194194
// Find the effector inertia about point B
195195
this->rTilde_PcB_B = eigenTilde(this->r_PcB_B);
196-
this->IPntPc_B = this->dcm_BF * this->IPntPc_P * this->dcm_BF.transpose();
196+
this->IPntPc_B = this->dcm_BP * this->IPntPc_P * this->dcm_BP.transpose();
197197
this->effProps.IEffPntB_B = this->IPntPc_B - this->mass * this->rTilde_PcB_B * this->rTilde_PcB_B;
198198

199199
// Find the B frame time derivative of r_PcB_B
@@ -304,7 +304,7 @@ void PrescribedMotionStateEffector::updateEnergyMomContributions(double integTim
304304
void PrescribedMotionStateEffector::computePrescribedMotionInertialStates()
305305
{
306306
// Compute the effector's attitude with respect to the inertial frame
307-
Eigen::Matrix3d dcm_PN = (this->dcm_BF).transpose() * this->dcm_BN;
307+
Eigen::Matrix3d dcm_PN = (this->dcm_BP).transpose() * this->dcm_BN;
308308
this->sigma_PN = eigenMRPd2Vector3d(eigenC2MRP(dcm_PN));
309309

310310
// Compute the effector's inertial position vector

src/simulation/dynamics/prescribedMotion/prescribedMotionStateEffector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class PrescribedMotionStateEffector: public StateEffector, public SysModel {
112112
Eigen::Matrix3d dcm_BN; //!< DCM from inertial frame to frame B
113113
Eigen::Matrix3d dcm_BM; //!< DCM from frame M to frame B
114114
Eigen::Matrix3d dcm_PM; //!< DCM from frame M to frame P
115-
Eigen::Matrix3d dcm_BF; //!< DCM from frame P to frame B
115+
Eigen::Matrix3d dcm_BP; //!< DCM from frame P to frame B
116116

117117
// Other matrix quantities
118118
Eigen::Matrix3d rTilde_PcB_B; //!< [m] Tilde cross product matrix of r_PcB_B

0 commit comments

Comments
 (0)